A Note on TCP/IP Implementation - Linux

It is important to draw a distinction between the networking protocol and its implementation. The networking protocol is a specification where a sequence of exchanges between computers is specified in detail. Let’s look at a simple example without specifying any particular OS. In Figure, machine A broadcasts a packet requesting the address of machine B in order to send a packet directly to B. A server on the network, Q responds to the request from A with a packet containing the address of B. A then sends a packet directly to B.

Simple protocol example.

Simple protocol example.

An implementation is how the software performs the protocol functions internally in a given computer and OS. For example, consider the steps that are executed internally in the TCP/IP stack to implement the generic example protocol in Figure An application constructs a buffer for a packet to send. The buffer is passed to the User Datagram Protocol (UDP) input routine, which copies it into an internal buffer and then passes it to IP. The buffer is queued up at the Ethernet network interface when the IP output routine calls the driver’s send function. The driver makes a call to the address resolution function to get the destination MAC address. The address resolution function checks the ARP cache to see if there is already an entry for the destination IP address. In this example, it doesn’t find an entry, so it broadcasts an ARP request packet. When the response to this packet is received, the ARP cache is updated and the address resolve function returns with the destination MAC address. The driver then takes the MAC address, puts it in the packet MAC header, and transmits the packet.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Linux Topics