IP Packet Processing

Transmission of a frame over Ethernet

The IP packet is placed in an Ethernet frames as follows:

  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 procedure for Ethernet.

Reception of a frame from Ethernet

The following summary shows the processing performed by an end system in an IP network. It is assumed that the system is connected to an Ethernet network.

The received frames are processed as follows:

  1. MAC Protocol: The Ethernet controller in the network interface card verifies that the frame is:
  2. MAC Address: The frame is then filtered based on the MAC destination address and accepted only if:
  3. MAC SAP: The frame is then demultiplexed based on the specified MAC packet type (SAP)
  4. IP Check: The IP packet header is checked, including:
  5. IP Address: The destination IP network address is then checked:
  6. IP Fragmentation: Packets for the node are then checked concerning whether reassembly is required:
  7. IP SAP: The IP protocol field (SAP) is checked:

See also:

IP

IP Fragmentation

Some decodes of IP Packet Headers

Introduction to Routers

Operation of a Router


Gorry Fairhurst - Date: 11/02/2006 EG3557