Datagram Fragmentation, ICMP & IPv6

Slides:



Advertisements
Similar presentations
CSCI 4550/8556 Computer Networks Comer, Chapter 22: The Future IP (IPv6)
Advertisements

Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 - The Internet Protocol Version 4
IP datagrams Service paradigm, IP datagrams, routing, encapsulation, fragmentation and reassembly.
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
1 Internet Protocol Version 6 (IPv6) What the caterpillar calls the end of the world, nature calls a butterfly. - Anonymous.
Network Layer IPv6 Slides were original prepared by Dr. Tatsuya Suda.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Network Layer Packet Forwarding IS250 Spring 2010
Internet Control Message Protocol (ICMP)
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
CSCI 4550/8556 Computer Networks Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
McGraw-Hill©The McGraw-Hill Companies, Inc., Chapter 20 Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv6.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 18 Introduction to Networks and the Internet.
IP Routing, Format, Fragmentation Chapters 20-21, 23.
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part XI Internetworking Part 2.4 (Datagram Encapsulation, Transmission, Fragmentation, Reassembly)
Chapter 21: IP Encapsulation, Fragmentation & Reassembly
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Dr. John P. Abraham Professor UTPA
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 21 Internetworking Part 2 (Datagram Encapsulation, Transmission, Fragmentation, Reassembly)
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
ICMPv6 Error Message Types Informational Message Types.
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
EECB 423 V.1 1 Internetworking 2 Datagram Encapsulation Transmission Fragmentation and Reassembly.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
COMPUTER NETWORKS CS610 Lecture-32 Hammad Khalid Khan.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
Network Layer session 1 TELE3118: Network Technologies Week 5: Network Layer Forwarding, Features Some slides have been taken from: r Computer.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
4: Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Some slides have been taken from:
Internet Control Message Protocol (ICMP)
Dr. John P. Abraham Professor UTPA
IP Encapsulation, Fragmentation, and Reassembly
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
Dr. John P. Abraham Professor UTPA
Net 323 D: Networks Protocols
ITIS 6167/8167: Network and Information Security
32 bit destination IP address
Exercise 10 Toking Ring MTU=4464 Ethernet MTU=1500 FDDI MTU=4352 H1 H2
Presentation transcript:

Datagram Fragmentation, ICMP & IPv6 Lecture 10 Lecture 10 Datagram Fragmentation, ICMP & IPv6 IP Datagram Encapsulation Network Maximum Transmission Unit (MTU) IP Datagram Fragmentation ICMP (Internet Control Message Protocol) - Error Report Mechanism - Information Query Mechanism - ICMP Message format and Transmission - ping and traceroute Utilities IPv6 - IPv6 Features - IPv6 Header and Format - IPv6 Address

Internet Transmission Paradigm Lecture 10 Internet Transmission Paradigm IP D IP D IP D IP D IP D Source host router router router Destination host network Routing Table --------- ## *** ………… network Routing Table --------- ## *** ………… network Routing Table --------- ## *** ………… network Routing Table --------- ## *** ………… Routing Table --------- ## *** ………… Source host - Forms datagram with destination address - Sends to nearest router Intermediate routers - Forward datagram to next router Final router - Delivers to destination host Note: Datagram must be passed to network interface & sent across physical network. Network hardware does not recognize IP datagram format and IP address !! How is datagram transmitted across physical network ??  Address Resolution (ARP) and Encapsulation !!

IP Datagram Encapsulation Lecture 10 IP Datagram Encapsulation IP Datagram/Packet IP Header IP Data Area Encapsulated into a frame/packet in lower layer Frame Header Frame Data Hardware Network Frame/Packet Entire datagram treated like data encapsulated in a frame for transmission Frame type (0800 for Ethernet) identifies contents as IP datagram Frame destination address gives next hop Next hop Frame/Hardware Address is obtained by address resolution protocol (ARP) IP address will not be changed while frame address is different in different network Ethernet Frame

Encapsulation Across Multiple Hops Lecture 10 Encapsulation Across Multiple Hops Animation Each router extracts datagram, discard frame, determines next hop via ARP, encapsulates datagram in outgoing frame Frame headers may differ depended upon network types Datagram survives in entire trip, but frame only survives one hop

Maximum Transmission Unit (MTU) Lecture 10 Maximum Transmission Unit (MTU) Every hardware technology specification includes the definition of the maximum size of the frame data area - called maximum transmission unit (MTU) IP datagrams can be larger than most hardware MTUs - IP: (216 – 1) bytes = 64K bytes - Ethernet: 1500 bytes - Token ring: 4464 bytes - FDDI: 4352 bytes - X.25: 576 bytes - PPP: 296 bytes (Point-to-Point Protocol) Any datagram encapsulated in a hardware frame must be smaller than the MTU for that hardware An internet may have networks with different MTUs Ethernet Frame

Datagram Fragmentation Lecture 10 Datagram Fragmentation Fragmentation: a technique to limit datagram size to smallest MTU of any network IP uses fragmentation – split datagrams into pieces to fit in network with small MTU Router detects datagram larger than network MTU - Splits into pieces called fragments - Each piece smaller than output network MTU Each fragment has datagram header and is sent separately Ultimate destination reassembles fragments > MTU Each <= MTU Fragment 1 Fragment 2 Fragment 3 Fragmentation Fragmentation No-fragmentation Assemble fragments No-assemble No-assemble

Datagram Fragmentation & Reassembly Lecture 10 Datagram Fragmentation & Reassembly Network links have MTU - Different link types with Different MTUs * 1500 bytes for Ethernet * 296 bytes for PPP large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at the final destination IP header bits used to identify, order related fragments Fragmentation: in: one large datagram out: 3 smaller datagrams Reassembly

Fragment Related Fields in IP Header Lecture 10 Fragment Related Fields in IP Header Identification - Datagram ID - 16 bits counter Flag - Signal fragment. - 3 bits, ABC A: reserved B: 1 – no fragment 0 - fragmented C: 1 - not last fragment 0 - last fragment Fragment offset - Payload data location - Numbers of 8 bytes - 13 bits

An Example of Datagram Fragmentation Lecture 10 An Example of Datagram Fragmentation Example MTU = 1500 bytes 4020 byte IP datagram 20 byte IP header 4000 byte payload 3 fragments: F1, F2, F3 4000=1480+1480+1040 ID =x offset =0 fragflag length =4020 =1 =1500 =185 =370 =1040 One large datagram becomes several smaller datagrams If one fragment is lost, IP discards all fragments F1 1480 bytes in data field F2 offset = multiple of 8 bytes so 1480/8 = 185 185+185 = 370 F3 ID: set by sending host IP layer; typically increments ID num for each datagram it sends. Last fragment sent has flag field set to 0 to indicate it’s the last fragment; all other fragments have flag set to 1

Sub-fragmentation and Fragment Loss Lecture 10 Lecture 10 Sub-fragmentation and Fragment Loss Fragment may encounter a subsequent network with even smaller MTU Router fragments the fragment to fit Resulting (sub)fragments look just like original fragments (except for size) No need to reassemble hierarchically; (sub)fragments include position in datagram IP may drop fragment What happens when a fragment is lost?  Destination drops entire original datagram How does destination identify lost fragment? - Sets timer with each fragment - If timer expires before all fragments arrive, fragment assumed lost - Datagram dropped Source (transport/application layer protocol) assumed to retransmit (sub)fragments IP Hdr21 data21 IP Hdr22 data22

IP Datagram Errors and ICMP Lecture 10 IP Datagram Errors and ICMP IP provides best-effort delivery Datagrams will be dropped if the following errors are detected - corrupted bits  detected by header checksum - illegal address  detected by routers (routing table) and ARP reply - routing loop  detected by Time-To-Live (TTL) field - fragment loss  detected by timeout IP ignores errors, but reports some errors !! Internet Control Message Protocol (ICMP) is a protocol to report errors and provide some information. - Error reporting function Report problems that a router or a destination host encounters when it processes an packet via sending an ICMP message TO a source host - Information query function Help a source host or a network manager get specific information from a router or another host

Error Report and Information Query Mechanism Lecture 10 Lecture 10 Error Report and Information Query Mechanism Error report mechanism IP datagram with error Router Dropped Router X with error x Dropped Router x Source Host Destination Host ICMP datagram for error report ICMP datagram for error report Information query mechanism ICMP datagram for information query Router Router q q q q Router r r Source Host r ICMP datagram for reply r Destination Host ICMP datagram for reply

ICMP Message Format and Transmission Lecture 10 ICMP Message Format and Transmission ICMP includes both error messages and information messages ICMP message consists of ICMP header and ICMP data ICMP encapsulates message in IP data area for transmission ICMP datagram is processed and forwarded like conventional IP datagram ICMP Message ICMP Header ICMP Data Area ICMP Datagram Encapsulated IP Header IP Data Area IP Header: type=1 for ICMP message ICMP Header 8 16 24 31 Type Code Checksum Identifier Sequence Num. Encapsulated Type: error/information type Code: detailed error type

ICMP Message Types Error messages: - Source quench (type=4) too many datagrams to buffer in a router - Time exceeded (type=11) TTL becomes zero in a router (code=0) fragment reassembly timer expires in a host (code=1) - Destination unreachable (type=3, code=1~15) network disconnection or destination host is powered down or TCP/application not run, firewall, etc Information query messages: (a pair) - Request/reply (type=8: request, type=0: reply) - Timestamp request/reply (type=13: request, type=14: reply) - Address mask request/reply (type=17: request, type=18: reply)

ICMP, Host Reachability and Internet Route Lecture 10 ICMP, Host Reachability and Internet Route An internet host A is reachable from another host B if datagrams can be delivered from A to B ping utility tests reachability - Sends datagram from B to A that A echoes back to B - Uses ICMP echo request and echo reply messages Command format: ping IP-address/Host-name List of all routers on path from A to B is called the route from A to B traceroute uses UDP to non-existent port and TTL field to find route - Sends ICMP echo messages with increasing TTL - Router that decrements TTL to 0 sends ICMP time exceeded message, with router's address as source address - First, with TTL=1, gets to first router, which discards and sends time exceeded message - Next, with TTL=2, gets through first router to second router - Continue, with TTL=3, 4, …, until message from destination received Command format for Unix/Linux: traceroute IP-address/Host-name Command format for Windows: tracert IP-address/Host-name ping & other network utilities ICMP & TraceRT Anim1 ICMP & TraceRT Anim2

Motivation for Change from IPv4 to IPv6 Lecture 10 Motivation for Change from IPv4 to IPv6 Current version of IPv4 - is more than 30 years old IPv4 has shown remarkable success !!! Then why change? Address space - 32 bit address space allows for over a million networks - But...most are Class C and too small for many organizations - 214 = 16384 Class B network addresses already almost exhausted   Type of service - Different applications have different requirements for delivery reliability & speed - Current IPv4 has type of service that's not often implemented - Effective multimedia communication - Data encryption and authentication Multicast One next version is called IPv6 !

New Features in IPv6 Lecture 10 Large address size – 128 bits = 16 bytes Better header format - entirely different Base header – 40 bytes Extension headers - Additional information stored in optional extension headers Support for resource allocation (QoS) - flow labels and quality of service allow audio and video applications to establish appropriate connections Support for more security Extensible - new features can be added more easily No checksum field - to reduce processing time in a router No fragmentation - to reduce load of routers - Potential for the Internet of Things (IoT) 40 bytes

IPv6 Base Header Format Lecture 10 It contains less information than IPv4 header - VERS = 6 for IPv6 - PRIORITY (8 bits) for traffic classes, such as delay, jitter, reliability requirements - PAYLOAD LENGTH (16 bits): Length excluding the base header - NEXT HEADER points to first extension header - HOP LIMIT (8 bits) same as TTL in IPv4 - FLOW LABEL (20 bits) - used to associate datagrams belonging to a flow or communication between two applications - Specific path - Routers use FLOW LABEL to forward datagrams along prearranged path

IPv6 Next Header Lecture 10 Purpose of multiple headers: economy and extensibility Next header codes  0 - Hop-by-hop option  2 - ICMP  6 - TCP 17 - UDP 43 - Source routing 44 - Fragmentation 50 - Encrypted security payload 51 - Authentication 59 - Null (no next header) 60 - Destination option

IPv6 Addressing Lecture 10 128-bit addresses: Type + Rest of address Groups of 16-bit numbers in hex separated by colons - colon hexadecimal (or colon hex) 69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF Special types of addresses: unicast, multicast, anycast - collection of computers with same prefix Type:         0000 0000 - Reserved         0000 000  - ISO network addresses         0000 010  - IPX (Novell)         010          - Provided-based unicast addresses         100          - Geographic unicast addresses         1111 1111 - Multicast address Provider-based unicast addresses for normal host -------------------------------------------------------------------------------------------------------------- | 010 | RegID(5) | ProviderID(16) | SubscriberID(24) | SubnetID(32) | HostID(48) | -------------------------------------------------------------------------------------------------------------- Register ID: 11000 - INTERNIC for North America                   01000 - RIPNIC for European countries                    10100 - APNIC for Asian and Pacific countries Address hierarchy Reserved addresses - Loopback address: 000...0001 - IPv4 address: 000...000+IPv4 address = Ipv6 address IPv6 Introduction Video

Tunneling – Transition from IPv4 toIPv6 Lecture 10 Tunneling – Transition from IPv4 toIPv6 A B E F Tunnel Logical view: IPv6 IPv6 IPv6 IPv6 A B C D E F Physical view: IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 Not all routers can be upgraded simultaneous How will the network operate with mixed IPv4 and IPv6 routers? Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers 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 Flow: X Src: A Dest: F data A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4 http://en.wikipedia.org/wiki/IPv6 http://ja.wikipedia.org/wiki/IPv6

Exercise 10 Toking Ring MTU=4464 Ethernet MTU=1500 FDDI MTU=4352 H1 H2 Lecture 10 Exercise 10 1. 100 byte data is sent using IP across an Ethernet. Before sent, the data will be first formed an IP datagram and then the datagram will be encapsulated into an Ethernet Frame. Calculate the percentage of headers in sending the 100 byte data. Assume no optional field in IP header. 2. Suppose a file of 20 Kbytes to be sent from host H1 to host H2 across three networks as shown in the following figure. How many IP datagrams will be sent from H1? And how many IP datagrams will be received by H2? Assume no datagram loss, duplication and disorder during the transmissions. 3. Host A sends a message to host B and never receive reply from B. However, host A receives an ICMP message with a header in hexadecimal format as the follows 03 01 1A C8 31 00 B7 Give possible reasons that A does not receive reply from B. 4. Explain how traceroute utility works. Use the utility in a Windows OS environment to probe the Internet organization web server. The command is tracert www.ietf.org . How many routes have been passed when your packet travel to the web server? Which one is the slowest? 5. Summarize main features of IPv6 as compared with IPv4. Toking Ring MTU=4464 Ethernet MTU=1500 FDDI MTU=4352 H1 R1 R2 H2