620 likes | 768 Views
第三章 IPv6 与移动 IP Chapter 3 IPv6 and Mobile IP. 电控学院 电子工程学科部 司鹏搏 综合楼 825 室 sipengbo@bjut.edu.cn. Main Contents. 3.1 IPv6 3.1.1 Problems of IPv4 3.1.2 Solve the Problems 3.1.3 IPv6 Address 3.1.4 IPv6 Header 3.1.5 Address Allocation 3.1.6 IPv6 Routing 3.1.7 IPv6 in China 3.2 Mobile IP.
E N D
第三章 IPv6与移动IPChapter 3 IPv6 and Mobile IP 电控学院 电子工程学科部 司鹏搏 综合楼825室 sipengbo@bjut.edu.cn
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
Main Contents • 3.1 IPv6 • 3.2 Mobile IP • 3.2.1 Introduction to Mobile IP • 3.2.2 Operations of Mobile IP • 3.2.3 Problems with Mobile IP • 3.2.4 Mobility in IPv6
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
3.1.1 Problems of IPv4 • Toooooooooooooooooooooold • Exhaustion of IPv4 addresses • 4 bytes = 4.3 billion • Much less than the human population (6.1 billion) • Will be exhausted in around 2008 (previous prediction) • Registries are allocating IPv4 addresses by severe policy • Nobody can obtain enough IPv4 addresses • Increment of routing information • Routing information cannot be aggregated effectively • Unaggregatable address assignments • 80,000 entries at present • Burden for backbone routers • Unstability, accidents
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
3.1.2 Two Ways to Ease the Problems • NAT (Network Address Translation) • Intranet IP address is introduced • Protect the interior hosts • IP address translation • Visits from exterior hosts are inconvenient • CIDR (Classless Inter-Domain Routing) • Subnets could be even smaller than Class C networks • Layered architecture to reduce the size of routing table • However, the technologies are not the ways to thoroughly workout the problems
3.1.2 Two Ways to Ease the Problems • Patched Internet by NAT • Unidirectional communication • Enclosed communication • Single point of failure • Evolution of application are suppressed • Accounting from servers is impossible • Flat Internet • Bidirectional communication • End-to-end communication • True communication infrastructure • Much easier to deploy inventive new applications
3.1.2 Solve the Problems Exhaustion of IP address Significant extension of address space IPv4 The thorough solution IPv6 Secure Auto-Config Increment of routing information QoS Layered Address NAT Temporary counter measure Finally IPv4 CIDR
3.1.2 Towards IPv6 • Address extension and starting over • 16 bytes = 3.4×1038v.s. 4 bytes = 4.3×109 • Some technologies are mandatory • Plug and play • End-to-end security (i.e., IPsec) • At least 65536 subnets • Class A per site • Reducing external routing information to 8192 • Aggregatable global address • End-to-end and bidirectional communication • A NAT-free world • Paradigm change for applications • Cellular phones, automobiles, home networks, game machines, … • IPv9?
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
FP TLA-ID Res NLA-ID SLA-ID Interface-ID 3.1.3 IPv6 Address Format 128 bit ≥3 ≤13 8 24 16 64 Site Topology Public Topology Interface Identifier Node Portion Network Portion FP = Format Prefix (= 001 for globally aggregated unicast addresses) TLA-ID = Top-level aggreation identifier RES = Reserved for future use NLA = Next-level aggregation identifier SLA-ID = Site-level aggregation identifier Interface ID = Interface identifier
3.1.3 Address Notation • Separate 4 figures of hexadecimal by “:” • 3ffe:0501:0008:1234:0260:97ff:fe40:efab • ff02:0000:0000:0000:1111:0000:0000:0001 • Preceding 0 for each piece can be omitted • 3ffe:501:8:1234:260:97ff:fe40:efab • ff02:0:0:0:1111:0:0:1 • Continuous 0 pieces can be expressed by “::” at most once • ff02::1111:0:0:1 or ff02:0:0:0:1111::1 is OK • ff02::1111::1 is not OK • Prefix length 0-128 is placed after “/” • 3ffe:500/25
3.1.3 Special Addresses • All zero • Represents absence of an address • ::1 • Analogous to IPv4 loopback 127.0.0.1 • fe8/10 • Meaningful only to nodes on a single link within a single site • NOT globally unique, unique only within respective scope • Used for autoconfiguration, neighbor discovery, nodes on routerless links, routing protocols • fe9/10 • To be used within a site only • NOT globally unique • NOT to be propagated beyond site boundaries • Edge routers MUST keep site-local traffic within site
3.1.3 Anycast Address • Used to address multiple interfaces on different nodes with SAME IPv6 address • Allocated from unicast address space • Addresses are taken from Interface-ID field • Currently, only specified anycast addresses are for subnet-router and for Mobile IPv6 home-agents • Subnet-router • Subnet prefix followed by zeros • E.g., fec0:0:0:A:: representing the nearest router in the subnet
3.1.3 Multicast Address • Always begin with ff • Two types • Well-known – assigned by an official authority • Transient – locally assigned for non-global use • Multicast addresses are scoped • Currently 5 scope levels defined: • Local to the node (scope = 1, node-local) • Local to the link (scope = 2, link-local) • Local to the site (scope = 5, site-local) • Local to the organization (scope = 8) • Global (scope = E) • Reserved (scope = 0 and scope = F)
3.1.3 Multicast Address Format 128 bit 8 4 4 112 11111111 flgs scope Group-ID • Defines address scope • 0 Reserved • Node-local scope • Link-local scope • Site-local scope • Organization local scope • E Global scope • F Reserved First 3 bits set to 0 Last bit defines address type: 0 = Permanent (or well-known) 1 = Locally assigned (or transient)
3.1.3 Unicast Address 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 • Anycast addresses are treated just like unicast addresses • It’s up to the routing system to determine which server is “closest”
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
3.1.4 IPv4 vs. IPv6 Header Formats 32 bits 32 bits Ver. 6 Traffic class 8 bits Flow label 20 bits Ver. 4 HL TOS Datagram Length Payload Length 16 bits Next Hdr. 8 bits Hop Limit 8 bits Datagram-ID Flags Flag Offset Source Address 128 bits TTL Protocol Header Checksum Source IP Address Destination Address 128 bits Destination IP Address IP Options (with padding if necessary) Options Variable bits Data Data IPv4 header IPv6 header
3.1.4 Key Differences • 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?
3.1.4 IPv6 Extension Headers IPv6 header NH=TCP TCP header + data IPv6 header NH=Routing Routing header NH=TCP TCP header + data IPv6 header NH=Routing Routing header NH=Fragment Fragment header NH=TCP TCP header + data
3.1.4 Routing Extension 16 8 31 0 24 0 Next header Hd. Ext. Len Segmnts left 1 – 24 addresses • Without this header, routing is essentially the same as v4 • With this header essentially same as the source routing option in v4 • Next header: 34 • Header length is in 64-bit words • Up to 24 addresses can be included • Packet will go to nearest of these in “anycast” configuration
3.1.4 Fragmentation Extension 16 8 31 0 29 next header reserved offset reserved M ID • 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
3.1.4 Authentication Extension 31 0 next header Payload length reserved Security Parameters Index (SPI) Sequence Number Field Authentication Data Next header value: 51 Provides data integrity and authentication
3.1.4 Encapsulating Security Payload Extension 31 0 Security Parameters Index (SPI) Sequence Number Payload Data Payload Data Padding Padding Pad Length Next Header Authentication Data Next header value: 50, provides confidentiality, data originauthentication,connectionless integrity and anti-replay service
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
3.1.5 IPv6 Address Allocation • IPv6 address space is allocated by the 5 RIRs: • AFRINIC, APNIC, ARIN, LACNIC, RIPE-NCC • ISPs get address space from the RIRs • Enterprises get their IPv6 address space from their ISP • Larger address space enables: • Aggregation of prefixes announced in the global routing table • Efficient and scalable routing • Lowest order 64-bit field of unicast address may be assigned in several different ways: • Auto-configured from a 64-bit EUI-64, or expanded from a 48-bit MAC address (e.g., Ethernet address) • Auto-generated pseudo-random number (to address privacy concerns) • Assigned via DHCP • Manually configured
3.1.5 EUI-64 MAC Address 00 90 27 17 fc 0f 00 90 27 17 fc 0f Add ff:fe ff fe 00 90 27 ff fe 17 fc 0f 00000000 NOT (the 7th bit) 00000010 02 90 27 ff fe 17 fc 0f EUI-64 address
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
3.1.6 IPv6 Routing • As in IPv4, IPv6 has 2 families of routing protocols • IGP • RIPng (RFC 2080) • EIGRP for IPv6 • OSPFv3 (RFC 2740) • Integrated IS-ISv6 (draft-ietf-isis-ipv6-02) • EGP • MP-BGP4 (RFC 2858 and RFC 2545) • Still uses the longest-prefix match routing algorithm
3.1.6 IPv6 Routing Protocols • RIPng • For the ISP industry, simply don’t go here • ISPs do not use RIP in any form unless there is absolutely no alternative • And there usually is • RIPng was used in the early days of the IPv6 test network • Sensible routing protocols such as OSPF and BGP rapidly replaced RIPng when they became available • EIGRP • Cisco EIGRP has had IPv6 protocol support added • Uses similar CLI to existing IPv4 protocol support • Easy deployment path for existing IPv4 EIGRP users
Main Contents • 3.1 IPv6 • 3.1.1 Problems of IPv4 • 3.1.2 Solve the Problems • 3.1.3 IPv6 Address • 3.1.4 IPv6 Header • 3.1.5 Address Allocation • 3.1.6 IPv6 Routing • 3.1.7 IPv6 in China • 3.2 Mobile IP
Main Contents • 3.1 IPv6 • 3.2 Mobile IP • 3.2.1 Introduction to Mobile IP • 3.2.2 Operations of Mobile IP • 3.2.3 Problems with Mobile IP • 3.2.4 Mobility in IPv6
3.2.1 We’re not Quite Done with IP • You’re probably sick and tired of hearing about all things IP • Forwarding, routing, multicast, etc… • One last topic we must cover because it’s going to be important in the future – mobile networking • Examples of mobile networking today? • Examples of mobile networking tomorrow? • Mobile networking should not be confused with portable networking • Portable networking requires connection to the same ISP
3.2.1 Portable Networking Technology • Cellular systems • Cellular Digital Packet Data (CDPD) • 3G • Bluetooth • Low cost, short range radio links between mobile devices • Wireless Ethernet (802.11) • Widely used wireless MAC layer technology
3.2.1 Mobility and Standard IP Routing • IP assumes end hosts are in fixed physical locations • What happens if we move a host between networks? • IP addresses enable IP routing algorithms to get packets to the correct network • Each IP address has network part and host part • This keeps host specific information out of routers • DHCP is used to get packets to end hosts in networks • This still assumes a fixed end host • What if a user wants to roam between networks? • Mobile users don’t want to know that they are moving between networks • Why can’t mobile users change IP when running an application?
3.2.1 Mobile IP • Mobile IP was developed as a means for transparently dealing with problems of mobile users • Enables hosts to stay connected to the Internet regardless of their location • Enables hosts to be tracked without needing to change their IP address • Requires no changes to software of non-mobile hosts/routers • Requires addition of some infrastructure • Has no geographical limitations • Requires no modifications to IP addresses or IP address format • Supports security • Could be even more important than physically connected routing • IETF standardization process is still underway
3.2.1 Mobile IP Entities • Mobile Node (MN) • The entity that may change its point of attachment from network to network in the Internet • Detects it has moved and registers with “best” FA • Assigned a permanent IP called its home address to which other hosts send packets regardless of MN’s location • Since this IP doesn’t change it can be used by long-lived applications as MN’s location changes • Home Agent (HA) • This is router with additional functionality • Located on home network of MN • Does mobility binding of MN’s IP with its COA • Forwards packets to appropriate network when MN is away • Does this through encapsulation
3.2.1 Mobile IP Entities • Foreign Agent (FA) • Another router with enhanced functionality • If MN is away from HA the it uses an FA to send/receive data to/from HA • Advertises itself periodically • Forward’s MN’s registration request • Decapsulates messages for delivery to MN • Care-of-address (COA) • Address which identifies MN’s current location • Sent by FA to HA when MN attaches • Usually the IP address of the FA • Correspondent Node (CN) • End host to which MN is corresponding (eg. a web server)
3.2.1 Mobile IP Support Services • Agent Discovery • HA and FA broadcast their presence on each network to which they are attached • Beacon messages via ICMP Router Discovery Protocol (IRDP) • MN listens for advertisement and then initiates registration • Registration • When MN is away, it registers its COA with its HA • Typically through the FA with strongest signal • Registration control messages are sent via UDP to well known port • Encapsulation – just like standard IP only with COA • Decapsulation – again, just like standard IP
Main Contents • IPv6 • Mobile IP • 3.2.1 Introduction to Mobile IP • 3.2.2 Operations of Mobile IP • 3.2.3 Problems with Mobile IP • 3.2.4 Mobility in IPv6
3.2.2 Mobile IP Operation • A MN listens for agent advertisement and then initiates registration • If responding agent is the HA, then mobile IP is not necessary • After receiving the registration request from a MN, the HA acknowledges and registration is complete • Registration happens as often as MN changes networks • HA intercepts all packets destined for MN • This is simple unless sending application is on or near the same network as the MN • HA masquerades as MN • There is a specific lifetime for service before a MN must re-register • There is also a de-registration process with HA if an MN returns home