Operation ofTCP and IP
To make clear that the total communications facility may consist of multiple networks,the constituent networks are usually referred to as subnetworks. Some sort of network
access protocol, such as the Ethernet logic, is used to connect a computer to a
subnetwork. This protocol enables the host to send data across the subnetwork to
another host or, in the case of a host on another subnetwork, to a router. IP is implemented
in all of the end systems and the routers. It acts as a relay to move a block of
data from one host, through one or more routers, to another host. TCP is implemented
only in the end systems; it keeps track of the blocks of data to assure that all
are delivered reliably to the appropriate application.
For successful communication, every entity in the overall system must have a
unique address. Actually, two levels of addressing are needed. Each host on a subnetwork
must have a unique global internet address; this allows the data to be delivered
to the proper host. Each process with a host must have an address that is
unique within the host; this allows the host-to-host protocol (TCP) to deliver data to
the proper process. These latter addresses are known as ports.
Let us trace a simple operation. Suppose that a process, associated with port 1 at
host A, wishes to send a message to another process, associated with port 3 at host B.
The process at A hands the message down to TCP with instructions to send it to
host B, port 3. TCP hands the message down to IP with instructions to send it to
host B. Note that IP need not be told the identity of the destination port. All it needs
to know is that the data are intended for host B. Next, IP hands the message down to
the network access layer (e.g., Ethernet logic) with instructions to send it to router J
(the first hop on the way to B).
To control this operation, control information as well as user data must be transmitted,
as suggested in Figure 4.2. Let us say that the sending process generates a block
of data and passes this to TCP.TCP may break this block into smaller pieces to make it
more manageable. To each of these pieces,TCP appends control information known as
the TCP header, forming a rep segment. The control information is to be used by the
peerTCP protocol entity at host B. Examples of items in this header include
• Destination port: When the TCP entity at B receives the segment, it must
know to whom the data are to be delivered.
• Sequence number: TCP numbers the segments that it sends to a particular
destination port sequentially, so that if they arrive out of order, the TCP entity
at B can reorder them.
e Checksum: The sending TCP includes a code that is a function of the contents
of the remainder of the segment. The receivingTCP performs the same calculation
and compares the result with the incoming code.A discrepancy results if
there has been some error in transmission.
Next,TCP hands each segment over to IP, with instructions to transmit it to B.
These segments must be transmitted across one or more subnetworks and relayed
through one or more intermediate routers. This operation, too, requires the use of
control information. Thus IP appends a header of control information to each segment
to form an IP datagram. An example of an item stored in the IP header is the
destination host address (in this example, B).
Finally, each IP datagram is presented to the network access layer for transmission
across the first subnetwork in its journey to the destination. The network
access layer appends its own header, creating a packet, or frame. The packet is transmitted
across the subnetwork to router 1. The packet header contains the information
that the subnetwork needs to transfer the data across the subnetwork.
Examples of items that may be contained in this header include
• Destination subnetwork address: The subnetwork must know to which
attached device the packet is to be delivered.
• Facilities requests: The network access protocol might request the use of certain
subnetwork facilities, such as priority.
At router J, the packet header is stripped off and the IP header examined. On
the basis of the destination address information in the IP header, the IP module in
the router directs the datagram out across subnetwork 2 to B. To do this, the datagram
is again augmented with a network access header.
When the data are received at B, the reverse process occurs. At each layer, the
corresponding header is removed, and the remainder is passed on to the next higher
layer, until the original user data are delivered to the destination process.
As an aside, the generic name for a block of data exchanged at any protocol
level is referred to as a protocol data unit (PDU). Thus, a TCP segment is a TCP PDU.
No comments:
Post a Comment