Ch06

advertisement
Chapter Overview


TCP/IP
DoD model
1
Network Layer Protocols


Responsible for end-to-end communications
on an internetwork
Contrast with data-link layer protocols, which
provide communications on the same local
area network (LAN)
2
TCP/IP is everywhere with networks



Web pages using TCP/IP
Database access can use TCP/IP
It started with DOD (tax payer’s $$)



In 1973 it is TCP/IP
In 1978 they became TCP and IP (two protocols)
Mostly done at UC Berkeley and shipped with its
version of UNIX
3
DoD model, OSI model and protocols
4
Port Numbers and Sockets




A port number refers to a specific application
or process running on a computer.
A socket is a combination of a port number
and an IP address.
The Internet Assigned Numbers Authority
(IANA) assigns well-known port numbers to
common Internet applications.
The most commonly used port numbers are
listed in the Services file on computers
running TCP/IP.
5
Process/Application Apps and Protocols
Port Protocol
Description
23
Telnet Terminal Emulation (Telephone network)
21
FTP Allows file transfers between computers (File Transfer Protocol)
Have to know what you want and where it is on the server, no directory
69
TFTP
browsing, no user authentication (Trivial File Transfer Protocol)
2049
25
515
NFS
Allows remote file systems to be mounted as local (Network File System)
SMTP Used to send mail between mail servers (Simple Mail Transfer Protocol)
53
Used for sharing of network printers with TCP/IP (Line Printer Daemon)
Collect and manipulates network information (Simple Network
SNMP
Management Protocol)
DNS Resolves FQDN to IP addresses (Domain Name Service)
67
BootP Used by diskless CPs to receive boot file and other info via TFTP
161
LPD
Assigns IP addresses to hosts from a pool. Can send IP address,
DHCP Subnet mask,Domain Name, Default Gateway, DNS IP, WINS info.
(Dynamic Host Configuration Protocol)
6
Host to host layer protocols


Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
7
TCP Characteristics


TCP is the acronym for Transmission Control
Protocol.
TCP is





Connection oriented
Reliable
It is used to carry large amounts of data.
It provides services that Internet Protocol (IP)
lacks.
TCP is defined in Request for Comments (RFC)
793.
8
TCP Functions




Guaranteed delivery
Packet acknowledgment
Flow control
Error detection
9
Segmentation




TCP splits application layer messages into
datagram-sized segments and encapsulates each
segment with its own header.
The collection of segments is called a sequence.
The destination system reassembles the
segments into the original application layer
messages .
The segmentation process is completely separate
from the network layer fragmentation process.
10
The TCP Message Format
http://freesoft.org/CIE/Course/Section4/8.htm
Control Bits
Control Bit
Function
URG
Indicates that the segment contains urgent data
ACK
Indicates that the message acknowledges a previously transmitted
segment
PSH
Indicates that the receiving system should forward the message
immediately rather than wait for the rest of the sequence
RST
Resets the TCP connection and discards the segments received so
far
SYN
Synchronizes the Sequence Number values for both systems
FIN
Terminates a TCP connection
12
Three-Way Handshake Functions




Verify that both computers are operating and
ready to receive data
Exchange initial sequence numbers (ISNs)
Exchange maximum segment sizes (MSSs)
Exchange port numbers
13
Three-Way Handshake Messages
14
Transmitting Data

Information needed to transmit data:



Port number
Sequence number
MSS (Max segment size)
15
Packet Acknowledgment



TCP implements packet acknowledgment by using
the Sequence Number and Acknowledgment
Number fields.
The Sequence Number field specifies the number
of bytes transmitted.
The Acknowledgment Number field specifies the
number of bytes received.
16
Delayed Acknowledgments


TCP systems do not have to individually
acknowledge every packet they receive.
The frequency of acknowledgment is left up
to the individual TCP implementation.
17
Positive and Negative
Acknowledgments


With positive acknowledgment with
retransmission, TCP systems acknowledge only the
number of bytes they have received correctly.
With negative acknowledgment, the computer
specifies the information that it has not received
correctly.


All data beginning with the failed segment is
retransmitted.
Messages that are not acknowledged are
retransmitted.
18
TCP Error Detection


TCP provides the only end-to-end error
detection for the application layer data.
TCP computes a checksum based on



The TCP header
The application layer information in the TCP Data
field
A pseudo-header created from some of the fields
in the IP header
19
TCP Checksum Value
20
Flow Control




Flow control allows a receiving system to control the
transmission rate of the sending system.
Each computer has a buffer for storing incoming
packets.
When a computer transmits too quickly, the buffer on
the receiving system can fill up, causing packets to
be dropped.
TCP uses the Window field in its acknowledgment
messages to implement flow control.


The Window value indicates how much buffer space the
receiving system has available.
The sending system is permitted to transmit only the
number of bytes specified in the Window field.
21
Terminating the Connection
22
UDP Characteristics




UDP is the acronym for User Datagram Protocol.
UDP is defined in RFC 768.
It is a connectionless protocol.
It is used primarily for brief request/reply
transactions.
23
The UDP Message Format
24
TCP VS. UDP
25
Port Numbers


In computer networking, a port is an applicationspecific or process-specific software construct
serving as a communications endpoint used by
Transport Layer protocols, such as Transmission
Control Protocol (TCP) and User Datagram Protocol
(UDP).
Port + IP address  socket
26
Well Known port numbers


< 1024
Defined in RFC 3232
27
IP Layer Protocals

IP (Internet Protocol)





Encapsulation
Addressing
Routing
Fragmentation
Protocol identification
28
The IP Datagram Format
http://freesoft.org/CIE/Course/Section3/7.htm
29
ICMP

Internet Control Message Protocol



Router may use ICMP to send back Destination
Unreachable message
Or Buffer Full message
Over hop limit message



A message informing the demise of a IP datagram
ping
traceroute/tracert
30
ARP and RARP

Address Resolution Protocol (ARP)



Resolve IP addresses to Mac addresses by broadcast a
ARP message
arp -a
Reverse Address Resolution Protocol (RARP)

From MAC to IP, for diskless systems
31
Data Encapsulation


The wrapping of protocol info at each layer.
Each layer communicate ONLY WITH ITS
PEER LAYER
32
Data Encapsulation – Protocol Data
Units
33
Data Encapsulation
34
Download