Professional Documents
Culture Documents
Data Communications: Network Layer: Internet Protocol
Data Communications: Network Layer: Internet Protocol
Data Communications: Network Layer: Internet Protocol
Lecture 9
Network Layer: Internet Protocol
Spring 2009
Dr. L. Christofi Spring 2009
0. Overview
In this lecture we will cover the following topics:
Dr. L. Christofi
Spring 2009
1.#
In this section, we discuss the five network layer protocols: ARP, IP and ICMP
Dr. L. Christofi
Spring 2009
IP is responsible for host-to-host delivery of datagrams from source to destination. ARP: Find the MAC (Physical) address of the next hop. Data link layer encapsulates this address into the frame ICMP: Handle unusual situations such as the occurrence of an error. IP is meant for unicast. For Multicast, we need IGMP.
Dr. L. Christofi
Spring 2009
1.#
Dr. L. Christofi
Spring 2009
ARP mapping
Static Mapping
Having a table of IP and MAC address mapping in all the machines. Limitations if MAC address changes due to
Change of network card In LocalTalk, MAC address changes when a machine is turned on A mobile computer can move from one network to another and so can gain different MAC address.
Dynamic mapping
Each machine knows one of the two addresses. Use a protocol to get the other address. ARP & RARP. RARP is now replaced by DHCP. ARP associates an IP address with its MAC address.
Dr. L. Christofi
Spring 2009
1.#
ARP Operation
Dr. L. Christofi
ARP request has the senders IP and MAC & the receivers IP address. Its a broadcast as the physical address of the receiver is unknown. All hosts in the network processes this request but only the intended recipient responds. Response is unicast.
Spring 2009
Hardware Type: 16-bits; Defining the type of network; Ethernet is 1. Protocol Type: 16-bits; IPv4 is 0800. Hardware and Protocol length is 8-bits.
8
Dr. L. Christofi
Spring 2009
1.#
Dr. L. Christofi
Spring 2009
Dr. L. Christofi
Spring 2009
10
1.#
Dr. L. Christofi
Spring 2009
11
Dr. L. Christofi
Spring 2009
12
1.#
Example
A host with IP address 130.23.3.20 and physical address B23455102210 has a packet to send to another host with IP address 130.23.43.25 and physical address A46EF45983AB. The two hosts are on the same Ethernet network. Show the ARP request and reply packets encapsulated in Ethernet frames.
Solution Figure in next slide shows the ARP request and reply packets. Note that the ARP data field in this case is 28 bytes, and that the individual addresses do not fit in the 4-byte boundary. That is why we do not show the regular 4-byte boundaries for these addresses. Note that we use hexadecimal for every field except the IP addresses.
Dr. L. Christofi
Spring 2009
13
Example
Dr. L. Christofi
Spring 2009
14
1.#
IP
Host-to-host network layer delivery protocol for the Internet. Unreliable and connectionless datagram protocol Best-effort: no error control or flow control. Has error detection mechanism to discard the packets that are corrupted. For reliability, use IP with TCP. Each datagram is delivered independently and via different routes. Datagrams: Packets of IP layer.
Variable-length packet consisting of header [20 to 60 bytes] and data.
Dr. L. Christofi
Spring 2009
15
IP datagram
Dr. L. Christofi
HLEN must be multiplied by 4 to get the length in bytes Differentiated services: QoS Total length = length of data + header length TTL: number of hops; approx 2 times the maximum number of routes between any two hosts. Protocol: Defines the higher level protocol that uses IP layer.
Spring 2009
16
1.#
Protocols: Multiplexing
Value
Dr. L. Christofi Spring 2009
1 2 6 17 89
Checksum
Checksum only covers the header and not data.
Data checksum is handled by higher-level protocols that encapsulate the data in the IP datagram. Header changes when packets travels on the network but data does not change.
Calculate Checksum
Divide the IP header into 16-bit sections. Value of checksum field is set to zero. All the sections are added and the sum is complemented. The result is inserted in the checksum field.
Dr. L. Christofi
Spring 2009
18
1.#
Dr. L. Christofi
Spring 2009
19
Fragmentation
Fragmentation
Each router on the network decapsulates the IP datagram from the frame it receives, process it, and then encapsulates it in another frame. Format and size depends on the incoming and outgoing physical network. IP datagram must be divided to make it possible to pass through these physical networks. This is called fragmentation
Dr. L. Christofi
Spring 2009
20
1.#
Fragmentation Fields
Identification: Same for all the fragments. Helps destination in
reassembly of fragments.
Fragmentation offset
13-bit field shows the relative position of this fragment with respect to the whole datagram. It is the offset of the data in the original datagram measured in units of 8 bytes. Forces hosts or routers that fragment datagrams to choose the size of each fragment so that the first byte number is divisible by 8.
Dr. L. Christofi
Spring 2009
21
Example
If needed, the packets are fragmented. Each fragmented datagram has a header of its own. A fragmented datagram may itself be fragmented if it encounters a network with an even smaller MTU. Fragmentation is done at source or at the routers on the fly. Reassembly is done only at the destination.
Dr. L. Christofi
Spring 2009
22
1.#
ICMP (Internet Control Message Protocol) is a network layer protocol. ICMP Messages are encapsulated inside IP datagrams before going to the lower layer. Protocol field in IP header is 1 for ICMP.
Dr. L. Christofi
Spring 2009
23
ICMP Encapsulation
Dr. L. Christofi
Spring 2009
24
1.#
Dr. L. Christofi
Spring 2009
25
Error-Reporting Messages
Dr. L. Christofi
Spring 2009
26
1.#
Error-Reporting Messages
Destination unreachable
Router can not route a datagram or a host cannot deliver a datagram, the datagram is discard and message sent to the source.
Source Quench
IP is connectionless protocol and so no control of flow or congestion. Source has no idea whether the destination host has been overwhelmed with datagrams. When a router or host discards a datagram due to congestion, it sends a source-quench message to the sender of the datagram.
To inform sender about the loss of the datagram To warn the source that there is congestion in the path and that the source should slow down the sending process.
Dr. L. Christofi
Spring 2009
27
Error-Reporting Messages
Time-exceeded: Generated in two cases
When a router receives a datagram with TTL as 0, then the router discards the datagram and sends a message to the source. When all fragments that make up a message do not arrive at the destination host within a certain time limit.
Parameter Problem
If a router or the destination host discovers an ambiguous or missing value in any field of the datagram, it discards the the datagram and sends a message back to the source.
Redirection
Routing decision on routers is made using routing protocols but in the case of hosts, there is no routing protocol. A host may send a datagram, which is destined for another network, to the wrong router. In this case, the router that receives the datagram will forward the datagram to the correct router. However, to update the routing table of a host, it sends a redirection message back to this host.
Dr. L. Christofi
Spring 2009
28
1.#
Query Messages
In the case of query message, a node sends a message that is answered in a specific format by the destination node. Echo request and reply: for diagnostic purposes Time-stamp request and reply: to determine the round trip time and also to synchronize the clocks in two machines. Address mask request and reply: Request by a host to know its subnet mask to the router. Router solicitation and advertisement: Solicitation is request by host to know the route to send a packet. Reply comes from the router as advertisement.
Dr. L. Christofi
Spring 2009
29
IPv6
IPv4
Two level address structure. Inefficient. For real-time audio and video transmission, there is no minimum delay strategies and reservation of resources. No security mechanism [encryption and authentication of data].
Dr. L. Christofi
Spring 2009
30
1.#
IPv6
IPv6 [IPng: IP next generation]
New options: For additional functionalities. Allowance for extension Support for resource reservation: Type-of-service has been removed but a mechanism called flow label has been added to enable the source to request special handling of the packet. This mechanism can be used to support traffic such as realtime audio and video. Support for more security: encryption and authentication options in IPv6 provide confidentiality and integrity of the packet.
Dr. L. Christofi
Spring 2009
31
IPv6 Address
Abbreviation
Leading zeros of a section (four digits between two colons) can be omitted. Only the leading zeros can be dropped, not the trailing zeros.
Dr. L. Christofi
Spring 2009
32
1.#
Abbreviated Address
Abbreviations are possible if there are consecutive sections consisting of zeros only. We can remove the zeros altogether and replace them with a double semicolon. But only once per address.
Dr. L. Christofi
Spring 2009
33
CIDR Address
Dr. L. Christofi
Spring 2009
34
1.#
Dr. L. Christofi
Spring 2009
35
Dr. L. Christofi
Spring 2009
36
1.#
ICMPv6 is designed for IPv6 Some protocols that were independent in version 4 are now part of ICMPv6. ARP and IGMP in version 4 are combined in ICMPv6. RARP is dropped from the suite because it is seldom used.
Dr. L. Christofi
Spring 2009
37
IP Transition Strategies
Dual Stack: station should run IPv4 and IPv6 simultaneously until all the Internet uses IPv6. (Host DNS Query) Tunneling: A strategy used when two computers using IPv6 want to communicate with each other when the packet must pass through a region that uses IPv4. To pass this region, IPv4 address is needed. IPv6 packet is encapsulated in an IPv4 packet when it enters the region, and the IPv6 packet leaves its capsule when it exits the region.
Dr. L. Christofi
Spring 2009
38
1.#
Dr. L. Christofi
Spring 2009
39
Header Translation
When the majority of the Internet has moved to IPv6 but some systems still use IPv4. Sender wants to use IPv6, but the receiver does not understand IPv6. Tunneling does not work in this situation because the packet must be in the IPv4 format to be understood by the receiver. In this case, the header format must be changed totally through header translation.
Dr. L. Christofi
Spring 2009
40
1.#
Dr. L. Christofi
41
Dr. L. Christofi
Spring 2009
42
1.#
References
B.A. Forouzan, Data Communications and Networking, 4th edition, McGraw-Hill, 2007
W. Stalling, Local and Metropolitan Area Networks, 6th edition, Prentice Hall, 2000 W. Stallings, Data and Computer Communications, 7th edition, Prentice Hall, 2004
F. Halsall, Data Communications, Computer Networks and Open Systems, 4th edition, Addison Wesley, 1995
Dr. L. Christofi
Spring 2009
43
1.#