1 / 75

Chapter 4 Internet Protocol-Part 1, IPv4

Chapter 4 Internet Protocol-Part 1, IPv4. Unreliable and Best Effort Delivery. IP does not guarantee that it will handle the problems of: Datagram duplication Delayed or out-of-order delivery Corruption of data Datagram loss. Therefore, additional layers of protocol software are needed

vicky
Télécharger la présentation

Chapter 4 Internet Protocol-Part 1, IPv4

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. Chapter 4 Internet Protocol-Part 1, IPv4 Unreliable and Best Effort Delivery • IP does not guarantee that it will handle the problems of: • Datagram duplication • Delayed or out-of-order delivery • Corruption of data • Datagram loss Therefore, additional layers of protocol software are needed to handle each of these errors. The major reason is that we don’t want IP to be too complicated.

  2. Chapter 4 Internet Protocol-Part 1, IPv4 IP provides three important definitions: 1. The IP protocol defines the basic unit of data transfer used throughout a TCP/IP internet. (packet formating) 2. IP software performs the routing function, choosing a path over which data will be sent. (routing, forwarding) 3. IP includes a set of rules that embody the idea of unreliable packet delivery. The rules characterize how hosts and routers should process packets, how and when error messages should be generated, and the conditions under which packets can be discarded. (error handling)

  3. Chapter 4 Internet Protocol-Part 1, IPv4 TCP/IP protocols use the name IP datagram to refer to an internet packet. IP header Datagram data area General form of an IP datagram The amount of data carried in a datagram is not fixed. It can be a single octet of data or at most 64K octets, including the header. A datagram header contains information to route the datagram across the internet.

  4. Chapter 4 Internet Protocol-Part 1, IPv4 Datagram Format 0 3 8 15 19 31 version IHL Type of Service Total length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options + Padding Data

  5. Chapter 4 Internet Protocol-Part 1, IPv4 The IP Datagram Header Format • TIME TO LIVE: measure in 1-second increments. • PROTOCOL: the next level protocol that is to receive • the data field at the destination. • SOURCE and Destination IP ADDRESS: 32 bits • IP OPTIONS (VARIABLE): encodes the IP options • requested by the sender. • Record route option • Source route options • Timestamp option • PADDING (VARIABLE): used to ensure that the internet • header ends on a 32-bit boundary. • DATA (VARIABLE): a multiple of eight bits in length.

  6. Chapter 4 Internet Protocol-Part 1, IPv4 TTL: Each router along the path from source to destination is required to decrement the TTL by 1 when it processes the datagram header. Furthermore, each router records the local time when the datagram arrives, and decrement the TTL by the number of seconds the datagram remained inside the router waiting for service. Header checksum: by treating the header as a sequence of 16-bit integers, adding them together using 1's complement arithmetic, and then taking the 1's complement of the result. In computing, field Header checksum is assumed to be 0.

  7. Chapter 4 Internet Protocol-Part 1, IPv4 0 1 2 3 4 5 6 7 0 1 2 0 DF MF Precedence D T R M 0 • Precedence • 111 Network Control • 110 Internetwork Control • 101 CRITIC/ECP • 100 Flash Override • 011 Flash • 010 Immediate • 001 Priority • 000 Routine DF 0 May Fragment 1 Don't Fragment MF 0 Last Fragment 1 More Fragment • Delay, Monetary cost • 0 Normal • 1 Low • Throughput, Reliability • 0 Normal • 1 High (Only 1 of these 4 bits can be turned on.)

  8. Chapter 4 Internet Protocol-Part 1, IPv4

  9. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) • Constraints on design • These earlier attempts at differentiated service make clear the design constraints on a standard for the Internet. They are: • Deployability in small steps, with a degree of backward compatibility, including interoperability with IP precedence and with the IntServ/RSVP model.

  10. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) • Minimal overhead on backbone and trunk routers. Specifically, the standard must not require these routers to store information about an individual traffic flow or treat a particular flow in a special way. (Of course, it must allow different types of flows to be handled in different ways.)

  11. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) • Separation of real-time traffic from the TCP-like traffic that reacts to congestion by slowing down and retransmitting undelivered packets. • The ability for Internet service providers to offer different grades of service to different customers. • Inclusion of management facilities, not least the ability of network operators to assign and monitor the use of resources.

  12. Best-effort service is insufficient from many perspectives Multimedia applications require some sort of delay and bandwidth guarantees Some VIP users can pay more for better service Packet forwarding routers are bottleneck advanced switching technique layer 3, layer 4, and higher? Chapter 4 Internet Protocol-Part 1, IPv4 Existing Internet Services

  13. Support per-flow end-to-end QoS Guaranteed service Controlled-load service RSVP signaling protocol soft state receiver initiated reservation Chapter 4 Internet Protocol-Part 1, IPv4 Integrated Service (IntServ)

  14. RSVP per-flow signaling and state is too much Can core routers do switching? How to integrate with ATM? Chapter 4 Internet Protocol-Part 1, IPv4 Some Concerns with IntServ

  15. Provide different levels of service with scalability Mark packets according to their service requirement (DS codepoint) Based on the mark, core routers apply differentiated per-hop forwarding behavior (PHB) (active queue management) Only a limited number of PHB’s is defined, so traffic aggregation is required Edge routers do the heavy job: traffic classification (marking), conditioning, ... Chapter 4 Internet Protocol-Part 1, IPv4 What is Differentiated Service

  16. Chapter 4 Internet Protocol-Part 1, IPv4 Traffic Aggregates

  17. Features Keep the forwarding simple Push complexity to edges of network Provide differentiated services Provide service without assumption of traffic using it Provide service long-term and short-term provision Allow the best effort traffic dominates the Internet Chapter 4 Internet Protocol-Part 1, IPv4 What is Differentiated Service

  18. Chapter 4 Internet Protocol-Part 1, IPv4 RSVP vs DiffServ Source: Ben Teitelbaum, QBone Architecture

  19. Simpler than RSVP/IntServ no per-flow signaling or state More efficient core routers limited number of service classes Range of different packet handling services and mapping possible Supports VPNs Ipsec ESP leaves the IP header un-encrypted Chapter 4 Internet Protocol-Part 1, IPv4 Why Differentiated Service

  20. Chapter 4 Internet Protocol-Part 1, IPv4 Why Differentiated Service Source: Chris Metz

  21. Chapter 4 Internet Protocol-Part 1, IPv4 Quality of Service Approaches Source: Chris Metz

  22. Chapter 4 Internet Protocol-Part 1, IPv4 DiffServ Architecture Source: Ben Teitelbaum, QBone Architecture

  23. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) The differentiated-services model uses the most-significant 6 bits (0­5) from the type-of-service or traffic class octet, defined identically for the old IPv4 and the new IPv6. Known as the Differentiated Services Code Point (DSCP), this 6-bit field indicates how each router should treat the packet. To emphasize the fact that the router need not store information about what the ultimate provider and consumer of the data are doing (so-called session information), this treatment is known as a per-hop behavior (PHB). On the Internet, the transmission of a data packet between two routers is only one leg, or hop, in its journey, and a per-hop behavior defines how an individual router will treat an individual packet when sending it over the next hop through the network.

  24. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Six bits of the DS field are used as a codepoint (DSCP) to select the PHB a packet experiences at each node. A two-bit currently unused (CU) field is reserved. The value of the CU bits are ignored by differentiated services-compliant nodes when determining the per-hop behavior to apply to a received packet. The DS field structure is presented below: 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | DSCP | CU | +---+---+---+---+---+---+---+---+ DSCP: differentiated services codepoint CU: currently unused

  25. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Being 6 bits long, the differentiated-services code point can have one of 64 different binary values and each one can be defined as calling for a unique per-hop behavior. Many experts believe that 64 different behaviors are more than will ever be needed but, to allow for all eventualities, some of the 64 possible values are reserved for local or experimental use.

  26. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Implementors should note that the DSCP field is six bits wide. DS- compliant nodes MUST select PHBs by matching against the entire 6-bit DSCP field, e.g., by treating the value of the field as a table index which is used to select a particular packet handling mechanism which has been implemented in that device. The value of the CU field MUST be ignored by PHB selection. The DSCP field is defined as an unstructured field to facilitate the definition of future per-hop behaviors.

  27. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) When a packet arrives, a router has a new job to do in addition to deciding which output port to send the packet to. In concept, the router will use the code point to select one of 64 possible subroutines that will manage the handling of the packet at its output port. What the subroutine actually does will depend on the definition of the per-hop behavior for the particular code point. For example, the subroutine might instruct the router to put the packet at the front of the queue at the output port, thereby giving it highest priority, or at the back of the queue, giving it the lowest.

  28. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) It is a basic feature of DiffServ that every packet must be classified, that is, it must have a suitable value inserted in its differentiated-services code point field. The value can be inserted in either of two places: the original source of the traffic or at a router.

  29. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Inserting the code point at the original source of the traffic, such as a Web server or IP telephony gateway, has a distinct advantage. The server or gateway in question can have explicit knowledge of the application in use, and can therefore mark packets in an application-dependent way.

  30. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) One alternative is to have the traffic classified and marked by a router--say, the first encountered by the traffic or the one at the boundary between customer and Internet service provider. The advantage here is that no change is needed to servers. But the router requires some extra "smarts." Fortunately, many routers have a very similar capability already, for use with IntServ/RSVP. DiffServ needs this extra logic only in the boundary routers, and thereby avoids the performance overhead suffered by IntServ on backbone trunks.

  31. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Four overall types of per-hop behaviors have been defined as standard so far. They are default, class-selector, expedited forwarding, and assured forwarding. For default behavior, the code point value is zero and the service to be expected is exactly what is provided by today's Internet service, with its completely uncontrolled traffic congestion and packet loss.

  32. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) The RECOMMENDED codepoint for the Default PHB is the bit pattern ' 000000'; the value '000000' MUST map to a PHB that meets these specifications. The codepoint chosen for Default behavior is compatible with existing practice [RFC791]. Where a codepoint is not mapped to a standardized or local use PHB, it SHOULD be mapped to the Default PHB. A packet initially marked for the Default behavior MAY be re-marked with another codepoint as it passes a boundary into a DS domain so that it will be forwarded using a different PHB within that domain, possibly subject to some negotiated agreement between the peering domains.

  33. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) For class-selector behaviors, there are seven code point values, running from 001000 to 111000 and selecting up to seven ranked behaviors. Each behavior has at least as good a probability of timely forwarding as its predecessor in the ranking, if not a better one. Note that the default behavior plus the class selectors exactly mirror the original eight IP precedence values, thereby providing compatibility with that scheme.

  34. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) We refer to a Class Selector Codepoint with a larger numerical value than another Class Selector Codepoint as having a higher relative order while a Class Selector Codepoint with a smaller numerical value than another Class Selector Codepoint is said to have a lower relative order. The set of PHBs mapped to by the eight Class Selector Codepoints MUST yield at least two independently forwarded classes of traffic, and PHBs selected by a Class Selector Codepoint SHOULD give packets a probability of timely forwarding that is not lower than that given to packets marked with a Class Selector codepoint of lower relative order, under reasonable operating conditions and traffic loads.

  35. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Expedited forwarding (EF) behavior has a recommended differentiated-services code point value of 101110. The departure rate of EF traffic is defined as necessarily equaling or exceeding a configurable rate. EF is intended to allow the creation of real-time services with a configured throughput rate for the services' data packets.

  36. Chapter 4 Internet Protocol-Part 1, IPv4 Differential Service (redefine the TOS octet) Assured forwarding (AF) behavior actually consists of three sub-behaviors, which for convenience may be called AF1, AF2, and AF3. When the network is congested, packets marked for AF1 have the lowest probability of being discarded by any router, and packets marked for AF3 have the highest. Thus, within the AF class, differential drop probabilities are available; otherwise, the class represents a single type of per-hop behavior. The standard actually defines four independent AF classes. Quite complex service offerings can be constructed using AF behaviors, and much remains to be understood about them.

  37. Chapter 4 Internet Protocol-Part 1, IPv4 Maximum transfer unit (MTU): the amount of data that can be transferred in one physical frame Limiting datagrams to fit the smallest possible MTU in the internet makes transfers inefficient when those datagrams pass across a network that can carry larger size frames. However, allowing datagrams to be larger than the minimum network MTU in an internet means that a datagram may not always fit into a single network frame.

  38. Chapter 4 Internet Protocol-Part 1, IPv4 The choice should be obvious: the point of the internet design is to hide underlying network technologies and make communication convenient for the user. Thus, TCP/IP software chooses a convenient initial datagram size and arranges a way to divide large datagrams into smaller pieces when the datagram needs to traverse a network that has a small MTU. The small pieces are called fragments, and the process of dividing a datagram is known as fragmentation.

  39. Chapter 4 Internet Protocol-Part 1, IPv4 Host A Host B Net 1 MTU=1500 Net 2 MTU=1500 Net 2 MTU=620 R1 R2 R1 and R2 must both do the fragmentation. Fragments must be reassembled to produce a complete copy of the original datagram before it can be processed at the destination. (By whom?)

  40. Chapter 4 Internet Protocol-Part 1, IPv4 The IP protocol does not limit datagrams to a small size, nor does it guarantee that large datagrams will be delivered without fragmentation. Fragmentation and reassembly occur automatically without the source taking special action. The IP specification states that routers must accept datagrams up to the maximum of the MTUs of networks to which they attach. In addition, a router or a host must always handle datagrams of up to 576 octets.

  41. Chapter 4 Internet Protocol-Part 1, IPv4 Fragmentation Example Data 1 600 octets Datagram header Data 2 600 octets Data 3 200 octets Frag 1 header Data 1 Offset=0, more=1 Frag 2 header Data 2 Offset=600/8, more=1 Frag 3 header Data 3 Offset=1200/8, more=0

  42. Chapter 4 Internet Protocol-Part 1, IPv4 Should a datagram be reassembled after passing across one network, or should the fragments be carried to the final host before reassembly? In TCP/IP, once a datagram has been fragmented, the fragments travel as separate datagrams all the way to the ultimate destination where they must be reassembled. All fragments have the same Identification field value.

  43. Chapter 4 Internet Protocol-Part 1, IPv4 Reassembly at the destination has two disadvantages: 1. Inefficiency: may have many small fragments 2. One fragment loss leads to the whole packet to be useless. And the useless fragments still travel to the destination. Advantages for reassembly at the destination: 1. Router is simpler. 2. Avoid repeated fragmentation and reassembly. 3. Each fragments can route independently.

  44. Chapter 4 Internet Protocol-Part 1, IPv4 Options are included primarily for network testing or debugging. Options processing is an integral part of the IP protocol, however, so all standard implementations must include it. Each option consists of a single octet option code, which may be followed by a single octet length and a set of data octets for that option. Option code 0 1 2 3 4 5 6 7 Copy option class option number Copy=1: the option should be copied into all fragments Copy=0: the option should only be copied into the first fragments (Router should take care of this bit.)

  45. Chapter 4 Internet Protocol-Part 1, IPv4 Option class Meaning 0 Datagram or network control 1 Reserved 2 Debugging and measurement 3 Reserved Opt class opt number length description 0 0 end of option list 0 1 no operation (used to align octets) 0 2 11 security and handling restrictions 0 3 var loose source routing 0 7 var record route 0 9 var strict source routing 2 4 var internet timestamp

  46. Chapter 4 Internet Protocol-Part 1, IPv4 The routing and timestamp options are the most interesting because they provide a way to monitor or control how internet routers route datagrams. The record route option allows the source to create an empty list of IP addresses and arrange for each router that handles the datagram to add its IP address to the list. 1 byte(value=4,8,12,…, 40) Option format ... 1st IP address 2nd IP address Code length pointer Option class=0 option number=7 length=variable Pointer: the currently available IP address slot, if pointer>length, the list is full. Updated by each router.

  47. Chapter 4 Internet Protocol-Part 1, IPv4 Source routing provides a way for the sender to dictate a path through the internet. For example: testing the network, avoiding hostile network, choosing the best routing path, etc. Option format ... 1st IP address 2nd IP address Code length pointer Option class=0 option number=3 or 9 copy=1 (3: loose, may pass others besides the list 9: strict, must pass exactly the specified IP address) length=variable Pointer: the currently available IP address slot, if pointer>length, the list is full. Updated by each router.

  48. Chapter 4 Internet Protocol-Part 1, IPv4 Timestamp Option The timestamp option works like record route option in that the timestamp option contains an initially empty list, and each router along the path from source to destination fills in one item in the list. Option format Code(68) length pointer oflow flags First IP address First timestamp ...

  49. Chapter 4 Internet Protocol-Part 1, IPv4 Timestamp Option Oflow: an integer count of routers that could not supply a timestamp because the option length was too small 4-bit flags =0, record timestamps only; omit IP addresses =1, precede each timestamp by an IP address =3, IP addresses are specified by sender; a router only records a timestamp if the next IP address in the list matches the router's IP address Timestamps give the time and date at which a router handles the datagram, expressed as milliseconds since midnight, Greenwich Mean Time (Universal Time). The router can use any representation of local time provided it turns on the high-order bit in the timestamp field.

  50. Chapter 4 Internet Protocol-Part 1, IPv4 IPv4 Routing Concept Direct delivery, the transmission of a datagram from one machine across a single physical network directly to another, is the basis on which all internet communication rests. Indirect delivery occurs when the destination is not on a directly attached network, forcing the sender to pass the datagram to a router for delivery.

More Related