670 likes | 852 Views
Chapter 4 Network Layer – Part A (IPv6). 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what ’ s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6. 4.5 routing algorithms link state distance vector hierarchical routing
E N D
Chapter 4Network Layer – Part A (IPv6) Network Layer
4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Chapter 4: outline Network Layer
IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link router’s typically have multiple interfaces host typically has one or two interfaces (e.g., wired Ethernet, wireless 802.11) IP addresses associated with each interface 223.1.1.2 223.1.3.27 IP addressing: introduction 223.1.1.1 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.2.2 223.1.3.2 223.1.3.1 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 Network Layer
Q: how are interfaces actually connected? A: we’ll learn about that in chapter 5, 6. 223.1.1.2 223.1.3.27 IP addressing: introduction 223.1.1.1 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.2.2 A: wired Ethernet interfaces connected by Ethernet switches 223.1.3.2 223.1.3.1 For now: don’t need to worry about how one interface is connected to another (with no intervening router) A: wireless WiFi interfaces connected by WiFi base station Network Layer
IP address: subnet part - high order bits host part - low order bits what’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router subnet Subnets 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 network consisting of 3 subnets Network Layer
recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet 223.1.1.0/24 223.1.2.0/24 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 223.1.3.0/24 subnet Subnets subnet mask: /24 Network Layer
how many? Subnets 223.1.1.2 223.1.1.1 223.1.1.4 223.1.1.3 223.1.7.0 223.1.9.2 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 223.1.2.6 223.1.3.27 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 Network Layer
IP addressing: CIDR CIDR:Classless InterDomain Routing • subnet portion of address of arbitrary length • address format: a.b.c.d/x, where x is # bits in subnet portion of address host part subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 Network Layer
IP addresses: how to get one? Q: how does network get subnet part of IP addr? A: gets allocated portion of its provider ISP’s address space ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23 Network Layer
200.23.16.0/23 200.23.18.0/23 200.23.30.0/23 200.23.20.0/23 . . . . . . Hierarchical addressing: route aggregation hierarchical addressing allows efficient advertisement of routing information: Organization 0 Organization 1 “Send me anything with addresses beginning 200.23.16.0/20” Organization 2 Fly-By-Night-ISP Internet Organization 7 “Send me anything with addresses beginning 199.31.0.0/16” ISPs-R-Us Network Layer
200.23.16.0/23 200.23.18.0/23 200.23.30.0/23 200.23.20.0/23 . . . . . . Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 Organization 0 “Send me anything with addresses beginning 200.23.16.0/20” Organization 2 Fly-By-Night-ISP Internet Organization 7 “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” ISPs-R-Us Organization 1 Network Layer
IP addressing: the last word... Q: how does an ISP get block of addresses? A:ICANN: Internet Corporation for Assigned Names and Numbers http://www.icann.org/ • allocates addresses • manages DNS • assigns domain names, resolves disputes Network Layer
Next Generation IP (IPv6) Network Layer
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
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.
IPv4 Doomsday ? Size of the Internet Network Layer Distribution Statement A: Cleared for Public Release; Distribution is unlimited.
CIDR deployment No Growth Linear Growth Exponential Growth Exponential Growth - CIDR breaking down http://www.telstra.net/ops/bgptable.html Internet BGP Routing Table Network Layer Distribution Statement A: Cleared for Public Release; Distribution is unlimited.
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
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
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
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
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
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
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 • (1015 endpoints) • Expectation of millions of new networks. • Expanded competition and structured delegation. • (1012 sites) Network Layer
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
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
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
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
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
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
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
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. 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”
IPv6 Addressing n bits m bits o bits p bits (125-m-n-o-p) bits • 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 001 Registry ID Provider ID Subscriber ID Subnet ID Interface ID Network Layer
IPv6 Addressing • 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 3 13 8 24 16 64 F TLA NLA Interface ID resv SLA Public Topology Site Topology
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. 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
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.
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
IPv4 and IPv6 Type of Service Vers 6 Traffic Class Vers 4 IHL Total Length 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 Destination Address v4 Header = 20 Bytes + Options v6 Header = 40 Bytes
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.
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.
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).
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?
Extension Headers IPv6 extension headers. 5-69 Network Layer