IPv6

  • The deficiencies of the existing IPv4 protocols
  • The basic structures of IPv6
  • Addressing modes in IPv6: unicast, multicast and anycast
  • Deployment of IPv6 in existing IPv4 networks

Because of the depletion (exhaustion) of IPv4 addresses, Internet Protocol version 6 (IPv6) was proposed in the early 1990s.

  • It was predicted that all hosts in the world would be using IPv6 in 2010!
  • However, the adoption of IPv6 has been slowed down because of the short-term remedies:
    • Classless addressing – More flexible in allocating IP addresses
    • DHCP – Dynamic allocation of IP addresses
    • NAT – Use of private IP addresses
  • As of 2019, IPv4 still carried more than 95% of worldwide Internet traffic.

Reasons for a New IP

  • Address space exhaustion
    • All IPv4 addresses will be used up in the coming future
  • Requirements for new types of service that are desirable in modern networks
    • Multimedia transmissions which require minimum delay to be provided with some ways of resource reservation
    • Encryption and authentication of data
  • Eliminate some cumbersome features of IPv4

IPv6 Datagram

  • Base header – 40 bytes (fixed)
    • Double of the IPv4 (20 bytes)
  • Payload – up to 65535 (216 -1) bytes
img img

Comparing IPv6 header and IPv4 header

img
  • HLEN field is no longer needed in IPv6 (because the header length is fixed at 40 bytes)
  • Unlike the IPv4, there is no option in the base header. If extension is needed, we can add the options between the base header and the payload.
  • Traffic class replaced Service type (purpose are the same), in IPv6
  • Flow label in IPv6 is new, used to label the flow of data
  • IPv6 is not allowed to do fragmentation, to reduce computation of router
  • Hop limit replaced Time-to-live (purpose are the same), in IPv6
  • Next header replaced Protocol (purpose are the same), in IPv6
  • IPv6 does not have checksum, to reduce computation of router
img

IPv6 header format

img
  • Version
    • For IPv6, the value is 6.
  • Traffic class
    • To distinguish different payloads with different delivery requirements.
      • Example: Delivery of real-time audio and video
  • Flow label
    • As the routing of IPv4 packet relies on the destination address only, it can only support datagram approach. In other words, it is a connectionless protocol.
    • In IPv6, virtual-circuit approach can be adopted. In other words, it provides the connection-oriented service. In general, it provides better support for real-time multimedia applications.

Rules on Flow Label

  • Hosts or routers that do not support Flow Label must
    • set the field to zero (= null label) when originating
    • pass the field unchanged when forwarding
    • ignore when receiving a packet
  • Packets with the same (non-zero) Flow Label must have the same addresses, Hop-by-Hop and Routing Extension Headers
  • Source must not reuse an existing label for a new flow within the lifetime of the existing flow
  • Payload length
    • From 0 to (21612^{16} - 1)
  • Next header
    • It defines the type of first extension header (if any).
    • The first extension header is contained in the payload

Code of Next Header

img
  • Hop limit
    • Same purpose as the TTL field in IPv4
  • Source Address
    • Original source of the datagram (128 bits)
  • Destination Address
    • Destination of the datagram (128 bits)

IPv6 payload format

  • The payload can contain extension headers
    • Provides extra features such as securities (Code: 50 & 51)
img

Fragmentation and Reassembly in IPv6

  • Source and Destination
    • In order to reduce the workload of routers, in IPv6, datagrams can only be fragmented by the source.
    • After all the fragments arrives at the destination, they will be reassembled.
  • Routers
    • When a router receives a packet, it will check the size of the packet.
    • If the size is large than the maximum transfer unit (MTU) of the network ahead, the packet will be dropped.
    • Sends a packet-too-big ICMPv6 error message to inform the source.

IPv6 Address

128-bit identifiers for interfaces and sets of interfaces. There are three types of addresses (RFC1884):

  • Unicast
    • An identifier for a single interface. A packet sent to a unicast address is delivered to the interface identified by that address.
  • Anycast
    • An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to an anycast address is delivered to one of the interfaces identified by that address (the “nearest” one, according to the routing protocols’ measure of distance)
  • Multicast
    • An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to a multicast address is delivered to all interfaces identified by that address.

IPv6 Address Representation

Binary notation

  • 128bits

Colon Hexadecimal (Colon Hex) notation

  • Divides the address into eight sections, each made of four hexadecimal digits

img

Abbreviated Address

  • The use of “::” indicates multiple groups of 16-bits of zeros.
    • To shorten the notation

Example:

  • 1080:0:0:0:8:800:200C:417A a unicast address
    • Can be represented as 1080::8:800:200C:417A
  • FF01:0:0:0:0:0:0:43 a multicast address
    • Can be represented as FF01::43
  • 0:0:0:0:0:0:0:1 the loopback address
    • Can be represented as ::1
  • 0:0:0:0:0:0:0:0 the unspecified addresses
    • Can be represented as ::

Another Example

img

A CIDR Address

FDEC::BBFF:0:FFFF/60

Even though it is IPv6, remember we still identify the address in two parts, the network ID and host ID.

IPv6 Address Structure

img

Unicast Address:

img

Provider identifier + Subscriber identifier + Subnet identifier = Network ID
Node identifier = Host ID

img

Multicast Address:

img

Anycast

Motivation for using Anycast

  • Several servers support the service, the user does not particularly care which server is used
  • The motivation for anycasting is that it considerably simplifies the task of finding an appropriate server
  • Mirrored sites could similarly share a single anycast address, and users could simply connect to the anycast address to reach the nearest server.

Why use Anycast?

  • Server load balancing
  • Service reliability
  • Client transparency
  • Locality / latency improvements
  • Distributed response to DoS

What is Anycast?

For simplicity, IPv4 is used here.

Revisit Unicast: Single host receives all traffic

img

Revisit Multicast: Many hosts receive (all) traffic to multicast group

img

Anycast is not Unicast or Multicast.

  • Multiple nodes configured to accept traffic on single IP address
  • Usually, one node receives each packet
    • Packet could be dropped like any other
    • Preferably only one node receives packet, but no absolute guarantee
  • Unlike multicast, we still use anycast address as destination
  • Unlike multicast, only one of them will recieve the data
  • The node that receives a specific packet is determined by routing.
  • An anycast address must not be used as the source address of an IPv6 packet, just like in multicast
  • An anycast address must not be assigned to an IPv6 host, that is, it may be assigned to an IPv6 router only.

Example of Anycast

For simplicity, IPv4 is used here.

  • Three nodes configured with anycast address (10.5.0.1)
img
  • Only one of them will get the packet (the one having the shortest distance to the source

Transition from IPv4 to IPv6

How will the public Internet, which is based on IPv4, be transitioned to IPv6?

  • The problem is that while new IPv6-capable systems can be made “backwards compatible”, i.e., can send, route, and receive IPv4 packets, already deployed IPv4- capable systems are not capable of handling IPv6 packets. Several options are possible (which can be used either alone or together):
    • Dual Stack Approach
    • Tunneling Approach

for gradually integrating IPv6 hosts and routers into an IPv4 world (with the long term goal, of course, of having all IPv4 nodes eventually transition to IPv6)

Dual Stack Approach

The router actually will be used to handle both v4 and v6 traffics.

  • To decide which version to use, the source asks DNS server
    • If an IPv4 address is returned, send data in an IPv4 datagram
    • If an IPv6 address is returned, use IPv6 datagram then
img
  • There are problems when 2 IPv6 systems communicate through an IPv4 region
    • Some IPv6 field are ignored when send to IPv4
      • Information loss during conversion

img

Tunneling Approach

Tunneling solves the problem of Dual Stack Approach by:

  • encapsulating the IPv6 datagram in an IPv4 packet when entering an IPv4 region, and the IPv6 datagram leaves its capsule when it exits the region
  • Set a tunnel between IPv6 routers to replace the IPv4
    • No information loss, but more overhead

img

Mobile IP

  • Mobility Principles: addressing and routing to mobile users
  • Mobile IP
    • Mobile IP enables an IP node to retain the same IP address and maintain existing communications while traveling from one link to another.
    • Mobile IP is designed to allow mobile device users to move from one network to another while maintaining a permanent IP address.

Mobility

What is mobility?

spectrum of mobility, from the network perspective:

img

  • We want to maintain the user’s ongoing connection while he/she is moving.

Problem Description

In the past, in a fixed network, once we change the network, we need to change the IP address because we change the network ID.

  • Retain Host Address => Routing fails
  • Change Host Address => Lose established connections

Intuitive Solution

Take up the analogy of you moving from one apartment to another

  • What do you do?
    • Leave a forwarding address with your old post-office!
    • The old post-office forwards mails to your new post-office, which then forwards them to you

Mobility solution is working at the same idea.

Mobility Solution

2 Other entites

  • home agent (old post-office in our example)
  • foreign agent (new post-office in our example)

Some keyterms to know:

  • home network
    • permanent “home” of mobile
  • Permanent address
    • address in home network, can always be used to reach mobile
  • home agent
    • entity that will perform mobility functions on behalf of mobile, when mobile is remote
  • visited network
    • network in which mobile currently resides
  • foreign agent
    • entity in visited network that performs mobility functions on behalf of mobile.
  • Care-of-address
    • assigned address in visited network (foreign agent address)
  • Correspondent
    • the device that wants communicate with mobile

Mobility: approaches

Let routing handle it (not scalable to millinon of mobiles, bad approach)

  • routers advertise permanent address of mobile- nodes-in-residence via usual routing table exchange.
  • routing tables indicate where each mobile located
  • no changes to end-systems
  • many overhead if in large scale

let end-systems handle it

  • Indirect routing:

    • communication from correspondent to mobile goes through home agent, then forwarded to remote
    • not involve the correspond alot
    • Less efficent, but morely used
      • Path:
        • Correspondent send to Home agent
        • Home agent send to Foreign agent
        • Foreign agent send to Care-of-address
  • Direct routing: (not recommended)

    • correspondent gets foreign address of mobile, sends directly to mobile

    • involve the correspond alot

    • efficent, but lessly used (because involve the correspond alot)

      • Path:

        • Correspondent send to Home agent
        • Home agent send to Correspondent
        • Correspondent send to Foreign agent
        • Foreign agent send to Care-of-address

Mobility: Registration

  • When entering visited network, mobile contacts the foreign agent
  • foreign agent contacts home agent home: “this mobile is resident in my network”
  • Thus
    • Foreign agent knows about mobile
    • Home agent knows location of mobile

img

Mobility via Indirect Routing

img

Mobile uses two addresses:

  • Permanent address:
    • used by correspondent (hence mobile location is transparent to correspondent)
  • Care-of-address:
    • to forward datagrams to mobile, used by home agent
  • Triangle routing: correspondent-home-network-mobile
    • inefficient when correspondent, mobile are in same network

Indirect Routing: moving between networks

  • Suppose mobile user moves to another network
    • registers with new foreign agent
    • new foreign agent registers with home agent
    • home agent update care-of-address for mobile
    • packets continue to be forwarded to mobile (but with new care-of- address)
  • Mobility, changing foreign networks transparent: on going connections can be maintained!

Mobility via Direct Routing

img

  • Overcome triangle routing problem
  • Non-transparent to correspondent: correspondent must get care-of-address from home agent
    • what if mobile changes visited network?

Accommodating mobility with direct routing

  • Anchor foreign agent: FA in first visited network
  • Data always routed first to anchor FA
  • When mobile moves: new FA arranges to have data forwarded from old FA (chaining)

img

Mobile IP: Indirect Routing

  • Has many features we’ve seen:
    • Home agents, foreign agents, foreign-agent registration, care-of- addresses, encapsulation (packet-within-a-packet)
  • Three components to standard:
    • indirect routing of datagrams
    • agent discovery
    • registration with home agent

img

Mobility Binding

  • Mobility binding is maintained by specialized routers known as mobility agents.
img
  • The Foreign Agent maintains a visitor list which contains information about the mobile nodes currently visiting that network.
img

Mobile IP Protocol

Three Stages:

  • Agent Discovery
  • Registration
  • In-Service (Data Transfer)
img

Stage 1: Agent Discovery

  • Mobility agents periodically broadcasts Agent Advertisement (AA) messages.

  • Agent Discovery is the method by which a mobile node determines whether it is currently connected to its home network or to a foreign network.

    • When connected to a foreign network, the mobile node may determine the foreign agent care-of address being offered by each foreign agent on that network.
  • Mobile IP extends ICMP Router Discovery as its primary mechanism for Agent Discovery.

    • An Agent Advertisement is formed by including a Mobility Agent Advertisement Extension in an ICMP Router Advertisement message.
  • An Agent Solicitation message is identical to an ICMP Router Solicitation.

  • Agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (type field = 9)

img
  • Code bits:
img

Move Detection

Detect whether the mobile has moved from one network to another network

  • Two primary mechanisms are provided for mobile nodes to detect when they have moved from one subnet to another.

The first method is based upon the Lifetime field within the main body of the ICMP Router Advertisement portion of the Agent Advertisement. (Use Lifetime)

  • A mobile node should record the Lifetime received in any Agent Advertisements, until that Lifetime expires.
  • If the mobile node fails to receive another advertisement from the same agent within the specified Lifetime, it should assume that it has lost contact with that agent.

The second method uses network prefixes. (Use Prefixes)

  • A Prefix-Lengths Extension may follow the Mobility Agent Advertisement Extension.
    • It is used to indicate the number of bits of network prefix that applies to each Router Address listed in the ICMP Router Advertisement portion of the Agent Advertisement.
  • Determine whether or not a newly received Agent Advertisement was received on the same subnet as the mobile node’s current care-of address.
    • If the prefixes differ, the mobile node may assume that it has moved.

Stage 2: Registration

  • Mobile node registers with the foreign agent by sending a Registration Request message.
  • Foreign agent registers on behalf of the mobile host by sending a Registration Request to the home agent.
  • Home agent receiving Registration Request updates MBT.
  • Acknowledgement sent to Foreign Agent, which updates its visitor list and relays reply to Mobile Node
img
  • A registration request or reply is sent by UDP using the well- known port 434

Registration Request Format

img

Registration request flag field bits

img

Registration Reply Format

img
img

Stage 3: In Service (Tunneling)

  • When a correspondent node communicates with the mobile node, it sends an IP packet addressed to the permanent IP address of the mobile node.
  • The home agent intercepts this packet and consults the mobility binding table (MBT) to verify that the mobile node is currently visiting another network.
  • HA obtains the mobile node care-of address and constructs a new IP header containing mobile node’s care-of address as the destination IP address.
  • The original IP packet is put into the payload of this IP packet and is sent. Encapsulating an IP packet into the payload of another is known tunneling.
  • When encapsulated packet reaches the mobile node’s current network, the FA decapsulates the packet and finds mobile node’s home address.

img