Network Layer Part A (IPv6) Network Layer 4-1
Chapter 4: outline 4.1 Overview of Network layer data plane control plane 4.2 What s inside a router 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation IPv6 4.4 Generalized Forward and SDN match action OpenFlow examples of match-plus-action in action Network Layer: Data Plane 4-2
IPv6: motivation initial motivation: 32-bit address space soon to be completely allocated. additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed Network Layer 4-3
IPv6 Design Issues Overcome IPv4 scaling problem lack of address space. Flexible transition mechanism. New routing capabilities. Quality of service. Security. Ability to add features in the future.
Size of the Internet 6000 5000 IPv4 Doomsday? 4000 3000 2000 1000 0 1988 1989 1990 1991 Theoretical Allocated 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 Usable Addressable Network Layer 5 Distribution Statement A: Cleared for Public Release; Distribution is unlimited. 2007
Internet BGP Routing Table Exponential Growth No Growth CIDR deployment Linear Growth Exponential Growth - CIDR breaking down http://www.telstra.net/ops/bgptable.html Network Layer 6 Distribution Statement A: Cleared for Public Release; Distribution is unlimited.
Network Layer 7
Network Layer 8
Network Layer 9
What about technologies & efforts to slow the consumption rate? Dial-access / PPP / DHCP Provides temporary allocation aligned with actual endpoint use. Strict allocation policies Reduced allocation rates by policy of current-need vs. previous policy based on projected-maximum-size. CIDR Aligns routing table size with needs-based address allocation policy. Additional enforced aggregation actually lowered routing table growth rate to linear for a few years. NAT Hides many nodes behind limited set of public addresses. Network Layer 10
What were the benefits? Actual allocation history 1981 IPv4 protocol published 1985 ~ 1/16 total space 1990 ~ 1/8 total space 1995 ~ 1/4 total space 2000 ~ 1/2 total space The lifetime-extending efforts & technologies delivered the ability to absorb the dramatic growth in consumer demand during the late 90 s. In short they bought TIME Network Layer 11
Would increased use of NATs be adequate? NO! NAT enforces a client-server application model where the server has topological constraints. They won t work for peer-to-peer or devices that are called by others (e.g., IP phones) They inhibit deployment of new applications and services, because all NATs in the path have to be upgraded BEFORE the application can be deployed. NAT compromises the performance, robustness, and security of the Internet. NAT increases complexity and reduces manageability of the local network. Public address consumption is still rising even with current NAT deployments. Network Layer 12
IPv6 Background IP has been patched (subnets, supernets) but there is still the fundamental 32 bit address limitation IETF started effort to specify new version of IP in 1991 New version would require change of header Include all modifications in one new protocol Solicitation of suggestions from community Result was IPng which became IPv6 First version completed in 94 Same architectural principles as v4 only bigger Network Layer 13
What Ever Happened to IPv5? 0 IP March 1977 version (deprecated) 1 IP January 1978 version (deprecated) 2 IP February 1978 version A (deprecated) 3 IP February 1978 version B (deprecated) 4 IPv4 September 1981 version (current widespread) 5 ST Stream Transport (not a new IP, little use) 6 IPv6 December 1998 version (formerly SIP, SIPP) 7 CATNIP IPng evaluation (formerly TP/IX; deprecated) 8 Pip IPng evaluation (deprecated) 9 TUBA IPng evaluation (deprecated) 10-15 unassigned Network Layer 14
IPv6 RFCs 1752 - Recommendations for the IP Next Generation Protocol 2460 - Overall specification 2373 - addressing structure others (find them) www.rfc-editor.org Network Layer 15
What were the goals of a new IP design? Expectation of a resurgence of always-on technologies xdsl, cable, Ethernet-to-the-home, Cell-phones, etc. Expectation of new users with multiple devices. China, India, etc. as new growth Consumer appliances as network devices (10 15 endpoints) Expectation of millions of new networks. Expanded competition and structured delegation. (10 12 sites) Network Layer 16
Benefits of 128 bit Addresses Room for many levels of structured hierarchy and routing aggregation Easy address auto-configuration Easier address management and delegation than IPv4 Ability to deploy end-to-end IPsec (NATs removed as unnecessary) Network Layer 17
Incidental Benefits of New Deployment Chance to eliminate some complexity in IP header improve per-hop processing Chance to upgrade functionality multicast, QoS, mobility Chance to include new features binding updates Network Layer 18
IPv6 Enhancements (1) Expanded address space 128 bit Improved option mechanism Separate optional headers between IPv6 header and transport layer header Most are not examined by intermediate routes Improved speed and simplified router processing Easier to extend options Address autoconfiguration Dynamic assignment of addresses Network Layer 19
IPv6 Enhancements (2) Increased addressing flexibility Anycast - delivered to one of a set of nodes Improved scalability of multicast addresses Support for resource allocation Replaces type of service Labeling of packets to particular traffic flow Allows special handling e.g. real time video Network Layer 20
Summary of Main IPv6 Benefits Expanded addressing capabilities Structured hierarchy to manage routing table growth Serverless autoconfiguration and reconfiguration Streamlined header format and flow identification Improved support for options / extensions Network Layer 21
Address Complexity IPv6 actually has many kinds of addresses unicast, anycast, multicast, link-local, site-local, loopback, IPv4-embedded, care-of, manually-assigned, DHCP-assigned, self-assigned, solicited-node, and more most of this complexity is also present in IPv4, just never written down in one place a result of 20 years of protocol evolution one simplification: no broadcast addresses in IPv6! uses multicast to achieve same effects Network Layer 22
Types of address Unicast Single interface Anycast Set of interfaces (typically different nodes) Delivered to any one interface the nearest Multicast Set of interfaces Delivered to all interfaces identified Network Layer 23
IPv6 Addresses 128 bits - written as eight 16-bit hex numbers. 5f1b:df00:ce3e:e200:0020:0800:2078:e3e3 High order bits determine the type of address. The book shows the breakdown of address types. 24 Network Layer
Unicast Assignment in v6 Unicast address assignment is similar to CIDR Unicast addresses start with 001 Host interfaces belong to subnets Addresses are composed of a subnet prefix and a host identifier Subnet prefix structure provides for aggregation into larger networks Provider-based plan Idea is that the Internet is global hierarchy of network Three levels of hierarchy region, provider, subscriber Goal is to provide route aggregation to reduce BGP overhead A provider can advertise a single prefix for all of its subscribers Region = 13 bits, Provider = 24 bits, Subscriber = 16 bits, Host = 80 bits Eg. 001,regionID,providerID,subscriberID,subnetID,intefaceID What about multi-homed subscribers? No simple solution Anycase addresses are treated just like unicast addresses It s up to the routing system to determine which server is closest 25
IPv6 Addressing n bits m bits o bits p bits (125-m-n-o-p) bits 001 Registry ID Provider ID Subscriber ID Subnet ID Interface ID Classless addressing/routing (similar to CIDR) Notation: x:x:x:x:x:x:x:x (x = 16-bit hex number) contiguous 0s are compressed: 47CD::A456:0124 IPv6 compatible IPv4 address: ::128.42.1.87 Address assignment provider-based (can t change provider easily) geographic Network Layer 26
IPv6 Addressing 3 13 8 24 16 64 F TLA NLA SLA Interface ID resv Public Topology Site Topology Top Level and Next Level Aggregators Interface ID typically from MAC address Special site-local and link-local addresses Special multicast and anycast addresses Special IPv4 compatible addresses
IPv4-Mapped IPv6 Address IPv4-Mapped addresses allow a host that support both IPv4 and IPv6 to communicate with a host that supports only IPv4. The IPv6 address is based completely on the IPv4 address. 28 Network Layer
IPv4-Mapped IPv6 Address 80 bits of 0s followed by 16 bits of ones, followed by a 32 bit IPv4 Address: 0000... 0000 FFFF IPv4 Address 80 bits 16 bits 32 bits 29
Works with DNS An IPv6 application asks DNS for the address of a host, but the host only has an IPv4 address. DNS creates the IPv4-Mapped IPv6 address automatically. Kernel understands this is a special address and really uses IPv4 communication. 30
Address Autoconfigure Start with link-local address Neighbor Discovery (ND) multicast to find prefix or DHCP server Stateful assignment via DHCPv6 Stateless assignment via a routing prefix Entire sites can renumber with new prefix Mobility via dynamic care-of address
Address Space and Notation Allocation is classless Prefixes specify different uses (unicast, multicast, anycast) Anycast: send packets to nearest member of a group Prefixes can be used to map v4 to v6 space and visa-versa Lots of flexibility with 128 bits! ~1500 address/sqft of the earths surface Standard representation is set of eight 16-bit values separated by colons Eg. 47CD:1234:3200:0000:0000:4325:B792:0428 If there are large number of zeros, they can be omitted with series of colons Eg. 47CD:1234:3200::4325:B792:0428 Address prefixes (slash notation) are the same as v4 Eg. FEDC:BA98:7600::/40 describes a 40 bit prefix 32
Address Prefix Assignments 0000 0000 Reserved 0000 0001 Unassigned 0000 001 Reserved for NSAP (non-ip addresses used by ISO) 0000 010 Reserved for IPX (non-ip addresses used by IPX) 0000 011 Unassigned 0000 1 Unassigned 0001 Unassigned 001 Unicast Address Space 010 Unassigned 011 Unassigned 100 Unassigned 101 Unassigned 110 Unassigned 1110 Unassigned 1111 0 Unassigned 1111 10 Unassigned 1111 110 Unassigned 1111 1110 0 Unassigned 1111 1110 10 Link Local Use addresses 1111 1110 11 Site Local Use addresses 1111 1111 Multicast addresses 33
IPv4 and IPv6 Vers 4 IHL Type of Service Total Length Vers 6 Traffic Class Flow Label Identification Flags Frag Offset Payload Length Next Hdr Hop Limit Time to Live Protocol Header Checksum Source Address Source Address Destination Address IP Options v4 Header = 20 Bytes + Options v6 Header = 40 Bytes Destination Address
IPv6 Headers Simpler header - faster processing by routers. No optional fields - fixed size (40 bytes) No fragmentation fields. No checksum Support for multiple headers more flexible than simple protocol field. 35
IPv6 Header Fields VERS: 6 (IP version number) Priority: will be used in congestion control Flow Label: experimental - sender can label a sequence of packets as being in the same flow. Payload Length: number of bytes in everything following the 40 byte header, or 0 for a Jumbogram. 36
IPv6 Header Fields Next Header is similar to the IPv4 protocol field - indicates what type of header follows the IPv6 header. Hop Limit is similar to the IPv4 TTL field (but now it really means hops, not time). 37
Key differences in header No checksum Bit level errors are checked for all over the place No length variability in header Fixed format speeds processing No more fragmentation and reassembly in header Incorrectly sized packets are dropped and message is sent to sender to reduce packet size Hosts should do path MTU discovery But of course we have to be able to segment packets! What about UDP packets? 38
Extension Headers 5-69 IPv6 extension headers. Network Layer 39
Figure 3.4 Stallings HSNET 2ed Network Layer 40
Extension Headers (2) Basic header Next header = TCP TCP segment Basic header Next header = routing Routing header Next header = fragment Fragment header Next header = authentication Authentication header Next header = TCP TCP segment Daisy Chain extension Headers Network Layer 4-41
Extension Headers (3) Stallings HSNET 2ed Network Layer 42
Extension Headers (4) The hop-by-hop extension header for large datagrams (jumbograms). Network Layer 43
Hop-by-Hop Options Next header Header extension length Options Pad1 Insert one byte of padding into Options area of header PadN Insert N ( 2) bytes of padding into Options area of header Ensure header is multiple of 8 bytes Jumbo payload Over 2 16 = 65,535 octets Router alert Tells router that contents of packet is of interest to router Provides support for RSPV (chapter 16) Network Layer 44
Fragmentation Extension Similar to v4 fragmentation Implemented as an extension header Placed between v6 header and data (if it is the only extension used) 13 bit offset Last-fragment mark (M) Larger fragment ID field than v4 Fragmentation is done on end host Node must perform path discovery to find smallest MTU of intermediate networks Source fragments to match MTU Otherwise limit to 1280 octets next header reserved offset M reserved ID 45
Routing Same longest-prefix match routing as IPv4 CIDR Straightforward changes to existing IPv4 routing protocols to handle bigger addresses unicast: OSPF, RIP-II, IS-IS, BGP4+, multicast: MOSPF, PIM, Use of Routing header with anycast addresses allows routing packets through particular regions List of one or more intermediate nodes to be visited e.g., for provider selection, policy, performance, etc. Network Layer 46
Routing Extension Without this header, routing is essentially the same as v4 With this header essentially same as the source routing option in v4 Loose or strict Header length is in 64-bit words Up to 24 addresses can be included Packet will go to nearest of these in anycast configuration Segments left tracks current target 0 8 16 24 31 Next header Hd. Ext. Len 0 Segmnts left 1 24 addresses 47
Routing Header 0 8 16 24 31 Next Header Header Length Routing Type = 0 Segment Left Reserved Strict/Loose Bit Mask Address 1 Address 2... Address 24 The extension header for routing. Network Layer 48
Example of Using the Routing Header S A B D Network Layer 49
Example of Using the Routing Header S A B D Network Layer 4-50
Example of Using the Routing Header S A B D Network Layer 4-51
Example of Using the Routing Header S A B D Network Layer 52
Transition from IPv4 to IPv6 not all routers can be upgraded simultaneously no flag days how will network operate with mixed IPv4 and IPv6 routers? tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers IPv4 header fields IPv4 source, dest addr IPv6 header fields IPv6 source dest addr UDP/TCP payload IPv4 payload IPv6 datagram IPv4 datagram Network Layer 4-53
Tunneling logical view: A IPv6 B IPv6 IPv4 tunnel connecting IPv6 routers E IPv6 F IPv6 physical view: A B C D E F IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 Network Layer 4-54
Tunneling logical view: A IPv6 B IPv6 IPv4 tunnel connecting IPv6 routers E IPv6 F IPv6 physical view: A B C D E F IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 flow: X src: A dest: F data src:b dest: E Flow: X Src: A Dest: F src:b dest: E Flow: X Src: A Dest: F flow: X src: A dest: F data data data A-to-B: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4 E-to-F: IPv6 Network Layer 4-55