Vous êtes sur la page 1sur 4

IP Packet Processing

Transmission of a frame over Ethernet


The IP packet is placed in an Ethernet frames as follows:
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 lters 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
1.
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)
2.
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 nd 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
3.
IP Packet Processing http://www.erg.abdn.ac.uk/~gorry/eg3567/inet-p...
1 of 4 10/23/2014 03:25 AM
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.
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
dierent 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.
4.
Encapsulation: The Ethernet frame is completed, by inserting the
Destination, Source and Ethernet Type elds. When Tags are used, the
appropriate 802.1pQ Tag is inserted following the MAC header (the
Priority eld in the Tag may be set based on the IP DSCP value).
5.
Transmit: The frame is transmitted using the MAC procedure for
Ethernet.
6.
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:
MAC Protocol: The Ethernet controller in the network interface card
veries that the frame is:
Not less than the minimum frame length not greater than the
maximum length (1500 B)
Contains a valid CRC at the end
Does not contain a residue (i.e. extra bits which do not form a byte)
1.
MAC Address: The frame is then ltered based on the MAC destination 2.
IP Packet Processing http://www.erg.abdn.ac.uk/~gorry/eg3567/inet-p...
2 of 4 10/23/2014 03:25 AM
address and accepted only if:
It is a broadcast frame (i.e. all bits of the destination address eld are
set to 1)
It is a multicast frame to a registered MAC group address
It is a unicast frame to the node's own MAC address
Or the interface is acting in promiscuous mode (i.e. as a bridge)
MAC SAP: The frame is then demultiplexed based on the specied MAC
packet type (SAP)
Frames carrying an IEEE 802.1pQ Tag will have their Virtual LAN
information checked and processed, before skipping the Tag eld and
reading the following EtherType eld.
It is passed to the appropriate protocol layer (e.g. LLC, ARP, IP)
Frames carrying Packets destined for IP have a type eld of 0x0800
and those for arp have a value 0x0806.
3.
IP Check: The IP packet header is checked, including:
By checking the protocol type =4 (i.e. current version of IP)
By verifying the header checksum
By checking the header packet length
4.
IP Address: The destination IP network address is then checked:
If it matches an IP address of the node then it is accepted
If it is network broadcast packet to the node's network it is accepted
If it is a multicast packet to an IP multicast address which is in use
then it is accepted
If it is none of these, it is forwarded using the routing table (if
possible) or discarded
5.
IP Fragmentation: Packets for the node are then checked concerning
whether reassembly is required:
The fragmentation oset value and more ags are inspected
Fragments are placed in a buer until other fragments are received to
complete the packet.
6.
IP SAP: The IP protocol eld (SAP) is checked:
The SAP eld identies the transport protocol (e.g. 1 = ICMP; 6 =
TCP; 17= UDP)
The complete packet is passed to the appropriate transport layer
protocol.
7.
See also:
IP
IP Fragmentation
Some decodes of IP Packet Headers
Introduction to Routers
Operation of a Router
IP Packet Processing http://www.erg.abdn.ac.uk/~gorry/eg3567/inet-p...
3 of 4 10/23/2014 03:25 AM
Gorry Fairhurst - Date: 11/02/2006 EG3557
IP Packet Processing http://www.erg.abdn.ac.uk/~gorry/eg3567/inet-p...
4 of 4 10/23/2014 03:25 AM

Vous aimerez peut-être aussi