Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.

Similar presentations


Presentation on theme: "1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology."— Presentation transcript:

1 1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology

2 2 Agenda Introduction & Network layer functions Routing principles Hierarchical routing The Internet protocol (IP) Routing in the Internet What’s inside a router

3 3 ICMP: Internet Control Message Protocol Used by hosts & routers to communicate network-level information –Error reporting: unreachable host, network, port, protocol –Echo request/reply (used by ping) Network-layer “above” IP: –ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header

4 4 Traceroute and ICMP Source sends series of UDP segments to dest –First has TTL =1 –Second has TTL=2, etc. –Unlikely port number When nth datagram arrives to nth router: –Router discards datagram –And sends to source an ICMP message (type 11, code 0) –Message includes name of router& IP address When ICMP message arrives, source calculates RTT Traceroute does this 3 times Stopping criterion UDP segment eventually arrives at destination host Destination returns ICMP “host unreachable” packet (type 3, code 3) When source gets this ICMP, stops.

5 5 IPv6 (RFC 2373; RFC 2460) Initial motivation: In 1996, the American Registry for Internet Numbers (ARIN) reported that all of the IPv4 class A addresses had been assigned, 62% of the class B addresses had been assigned, and 37% of the class C addresses had been assigned [ARIN 1996]. ( http://www.arin.net/statistics/index.html ) http://www.arin.net/statistics/index.html Additional motivation: –Header format helps speed processing/forwarding. –Header changes to facilitate QoS. –New “anycast” address: route to “best” of several replicated servers.

6 6 IPv6 Header (Cont) Priority: Identify priority among datagrams in flow Flow Label: Identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: Identify upper layer protocol for data

7 7 IPv6 Header Version: This 4 bit field identifies the IP version number. Flow label: This 20-bit field is used to identify a “flow” of datagrams. Payload Length: This 16-bit value is treated as an unsigned integer giving the number of bytes in the IPv6 datagram following the fixed- length, 40-byte datagram header. Next header: This field identifies the protocol to which the contents (data field) of this datagram will be delivered (for example, to TCP or UDP). Hop limit: The contents of this field are determined by one by each router that forwards the datagram. If the hop limit count reaches zero, the datagram is discarded. Source & destination address: The various formats of the IPv6 128- bit address are described in RFC 2373. Data: This is the payload portion of the IPv6 datagram.

8 8 Other Changes from IPv4 Fragmentation/Reassembly – IPv6 does not allow fragmentation and reassembly at intermediate routers. –These operations can be performed only by the source and destination. –If an IPv6 datagram received by a router is too large to be forwarded over the outgoing link, the router simply drops the datagram and sends a “Packet Too Big” ICMP error message back to sender. –Removing fragmentation & reassembly functions from the intermediate routers and placing it squarely in the end systems considerably speeds up IP forwarding within the network. Header Checksum – Removed entirely to reduce processing time at each hop. Options – It is indicated by “Next Header” field in IPv6

9 9 ICMP for IPv6 A new ICMP version has been defined for IPv6 in RFC 2463. ICMPv6 includes the new message type “Packet Too Big”.

10 10 Transition From IPv4 To IPv6 Not all routers can be upgraded simultaneous –no “flag days” –How will the network operate with mixed IPv4 and IPv6 routers? Dual Stack – Some routers with dual stack (v6, v4) can “translate” between formats. Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers

11 11 Tunneling A B E F IPv6 tunnel Logical view: Physical view: A B E F IPv6 C D IPv4 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4

12 12 BOOTP Bootstrap protocol (BOOTP) is a client-server protocol designed to provide the four types of information for a diskless computer or a computer that is booted for the first time. –Its IP address –Its subnet mask –The IP address of a router –The IP address of a name server This information is usually stored in a configuration file and accessed by a computer during bootstrap process. In case of diskless computer, the OS & the networking software could be stored in ROM. So, the above information cannot be stored in the ROM by the manufacturers. Do we need RARP in this case?

13 13 DHCP Dynamic Host Configuration Protocol (DHCP) is a dynamic configuration protocol. DHCP is compatible with BOOTP. DHCP provides temporary IP addresses for a limited period of time. In the simplest case, each network will have a DHCP server. If no server is present then a DHCP “relay agent” (typically a router) that knows the address of the DHCP server for that network is needed.

14 14 DHCP Client-Server Scenario

15 15 DHCP For new arriving host, the DHCP protocol is a four-step process:- DHCP server discovery DHCP server offers DHCP request DHCP ACK

16 16 DHCP Client-Server Scenario

17 17 Mapping IP Addresses to Hardware Addresses IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware address ? The process of finding the hardware address of a host given the IP address is called Address Resolution

18 18 Reverse Address Resolution The process of finding out the IP address of a host given a hardware address is called Reverse Address Resolution

19 19 ARP The Address Resolution Protocol is used by a sending host when it knows the IP address of the destination but needs the Ethernet address. ARP is a broadcast protocol - every host on the network receives the request. Each host checks the request against it’s IP address - the right one responds.

20 20 ARP (cont.) ARP does not need to be done every time an IP datagram is sent - hosts remember the hardware addresses of each other. Part of the ARP protocol specifies that the receiving host should also remember the IP and hardware addresses of the sending host.

21 21 ARP

22 22 Services provided by IP Connectionless Delivery (each datagram is treated individually). Unreliable (delivery is not guaranteed). Fragmentation / Reassembly Routing.


Download ppt "1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology."

Similar presentations


Ads by Google