1 Internet Networking Spring 2004 Tutorial 2 IP Checksum, Fragmentation.

Slides:



Advertisements
Similar presentations
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Advertisements

Ch 20. Internet Protocol (IP) Internetworking PHY and data link layers operate locally.
IPv4 - The Internet Protocol Version 4
IP Fragmentation. MTU Maximum Transmission Unit (MTU) –Largest IP packet a network will accept –Arriving IP packet may be larger IP Packet MTU.
Network Layer – IPv4 Dr. Sanjay P. Ahuja, Ph.D.
CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Today IP Addressing IP Header IP Fragmentation
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
1 K. Salah Module 5.2: Internet Protocol CO vs. CL protocols IP Features –Fragmentation –Routing IP Datagram Format IPv6.
Network Layer Packet Forwarding IS250 Spring 2010
1 Computer Networks IP: The Internet Protocol. 2 IP is a connection-less, unreliable network layer protocol IP provides best effort services in the sense.
IP Protocol. The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information and some control information that enables.
1 Internet Networking Spring 2005 Tutorial 2 IP Checksum, Fragmentation.
Internet Networking Spring 2003
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6.
1 Internet Networking Spring 2002 Tutorial 2 IP Checksum, Fragmentation.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Internet Protocol (IP)
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Network Layer Last Update Copyright Kenneth M. Chipps Ph.D.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 5 Internet Protocol (IP) Basics.
1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong.
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.
ECE 4110 – Internetwork Programming IP Protocol. 2 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Position of IP in TCP/IP Protocol Suite.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
The Internet Protocol Dr. Adil Yousif. 2  IP (Internet Protocol) is a Network Layer Protocol. Orientation.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.
CS 4396 Computer Networks Lab
Chapter 21 IP Encapsulation, Fragmentation, and Reassembly.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
THE CLASSIC INTERNET PROTOCOL (RFC 791) Dr. Rocky K. C. Chang 20 September
Net7: IP 協定 Internet Protocol 授課教師:雲林科技大學 張慶龍 老師.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Packet Switch Network Server client IP Ether IPTCPData.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
IP Fragmentation. MTU Maximum Transmission Unit (MTU) –Largest IP packet a network will accept –Arriving IP packet may be larger IP Packet MTU.
Network Layer & IP Protocol.
Chapter 19 Network Layer Protocols
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
IP - The Internet Protocol
7 Network Layer Part IV Computer Networks Tutun Juhana
Internet Networking Spring 2002
IP - The Internet Protocol
Internet Protocol (IP)
IP - The Internet Protocol
IP : Internet Protocol Surasak Sanguanpong
Internetworking Outline Best Effort Service Model
IP - The Internet Protocol
Net 323 D: Networks Protocols
Chapter 15. Internet Protocol
IP - The Internet Protocol
IPv4 Addressing By, Ishivinder Singh( ) Sharan Patil ( )
IP datagram fields cont.
IP - The Internet Protocol
NET 323D: Networks Protocols
Presentation transcript:

1 Internet Networking Spring 2004 Tutorial 2 IP Checksum, Fragmentation

2 IP Header Diagram Ver. Source Address IHLTOS FlagsFragment Offset Total Length Identification Destination Address OptionPadding TTLProtocolChecksum

3 IP Checksum Ensuring integrity of IP header Reducing processing time at routers. Allowing higher level protocols to choose their own checksum scheme for the data. Does not check data integrity.

4 Checksum (RFC 1071) Adjacent octets to be checksummed are paired to form 16-bit integers, and the 1's complement sum of these 16-bit integers is formed. The checksum field is cleared, the 16-bit 1's complement sum is computed over the octets concerned, and the 1's complement of this sum is placed in the checksum field.

5 Checksum To verify a checksum, the 1's complement sum is computed over the same set of octets, including the checksum field. If the result is all 1 bits, the check succeeds.

6 Checksum Insensitive to: Byte alignment insensitive. Byte order insensitive. Zero padding. Word width (2 bytes, 4 bytes, etc.). Software oriented (simple addition). Not robust (unlike CRC).

7 Example

8 Incremental Internet Checksum Updating part of the IP header data doesn’t require recomputing the entire Checksum field. (For example: when a router change the TTL field.) The technique for speed up checksum recomputing in this case is called - incremental checksum update.

9 Incremental Internet Checksum Notation: C - Old checksum. m - Old data. C’ - New checksum m’ - New data C’ = C + (-m) + m’ = C + ( m’ – m) For counting the 1's complement of the checksum ~C: ~C' = ~(C + (-m) + m') = ~C + (m - m') = ~C + m + ~m'

10 Incremental Internet Checksum Subtracting 1 from TTL field (common case) ~C’ = ~C + (m - m’) = ~C H (TTL byte is higher byte of integer) If ~C=220dH then ~C’ = 220dH H = 230dH

11 Incremental Internet Checksum Problem: In one's complement, there are two representations of zero. +0 = 0x = 0xffff. There is at least one non-zero field in the IP header, thus the checksum field can never contain 0xffff.

12 Incremental Internet Checksum Solution: Using the following equation (RFC 1624) ~C'=~(C+(-m)+m')=~(C+~m+m') Thus: ~C'=~(0x22d0+0xaaaa+0x3285)= 0xdd2f+0x5555+0xcd7a=~(0xffff)= 0x0000

13 IP Fragmentation The internet is used to connect network from different technologies. In particular every technology has its own maximum packet size. This maximum packet size is called MTU (Maximum Transfer Unit). In Ethernet the MTU is 1514 bytes. Large IP packets may traverse network in which the MTU is smaller than the packet sized. These packets must be fragmented.

14 IP Fragmentation IP fragmentation is done in the entry point of the (physical) network that requires the fragmentation. IP layer automatically performs fragmentation of a datagram when its too large to be sent on physical network. A datagram could be fragmented more than one time. Fragments are counted in units of 8 octets. Reassemble is done in the IP layer at the destination. Transparent to upper protocol.

15 IP Fragmentation Ver. Source Address IHLTOS FlagsFragment Offset Total Length Identification Destination Address OptionPadding TTLProtocolChecksum

16 Identification field Unique integer that identifies the datagram The originator of the IP packet (i.e. the source) sets the identification field to a value that must be unique for that source- destination pair and protocol for the time the datagram will be active in the internet system. Implemented by counter, which increments by one. Ensures that fragments of different datagrams are not mixed.

17 Fragment Offset Tells the receiver the position of a fragment in the original datagram. Identifies the fragment location, relative to the beginning of the original unfragmented datagram. The fragment offset and length determine the portion of the original datagram covered by this fragment. The fragment offset is measured in units of 8 octets (64 bits). Enables Additional fragmentation. This is not include the length of the IP header. Reason: 13 bits are used to map 16 bits (IP length). The first fragment has offset zero.

18 Flag Bit 0: reserved, must be zero. Bit 1: (DF) 0 = May Fragment, 1=Don't Fragment. If is set, then internet fragmentation of this datagram is NOT permitted If fragmentation required, but this bit is set than the packet is discarded and ICMP is returned. Bit 2: (MF) 0 = Last Fragment, 1=More Fragments. Set if the datagram is not the last fragment.

19 Fragmentation - Example Datagram header Data octets Data octets Data octets Datagram header Data octets Datagram header Data octets Data octets Datagram header Fragment 1 offset = 0 Fragment 2 offset = 75 Fragment 3 offset = 150 b a

20 Fragmentation Fragmentation must be supported by every IP entities (routers, host, etc.). Fragmentation should be avoided. Loss of one fragment requires retransmission of the entire packet. Advanced IP forwarding entities (e.g HW based forwarding entities) does not support IP fragmentation (i.e. IP fragmentation is an exception). MTU discovery protocol (RFC 1191) that uses the DF bit, is used to avoid the necessity of IP fragmentation.