Internet Networking recitation #2 IP Checksum, Fragmentation

Similar documents
Veryx ATTEST TM. Sample Test cases Overview. Conformance Test Suite. Internet Protocol version 4 (IPv4) Part Number: T / TCLS IPv /1.

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

IP : Internet Protocol

Chapter 5 OSI Network Layer

Lecture 9: Internetworking

Internetworking Terms. Internet Structure. Internet Structure. Chapter 15&16 Internetworking. Internetwork Structure & Terms

Packet Header Formats

Ch.7 Internet Protocol: Connectionless Datagram Delivery (IPv4, IPv6)

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

ECE 461 Internetworking Fall Quiz 1

Position of IP and other network-layer protocols in TCP/IP protocol suite

EE 610 Part 2: Encapsulation and network utilities

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Internetwork Protocols

ECE4110 Internetwork Programming. Introduction and Overview

ET4254 Communications and Networking 1

ECE 461 Internetworking Fall Quiz 1

Communication Systems DHCP

Introduction to Internetworking

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Final Exam Fall 2015 Total of 120 Points. Version 1

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

RFC: 791 INTERNET PROTOCOL DARPA INTERNET PROGRAM PROTOCOL SPECIFICATION. September prepared for

Internet Protocols (chapter 18)

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

IPv4 Lecture 10a. COMPSCI 726 Network Defence and Countermeasures. Muhammad Rizwan Asghar. August 14, 2017

CIS-331 Final Exam Spring 2016 Total of 120 Points. Version 1

The Internet Protocol (IP)

CHAPTER-2 IP CONCEPTS

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

Internet Protocol version 6

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

CS519: Computer Networks. Lecture 2: Feb 2, 2004 IP (Internet Protocol)

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

IPv4. Christian Grothoff.

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Internet protocols, TCP/IP suite

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

IPv6 is Internet protocol version 6. Following are its distinctive features as compared to IPv4. Header format simplification Expanded routing and

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

CE3005: Computer Networks Laboratory 3 SNIFFING AND ANALYSING NETWORK PACKETS

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

I. More ARP Week 7. after resolving a hardware address, why not store it?

Lecture 18 Overview. Last Lecture. This Lecture. Next Lecture. Internet Protocol (1) Internet Protocol (2)

Lecture 11: Fragmentation & Addressing. CSE 123: Computer Networks Stefan Savage

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

This talk will cover the basics of IP addressing and subnetting. Topics covered will include:

SEN366 (SEN374) (Introduction to) Computer Networks

Vorlesung Kommunikationsnetze

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS

RFC: 760 IEN: 128 DOD STANDARD INTERNET PROTOCOL. January prepared for

Packetization Layer Path Maximum Transmission Unit Discovery (PLPMTU) For IPsec Tunnels

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

User Datagram Protocol

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

STEVEN R. BAGLEY PACKETS

Module 28 Mobile IP: Discovery, Registration and Tunneling

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

The Internetworking Problem. Internetworking. A Translation-based Solution

CH. 3 IP FORWARDING AND ROUTING

Request for Comments: 2004 Category: Standards Track October Minimal Encapsulation within IP. Status of This Memo

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CSCI Networking Name:

b. Suppose the two packets are to be forwarded to two different output ports. Is it

The Internet. The Internet is an interconnected collection of netw orks.

TSIN02 - Internetworking

7th Slide Set Computer Networks

Chapter 5 Network Layer

CSCI-1680 Network Layer: IP & Forwarding John Jannotti


CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Network Protocols. Internet Protocol (IP) TDC375 Autumn 2010/11 John Kristoff - DePaul University 1

L10: Simple Internetworking. Hui Chen, Ph.D. Department of Engineering & Computer Science Virginia State University Petersburg, VA 23806

IPv6: An Introduction

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

Network and Security: Introduction

Dongsoo S. Kim Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

Introduction to Internet. Ass. Prof. J.Y. Tigli University of Nice Sophia Antipolis

Introduction to TCP/IP networking

Chapter 20 Network Layer: Internet Protocol 20.1

Computer Networking Concept

CIS-331 Final Exam Spring 2015 Total of 115 Points. Version 1

Lecture 8. Network Layer (cont d) Network Layer 1-1

K2289: Using advanced tcpdump filters

Lesson 3. IPv4 and IPv6 Protocols. Chapter-4 L03: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

CS 458 Internet Engineering Spring First Exam

Network Layer/IP Protocols

Transcription:

Internet Networking recitation #2 IP Checksum, Fragmentation Winter Semester 2012, Dept. of Computer Science, Technion 1

IP Header Diagram Ver. IHL TOS Total Length Identification Flags Fragment Offset TTL Protocol Checksum Source Address Destination Address Options Padding 2

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

Checksum (RFC 1071) Adjacent octets to be checksummed are paired to form 16-bit words. The checksum field is cleared. The 16-bit 1's complement sum is computed over the 16-bit words Any overflows are added to the sum. The 1's complement of this sum is placed in the checksum field. 4

Checksum verification 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. 5

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

Example 7

Incremental Checksum Update (RFC 1141) 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. 8

Notation: Incremental Checksum Update C - Old 1 s complement sum. m - Old data. C - New 1 s complement sum. m - New data. C = C + (-m) + m = C + ( m m) The checksum is the 1 complement of C : ~C' = ~(C + (-m) + m') = ~C + (m - m') = ~C + m + ~m Note, the second equality does not work if the sum in the brackets is 0xFFFF (see RFC 1624). 9

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

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. 11

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. 12

IP Fragmentation Ver. IHL TOS Total Length Identification Flags Fragment Offset TTL Protocol Checksum Source Address Destination Address Options Padding 13

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 sourcedestination 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. 14

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. It does 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. 15

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. 16

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

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. 18