Chapter 7: The Infamous IP

Slides:



Advertisements
Similar presentations
Ch 20. Internet Protocol (IP) Internetworking PHY and data link layers operate locally.
Advertisements

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.
U N I T - 3.
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
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
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.
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
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.
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.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 18 Introduction to Networks and the Internet.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
1 Kyung Hee University Chapter 7 Internet Protocol Version 4 (IPv4)
Chapter 21: IP Encapsulation, Fragmentation & Reassembly
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 5 Internet Protocol (IP) Basics.
Dr. John P. Abraham Professor UTPA
Internet Protocol --- Connectionless Datagram Delivery Linda Wu (CMPT )
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.
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.
CS 4396 Computer Networks Lab
Chapter 20 Network Layer: Internet Protocol
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
Chapter 7: The Infamous 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.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
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.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to TCP/IP networking
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
IP - The Internet Protocol
7 Network Layer Part IV Computer Networks Tutun Juhana
Chapter 8: Internet Protocol (IP)
IP - The Internet Protocol
Internet Protocol Version4
Chapter 20 Network Layer: Internet Protocol
Internet Protocol Version4
IP - The Internet Protocol
Chapter 7: The Infamous IP
Dr. John P. Abraham Professor UTPA
Chapter 20 Network Layer: Internet Protocol
Chapter 5 Addressing Dr. Clincy Lecture.
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
Chapter 7 Internet Protocol Version 4 (IPv4)
Internet Protocol (IP)
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
NET 323D: Networks Protocols
Presentation transcript:

Chapter 7: The Infamous IP Dr. Clincy Lecture

Position of IP in TCP/IP protocol suite Packets in the IP layer are called datagrams IP is an unreliable and connectionless datagram protocol To make IP reliable, TCP protocol is added Dr. Clincy Lecture

IP datagram IP datagram is variable length consisting of two parts (header, data) Header is 20-60 bytes & contains routing and deliver info Ver – version of IP HLEN – header length – total length of the header field (in 4-byte words or units) Service type – now called Differentiated Services – tells the service type (ie. ftp, dns, telnet, etc..) – will come back to this Total length – defines the total length of the datagram including the header – need this to determine if padding is needed – recall Ethernet frame can range 46-1500 bytes – so if the IP datagram is less than 46 bytes (need padding) Identification – used for fragmentation – networks that are not able to encapsulate the full IP datagram will need to fragment – will come back to this Flags – used for fragmentation – will come back to this Fragmentation offset – used for fragmentation – will come back to Time to live – datagram life time as it travels – used to control the number of hops (routers) a datagram can traverse – fix infinite loop problems Protocol – defines the higher level protocol (ie. TCP, UDP, ICMP, ICMP, etc..) that’s using the service of the IP layer – since the IP Muxes data from the Transport layer – this field is used to demux Dr. Clincy Lecture

IP datagram Header cont… Header Checksum – error checking (will cover later) Source Address – IP address of the source (remain unchanged as data traverses) Destination Address - IP address of the destination (remain unchanged as data traverses) Option – are not required for every datagram – used for network testing and debugging – will cover in more detail later Dr. Clincy Lecture

FRAGMENTATION Recall we stated that networks that are not able to encapsulate the full IP datagram will need to fragment As the datagrams travel through the network hitting various Routers – the router “decapsulates” the IP datagram from the frame The router then processes it Then the router encapsulates it in another frame This is how routers are able to communicate with various networks Router 1 Router 2 Network 1 Network 2 Network 3 Dr. Clincy Lecture

MTU Each Data Link Protocol has it own frame format – one field defines the max size of the data field – when datagram is encapsulated, the total size of the datagram must not exceed that max size (why ??? - HW/SW limitations of the physical network) That value is called a MTU (maximum transfer unit) The largest possible MTU is 65,535 and if this is used – it makes the IP protocol independent of the underlying physical network If any other MTU is used, there will be cases possibly where the datagram needs to be fragmented in order to pass through that network As it passes through the network, a previous fragment can be fragmented again if that physical network has a smaller MTU Dr. Clincy Lecture

Flag field Fields related to the fragmentation are the ID field, flags field and fragmentation offset field Id – combo of the Id and source Ip address (IP protocol used a counter to label datagram) Flags: 1st reserved, if D set, can’t fragment (must drop if can’t pass), if D=0, can fragment. If M is set, means more fragments exist Fragment offset – shows relative position of the fragment with respect to the whole datagram Dr. Clincy Lecture

Fragmentation example Take a datagram of original size 4000 bytes (byte 0 to 3999) and fragment it into 3 fragments The fragment offset is measured in units of 8 bytes. So the first offset would be 0/8=0 since the starting byte position is 0 The second starting byte position is 1400 and therefore the offset is 1400/8= 175 The third starting byte position is 2800 and therefore the offset equals 2800/8=350 This is done to ensure the offset can fit in the 13-bit field Routers/Hosts that fragment must pick a size of each fragment so that the 1st byte is divisible by 8 (ie. 0, 8, 16, 24 ……696 …… 1400 …….. 2096 ……… 2800 … etc) Dr. Clincy Lecture

Total Length Id isn’t changing Detailed example Total Length Id isn’t changing Allow “more” fragmentation XDM D=1, can’t frag D=0, can frag M=1, more frag exist M=0, no more frag exist offset Dr. Clincy Lecture

Re-assembly Even if the fragments arrived to the destination out-of-order, the destination host could reassemble by: The 1st fragment always has an offset of zero If the 1st fragment’s length is divided by 8, it equals to the 2nd fragment’s offset If the 1st and 2nd fragments’ total length are divided by 8, it equals to the 3rd fragment’s offset Continue … The last fragment’s “more” bit should be set to 0 – meaning no more fragments remaining Dr. Clincy Lecture

Recall - IP datagram IP datagram is variable length consisting of two parts (header, data) Header is 20-60 bytes & contains routing and deliver info Haven’t covered options yet Option – are not required for every datagram – used for network testing and debugging – will cover in more detail later Dr. Clincy Lecture

Option format Composed of a 1-byte code field, a 1-byte length field and a variable-sized data field Length field defines the total length of the option (including the code field) Data field contains the data of the specific option – some option types don’t require data Code field is 8-bits long and contains 3 subfields: copy, class and number Copy: controls presence of option. If 0, means copy options to the first fragment only; if 1, means copy option to all fragments Class: defines general purpose of options. If 00, options is used for datagram control; if 10, options used for management and debugging. Number: defines the type of option. As of now, only 6 types defined Dr. Clincy Lecture

Regarding the Number field Number: defines the type of option. As of now, only 6 types defined 2 of the option types are 1-byte in size (doesn’t need length and data fields) 4 of the options are multiple-byte and require the length and data fields Used as a filler between options (using a 16-bit or 32-bit boundary) – know the starting point of the next option Used at the end of the last option for padding Record the Internet routers that can handle the datagram ( can list up to 9 router IP addresses) Used by the source to predetermine a route for a datagram as it traverses Used by the source to predetermine a route too (but more relaxed than the Strict Source Route Option) Record the time the datagram is processed by a router Dr. Clincy Lecture

Regarding the Record route option The Tx creates a placeholder for the visited routers to fill in their IP addresses The pointer field is used to point to the first empty entry so the router knows where to enter it’s outgoing IP address (address the datagram is leaving) Dr. Clincy Lecture

Record route concept Can have only 3 IP addresses because of 12+3=15 Outgoing IP address Pointer field value of 4 when starting out Increment pointer Dr. Clincy Lecture

Regarding the Strict source route option Option used by the source to predetermine a route for the datagram as it traverses the Internet In this case, the routers are specified up front in dictating the specific route. All routers MUST be visited – if other routers are visited, the datagram is dropped) – if all of the listed routers are not visited, the datagram is dropped Routers are entered by the sender Why: security, distinguish among different networks, don’t want certain traffic to leave your network, etc. Dr. Clincy Lecture

Loose source route option Similar to the Strict Source Route Option but more relaxed In this case, the routers are specified up front and all MUST be visited ( however, other routers can be visited too) Dr. Clincy Lecture

Timestamp option Used to record the time of datagram processing by a router (expressed in milliseconds from midnight) Use this to track the routers’ behavior – time from one router to the next O-flow: # of routers that could not add their timestamp Flags: dictates what the router should do (ie. add timestamp, add timestamp & IP address, etc..) Dr. Clincy Lecture

CHECKSUM The error detection method used by most TCP/IP protocols is called checksum The checksum protects against bit corruption that could possibly occur during transmission Checksum calculated at the Tx and is appended with the sent data The Rx repeats the calculation in determining if the data is correct or not Give them an analogy in base-10 Dr. Clincy Lecture

To create the checksum the sender does the following: 1. The packet is divided into k sections, each of n bits (usually 16) 2. All sections are added together using one’s complement arithmetic. 3. The final result is complemented to make the checksum. Checksum process at the receiver is as follows: The received packet is divided into k sections All sections are added together 3. The final result is complemented and should equal zero if correct NOTE: value + (-value) = 0 Dr. Clincy Lecture

When to apply the checksum For IP datagram, Checksum is used on the header only (and not the data) The header needs to be check because it’s changing router-to-router (the data itself is static) Recall that the higher-level protocols encapsulate data into the datagram and uses their own checksum Dr. Clincy Lecture

Recall Binary Addition 1010 (neg 5) +0010 (pos 2) 1100 (neg 3) 1101 (neg 2) +0111 (pos 7) 10100 (overflow – add the 1 back) 0101 (pos 5) Recall complement 0011 Dr. Clincy Lecture

ROUTING IP OVER ATM The IP packet is encapsulated in cells (not just one). An ATM network has its own definition for the physical address of a device. Binding between an IP address and a physical address is attained through a protocol called ATMARP. Each Router has an IP address which associates with the packet-switch side of the network (Internet) The ATM side of the router uses its own 20-byte physical ATM address And in guiding the cells across the ATM network, Virtual Circuit Identifiers are used In a LAN case, broadcasting is used by ARP – in a ATM case, broadcasting can’t be used – another approach is needed - ATMARP Dr. Clincy Lecture