Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.

Slides:



Advertisements
Similar presentations
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
Advertisements

CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
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.
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Internet Protocol (IP)
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 5-1 Internet Protocol (IP): Packet Format, Fragmentation, Options Shivkumar Kalyanaraman Rensselaer.
Network Layer Packet Forwarding IS250 Spring 2010
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
Oct 19, 2004CS573: Network Protocols and Standards1 IP: Datagram and Addressing Network Protocols and Standards Autumn
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Internet Protocol (IP)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 5 Internet Protocol (IP) Basics.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong.
Dr. John P. Abraham Professor UTPA
Internet Protocol --- Connectionless Datagram Delivery Linda Wu (CMPT )
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
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.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
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
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
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.
Chapter 8 Internet Protocol (IP)
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
1 ECE4110 Internetwork Programming Introduction and Overview.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
IPv4 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. Datagram Fragmentation Checksum Options Topics.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IP Fragmentation. MTU Maximum Transmission Unit (MTU) –Largest IP packet a network will accept –Arriving IP packet may be larger IP Packet MTU.
Chapter 19 Network Layer Protocols
IP - The Internet Protocol
7 Network Layer Part IV Computer Networks Tutun Juhana
Chapter 7: The Infamous IP
IP - The Internet Protocol
Internet Protocol Version4
Internet Protocol (IP)
Chapter 20 Network Layer: Internet Protocol
Internet Protocol Version4
IP - The Internet Protocol
Chapter 7: The Infamous IP
Dr. John P. Abraham Professor UTPA
IP : Internet Protocol Surasak Sanguanpong
EEC-484/584 Computer Networks
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Net 323 D: Networks Protocols
IP - The Internet Protocol
Internet Protocol (IP)
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
NET 323D: Networks Protocols
32 bit destination IP address
Presentation transcript:

Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source IP Address Destination IP Address Options (if IHL > 5) M F D F

2 IP Header: ( IPV4) 20 Bytes (Bits) VersionIHL Type of Service Total Length Identification Flags Fragment Offset Time to Live ProtocolHeader Checksum Source Address Destination Address Options + Padding

3 IP Header Details: Version ( 4 Bits ) - version number now is 4 Internet Header Length (IHL) (4 Bits) - length of IP header in 32 bit words. Minimum value is 5 for a minimum header of 20 bytes. When option field max size, IHL = 15 Type of service (8 bits) 3 Bits Precedence 4 Bits TOS One Bit Not used at present 0000 normal service 0001 minimize cost 0010 maximize reliability 1000 minimize delay Total Length (16 Bits) - Total IP datagram length in bytes including IP header. Maximum length value is = 65,535

4 It is possible to have an IP datagram that is too big for some networks. For example, the Maximum Transfer Unit (MTU) of data that may be encapsulated into an ethernet frame is 1,500 bytes. If we have an IP datagram larger than this, we will have to fragment the datagram. This means breaking the datagram into smaller pieces. The header is copied for use in every fragment. The flags, fragmentation offset, and the total length fields are set to new values in each fragment. Identification (16 Bits) - a sequence number. Counter in the source machine keeps track of how many IP datagrams it has sent. This value is copied into the identification field. Fragments all have the same identification number. Flags ( 3 Bits ) More Bit - when datagram is fragmented this bit indicates if this is the last fragment. A value of one indicates there are more fragments, a value of zero means this is the end. Do not fragment bit - do not fragment if this bit is a one Unused bit Fragment Offset (13 Bits) - where in the original datagram this fragment belongs measured in 64 bit units. This means divide the offset location in bytes by 8 to get the value in the header. Conversely multiply the value you see in a header before you use it. Since offset field is only 13 bits, use this divide/multiply by 8 method to allow larger than offsets

5 Example: Given a 3,500 byte IP datagram and an ethernet network with an Maximum Transfer Unit = 1,500 bytes. Assume there are no options included in the 20 byte IP header. We have 3,500 total bytes – 20 header bytes = 3,480 data bytes to transport. The MTU limit = 1,500 so the largest a data payload may be is 1,500 – 20 header = 1480 The amount of data we carry must be a multiple of 8 because of the offset field definition. 184 * 8 = 1, * 8 = 1, * 8 = 1,488 We should choose 1,480 data bytes in the first segment so that the total size is 1480 data plus 20 header = 1,500 which is equal to or less than the MTU of 1,500. The offset field will have the value 0, the more flag will be equal to 1. The second datagram will also carry 1,480 bytes with the offset field equal to 1480/8= 185. The more flag will be equal to 1 The third datagram will carry the remaining 3,480 – (1, ,480) = 520 bytes. It will be carried in an IP datagram with Overhead bytes = 540 bytes. The offset field will be (1,480+1,480) / 8 )=370, and the more flag will equal 0.

6 In the event a fragment is itself fragmented, then the offset value used is relative to the original datagram prior to any fragmentation. Example: Suppose that second datagram in the previous example (which is 1,500 bytes in size) is further fragmented into two fragments because we encounter a smaller MTU = 766. The resulting new fragments for the second fragmented datagram from our original example are: For an MTU of 766 we may have a max of 766 – 20 overhead = 746 data bytes. 746/8 = so we should use 93*8 = 744 data bytes in one new segment, leaving 1480 total data – 744 in one segment = 736 data left for next segment. So First additional segment has = 764 bytes total, offset value = same old start of 185 from before. Next additional segment has = 756 bytes total, new offset = /8 = = 278. Note that the offset value is relative to the relative position of the data to the original (source) data.

7 IP Header Details: Time To Live (8 Bits) - how long datagram exists usually done by hop count. Every router decreases TTL by at least one. Protocol (8 Bits) - indicates next higher level protocol IE TCP, UDP, ICMP, IGMP, etc 1 ICMP Internet Control Message Protocol 2 IGMP Internet Group Message Protocol 6 TCPTransmission Control Protocol 17 UDP User Datagram Protocol 41 IPV6 89 OSPF Open Shortest Path First Routing Protocol IP Header Checksum (16 Bits ) - applied to header only. At the sender the checksum field is first set to zero, then the header is divided into 16 bit pieces. These pieces are added together using one’s complement arithmetic with a result that is also 16 bits long. The sum is complemented (inverted). This is the check sum value put in the datagram header. At the receiver, the 16 bit pieces are once again added using ones complement arithmetic. If there are no errors in the header, the complemented result will be all zeros.

8 IP Checksum Calculation Example: Given the following IP Header, calculate the IP checksum value You are calculating this , 5, and and 0 16 and and and 0 1 and 1 0 and 0 SUM CHECKSUM (This example had a 1 end around carry added back to the solution)

9 Source Address - (32 Bits ) Destination Address - (32 Bits ) Options (Variable) Padding (Variable) - used so header always multiple of 4 Bytes. Data (Variable) - max length including header 65, 535 Option bytes may or may not exist. If they do exist they look like this:

10 IP Options: Single Byte: No Operation End of Options Multiple Byte Varying in Length: Record Route Strict Source Routing Loose Source Routing Timestamp

11 Copy 1 BitLength 8 bitsData field is of variable lengthClass 2 bitsType 5 bits The Copy Bit: 0 Copy only in the first fragment 1 Copy into all fragments The Class Bits: 00 Datagram Control 10 Debugging and Management The Type Bits: End of Operation No Operation Loose Source Routing Timestamp Record Route Strict Source Route Code Field

12 Example Loose Source Route Option: NO OP Total LengthInteger Pointer Value Code Field First IP address Second IP address Last IP address Note that these 4 byte words would be appended to the end of the IP header just before the data. That is where options are put. A No Operation byte is a filler byte to make it so that options are always a multiple of 4 bytes. Pointer is an integer number to the first empty byte in this option field. Makes more sense in an option that fills in fields as you go along.