IP Sending Packet Processing

Transmission of a Frame over Ethernet

An IP packet that has been formed by the IP layer is placed in an Ethernet frame as follows, depending on the destination address in the IP header:

  1. IP Broadcast/Multicast Address: The IP destination address is checked to see if the system should also receive a copy of the packet. This happens if this is an IP network broadcast address (or a multicast address is used that matches one of the registered IP multicast filters set by the IP receiver). If a copy is required, it is sent to the loopback interface. This directly delivers the packet to the IP input routine. the original packet continues to be processed
  2. IP Unicast Address: The IP destination address is checked to see if the address is the unicast (source) IP address of the sending system. Such packets are sent directly to the loopback interface (i.e. never reach the physical Ethernet interface)
  3. Next Hop IP Address: The sender then determines the next hop address - that is the IP address of the next Intermediate System/End System to receive the packet. Once this address is known, the Address Resolution Protocol (arp) is used to find the appropriate MAC address to be used in the Ethernet frame. This is a two stage process: (i) the arp cache is consulted, to see if the MAC address is already known, in which case the correct address is added and the packet queued for transmission. (ii) If the MAC address is not in the arp cache, the arp protocol is used to request the address, and the packet is queued until an appropriate response (or timeout) occurs.
  4. MTU: The size of the packet is checked against the MTU of the link on which it is to be sent. (Note the MTU of the loopback interface may be different to that of Ethernet). If required, IP fragmentation is performed, or an ICMP error message is returned, which may trigger Path MTU Discovery at the sending End Host.
  5. Encapsulation: The Ethernet frame is completed, by inserting the Destination, Source and Ethernet Type fields. When Tags are used, the appropriate 802.1pQ Tag is inserted following the MAC header (the Priority field in the Tag may be set based on the IP DSCP value).
  6. Transmit: The frame is transmitted using the MAC transmission procedure for Ethernet.

See also:

IP

IP Receive Processing

Some decodes of IP Packet Headers

Introduction to Routers

Operation of a Router


Gorry Fairhurst - Date: 11/02/2006