1 / 46

CST 415

IP. CST 415. Topics. IP Defined Virtual Network Internet Datagram Datagram Size and Fragmentation Time to Live Options. Virtual Network. The Internet is an abstraction away from the physical network. The IP layer sits on top the MAC/Physical layers. Packets are routed between IP peers.

natala
Download Presentation

CST 415

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP CST 415 CST 415 - Computer Networks

  2. Topics • IP Defined • Virtual Network • Internet Datagram • Datagram Size and Fragmentation • Time to Live • Options CST 415 - Computer Networks

  3. Virtual Network • The Internet is an abstraction away from the physical network. • The IP layer sits on top the MAC/Physical layers. • Packets are routed between IP peers. • It is these IP peers that make up the Internet. CST 415 - Computer Networks

  4. IP Defined Internet Protocol – Defines unreliable, connectionless delivery of packets. • Unreliable – send it and forget it. • Connectionless – the route of the packet will be defined “on-the-fly” by the network itself (e.g. routers between the source and destination). CST 415 - Computer Networks

  5. IP Defined IP Defines: • Basic unit of data transfer (IP Packet) • Packet Format. • Packet Field meaning • A routing mechanism for units of data • Rules for performing unreliable packet delivery. CST 415 - Computer Networks

  6. Internet Datagram • A Datagram is a unit of data transfer through the MAC/Physical layers. • A Datagram is encapsulated inside the data packet that is going out the physical layer. CST 415 - Computer Networks

  7. Internet Datagram The IP datagram will ride along inside the packet in the MAC Client Data field shown above. CST 415 - Computer Networks

  8. Internet Datagram v 4– Format IP Datagram Format – “Data” is where the IP Client data lies. CST 415 - Computer Networks

  9. Internet Datagram VERS – Version of the IP packet (4 in IPv4 or 6 in IPv6). HLEN – The length of the Datagram header measured in 32 bit words. Service Type – Used by routers to determine how and when to deliver a datagram. CST 415 - Computer Networks

  10. Internet Datagram Type of Service (Service Type): Precedence: Datagram precedence from 0 (normal) to 7 (network control packet). 111 - Network Control 110 - Internetwork Control 101 - CRITIC/ECP 100 - Flash Override 011 - Flash 010 - Immediate 001 - Priority 000 - Routine CST 415 - Computer Networks

  11. Internet Datagram Type of Service (Service Type): D - Bit 3: 0 = Normal Delay, 1 = Low Delay. T - Bit 4: 0 = Normal Throughput, 1 = High Throughput. R - Bit 5: 0 = Normal Reliability, 1 = High Reliability. Bit 6-7: Reserved for Future Use. CST 415 - Computer Networks

  12. Internet Datagram Type of Service (Service Type): The TOS field may also be interpreted as a “Codepoint” A Codepoint is a value that will map to some underlying service definition. (e.g.) _____________________________________________________________________ Name Value IIH LSP SNP Status _____________________________________________________________________ Area Addresses 1 y y n ISO 10589 IIS Neighbors 2 n y n ISO 10589 ES Neighbors 3 n y n ISO 10589 IP Intf. Address 132 y y n RFC 1195 Illegal 133 n n n RFC 1195 (not used) Router ID 134 n y n IETF-draft … etc. CST 415 - Computer Networks

  13. Internet Datagram Total Length: • Total Length is the length of the datagram, measured in octets, including internet header and data. • This field allows the length of a datagram to be up to 65,535 octets. • All hosts must be prepared to accept datagrams of up to 576 octets (whether they arrive whole or in fragments). • It is recommended that hosts only send datagrams larger than 576 octets if they have assurance that the destination is prepared to accept the larger datagrams. CST 415 - Computer Networks

  14. Internet Datagram Identification: An identifying value assigned by the sender IP layer to aid in assembling the fragments of a datagram. Flags: Various Control Flags. Bit 0: reserved, must be zero Bit 1: (DF) 0 = May Fragment, 1 = Don't Fragment. Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments. 0 1 2 +---+---+---+ | | D | M | | 0 | F | F | +---+---+---+ CST 415 - Computer Networks

  15. Internet Datagram Fragment Offset: • Relevant if the IP layer has actually fragmented a packet. • This field indicates where in the datagram this fragment belongs. • The fragment offset is measured in units of 8 octets (64 bits). The first fragment has offset zero. CST 415 - Computer Networks

  16. Internet Datagram Time to Live: • This field indicates the maximum time the datagram is allowed to remain in the internet system. • If this field contains the value zero, then the datagram must be destroyed. • This field is modified in internet header processing. • The time is measured in units of seconds. • Every module that processes a datagram must decrease the TTL by at least one. • This will cause undeliverable datagrams to be discarded, and to bound the maximum datagram lifetime. CST 415 - Computer Networks

  17. Internet Datagram Protocol: • This field indicates the next level protocol used in the data portion of the internet datagram. Decimal Keyword Protocol 1 ICMP Internet Control Message 4 IP IP in IP (encasulation) 6 TCP Transmission Control 17 UDP User Datagram 37 DDP Datagram Delivery Protocol CST 415 - Computer Networks

  18. Internet Datagram Header Checksum:A checksum on the header only. Source and Destination Address: 4 octets, class A, B, or C IP address. CST 415 - Computer Networks

  19. Internet Datagram Options • May or may not be provided. • Must be implemented by all IP implementations. • There can be a number of variable options. • Options include: • Security • Route Recording • Stream Identifier (SATNET) • Internet Timestamp • …more on this later CST 415 - Computer Networks

  20. Datagram Size and Fragmentation • The ideal case for datagram transmission: • The Datagram fits into a single Ethernet frame. • The Ethernet frame remains the same size from source to destination. • Assumes the physical network type is homogeneous. • Physical packet size must never change. • Reality of the Internet dictates frame size will be different. • 10BaseT 1514 octets • ATM is 53 octets • The maximum transfer size is called MTU (Maximum Transfer Unit) CST 415 - Computer Networks

  21. Datagram Size and Fragmentation What would you choose to be a maximum Ethernet Frame size for optimal transmission? If your choose the least common size… • You fail to take full advantage of physical media that will carry large packets. • Your IP layer spends a large amount of time doing packet fragmentation and reassembly. • What will you do when a new physical layer is introduced with a smaller packet size? CST 415 - Computer Networks

  22. Datagram Size and Fragmentation If your choose the greatest common size… • You guarantee that in some physical network segment your packet may be highly fragmented. • You may adapt a large packet size for a small percentage of your overall network topology. • FDDI is a small percentage of physical network installations but has a packet size of 4470 octets per frame. • What do you do when a new physical technology is introduced with a larger greatest common size? CST 415 - Computer Networks

  23. Datagram Size and Fragmentation Reality… • The frame size is chosen based on local physical media. • This allows for optimal transmission in the local network. • Fragmentation and re-assembly only needs to be performed when a packet crosses a physical boundary (e.g. 10BaseT to ATM). CST 415 - Computer Networks

  24. Datagram Size and Fragmentation • R1 must fragment packets from a potential 1500 octet packet to a 620 octet packet. • Host B must perform reassembly of 620 octet packets to potential 1500 octet packets. CST 415 - Computer Networks

  25. Datagram Size and Fragmentation • The initial packet will be fragmented into three frames for transmission over the network shown in the previous slide. • Fragmentation will happen at R1. Reassembly will occur at Host B. CST 415 - Computer Networks

  26. Datagram Size and Fragmentation Three datagram header fields deal with packet fragmentation: • Identification : A unique identifier used to identify the original datagram the fragment came from. • Flags : • Determines if the IP layer will be allowed to fragment the packet. • What happens if a packet needs to be fragmented but is set to disallow packet fragmentation? • Determines if this is the last fragment. • An unfragmented packet will be the last fragment. • Fragment Offset : Where in the original packet did this fragment come from? CST 415 - Computer Networks

  27. Datagram Size and Fragmentation Example Fragmentation Procedure: Notation: FO - Fragment Offset IHL - Internet Header Length DF - Don't Fragment flag MF - More Fragments flag TL - Total Length OFO - Old Fragment Offset OIHL - Old Internet Header Length OMF - Old More Fragments flag OTL - Old Total Length NFB - Number of Fragment Blocks MTU - Maximum Transmission Unit IF TL =< MTU THEN Submit this datagram to the next step in datagram processing ELSE IF DF = 1 THEN discard the datagram ELSE To produce the first fragment: (1) Copy the original internet header; (2) OIHL <- IHL; OTL <- TL; OFO <- FO; OMF <- MF; (3) NFB <- (MTU-IHL*4)/8; (4) Attach the first NFB*8 data octets; (5) Correct the header: MF <- 1; TL <- (IHL*4)+(NFB*8); Recompute Checksum; (6) Submit this fragment to the next step in datagram processing; To produce the second fragment: (7) Selectively copy the internet header (some options are not copied, see option definitions); (8) Append the remaining data; (9) Correct the header: IHL <- (((OIHL*4)-(length of options not copied))+3)/4; TL <- OTL - NFB*8 - (OIHL-IHL)*4); FO <- OFO + NFB; MF <- OMF; Recompute Checksum; (10) Submit this fragment to the fragmentation test; DONE. CST 415 - Computer Networks

  28. Datagram Size and Fragmentation Example Reassembly Procedure: Notation: FO - Fragment Offset IHL - Internet Header Length MF - More Fragments flag TTL - Time To Live NFB - Number of Fragment Blocks TL - Total Length TDL - Total Data Length BUFID - Buffer Identifier RCVBT - Fragment Received Bit Table TLB - Timer Lower Bound Procedure: (1) BUFID <- source|destination|protocol|identification; (2) IF FO = 0 AND MF = 0 (3) THEN IF buffer with BUFID is allocated (4) THEN flush all reassembly for this BUFID; (5) Submit datagram to next step; DONE. (6) ELSE IF no buffer with BUFID is allocated (7) THEN allocate reassembly resources with BUFID; TIMER <- TLB; TDL <- 0; (8) put data from fragment into data buffer with BUFID from octet FO*8 to octet (TL-(IHL*4))+FO*8; (9) set RCVBT bits from FO to FO+((TL-(IHL*4)+7)/8); (10) IF MF = 0 THEN TDL <- TL-(IHL*4)+(FO*8) (11) IF FO = 0 THEN put header in header buffer (12) IF TDL # 0 (13) AND all RCVBT bits from 0 to (TDL+7)/8 are set (14) THEN TL <- TDL+(IHL*4) (15) Submit datagram to next step; (16) free all reassembly resources for this BUFID; DONE. (17) TIMER <- MAX(TIMER,TTL); (18) give up until next fragment or timer expires; (19) timer expires: flush all reassembly with this BUFID; DONE. CST 415 - Computer Networks

  29. Time to Live What would be the eventual state of the Internet if packets were never removed? Time to Live controls the life time of an individual IP packet. When Time to Live is 0, the IP layer will remove the packet from the network. CST 415 - Computer Networks

  30. Options • Not required in an IP packet. • Provides for additional functionality and control. • Consist of an option code • Possibly followed by a octet length field • Followed by the octets that comprise the option CST 415 - Computer Networks

  31. Options • Copy • If 1, options will be copied into packet fragments. • If 0, only the first fragment will have the options. CST 415 - Computer Networks

  32. Options CST 415 - Computer Networks

  33. Options CST 415 - Computer Networks

  34. Options Record Route: As the packet traverses the network, record the IP addresses of the routers the packet travels through. CST 415 - Computer Networks

  35. Options Source Route: The sender will dictate a route for a packet to take. CST 415 - Computer Networks

  36. Options Timestamp: Record the IP address and a timestamp as a packet traverses IP layers in a network. CST 415 - Computer Networks

  37. Internet Datagram IPv6 Initially, it was argued (in the early 1990s) that IPv4 was deficient in the following ways: • Voice and Video streaming • Address space With the growth in the Internet in early 1990, the number of hosts being added to the Internet doubled every 6-9 months. CST 415 - Computer Networks

  38. Internet Datagram IPv6 Since it’s inception, two other standards entered the IPv4 realm. These were: • NAT : Network Address Translation • CIDR : Classless Inter-Domain Routing The addition of NAT and CIDR to the TCP/IP protocol suite extended the address expectations until 2028. CST 415 - Computer Networks

  39. Internet Datagram IPv6 The main motivation for changing to IPv4 still remains the eventual exhaustion of the IP address space. CST 415 - Computer Networks

  40. Internet Datagram IPv6 The main consumer of IP addresses is currently Cellular IP and Mobile devices. CST 415 - Computer Networks

  41. Internet Datagram IPv6 IPv6 was originally called IPng (IP Next Generation) IPv5 was passed over due to may initial mistakes in the standard. CST 415 - Computer Networks

  42. Internet Datagram IPv6 IPv6 Provides: • Larger address space • Extended address hierarchy • Flexible header format • Improved options • Provision for future protocol extension • Support for auto-configuration and renumbering CST 415 - Computer Networks

  43. Source Address (128 bits - 16 bytes) Dest. Address (128 bits - 16 bytes) Internet Datagram v 6 – Format 1 byte 1 byte 1 byte 1 byte VERS PRIO Flow Label Payload Length Next Header Hop Limit IP Datagram Format – “Data” is where the IP Client data lies. CST 415 - Computer Networks

  44. Internet Datagram VERS – Version of the IP packet (6 in IPv6). Priority – Congestion control in IPv6. Flow Label - experimental - sender can label a sequence of packets as being in the same flow. Not present in IPv4. Payload Length: number of bytes in everything following the 40 byte header, or 0 for a Jumbogram. CST 415 - Computer Networks

  45. Internet Datagram • Next Header – Similar to the IPv4 “protocol” field - indicates what type of header follows the IPv6 header. • Hop Limit – Similar to the IPv4 TTL field (but now it really means hops, not time). CST 415 - Computer Networks

  46. Internet Datagram IPv6 Extension Headers: • Optional internet-layer information is encoded in separate headers be placed between the IPv6 header and the upper- layer header in a packet. • There are a small number of such extension headers, each identified by a distinct Next Header value. • IPv6 packet may carry zero, one, or more extension headers, each identified by the Next Header field of the preceding header. CST 415 - Computer Networks

More Related