IPv6 and Routing Protocols
1. The IPv6 Protocol
IPv6 Overview
IPv6 (Internet Protocol version 6) is the next generation of IPv4. It addresses problems such as the exhaustion of IPv4 addresses.
Main Characteristics of IPv6
- Large address space: 128-bit addresses, about 340 trillion addresses
- Simplified header: a fixed 40 bytes, with no options field
- Stronger security: IPsec support built in
- Mobility support: Mobile IP functionality built in
- Automatic configuration: stateless address autoconfiguration
IPv6 Address Structure
- 128-bit address: divided into eight 16-bit segments
- Colon-separated: each segment written in hexadecimal
- Compressed form: runs of zeros can be written as ::
- Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 Address Types
Unicast addresses:
- Global unicast address: 2000::/3
- Link-local address: fe80::/10
- Site-local address: fec0::/10
Multicast addresses:
- Range: ff00::/8
- Purpose: one-to-many communication
Anycast addresses:
- allocated from the unicast address space
- several interfaces share one address
IPv6 Header Structure
- Version (4 bits): the protocol version, 6 for IPv6
- Traffic class (8 bits): the quality of service identifier
- Flow label (20 bits): the flow identifier
- Payload length (16 bits): the length of the data portion
- Next header (8 bits): the upper layer protocol type
- Hop limit (8 bits): the maximum number of hops
- Source address (128 bits): the sender’s address
- Destination address (128 bits): the receiver’s address
2. Routing Protocols
Autonomous System (AS)
Definition:
- a collection of networks under a single administrative domain
- it uses a common routing policy
- it has a unique AS number
AS types:
- Stub AS: connected to only one other AS
- Transit AS: connected to several ASes and provides transit service
- Multihomed AS: connected to several ASes but provides no transit service
Intra-Domain Routing Protocols
RIP (Routing Information Protocol)
- Type: distance vector protocol
- Metric: hop count (at most 15 hops)
- Update period: 30 seconds
- Suitable for: small networks
Characteristics:
- Simple to implement
- Slow convergence
- Prone to routing loops
- The hop limit restricts the network scale
OSPF (Open Shortest Path First)
- Type: link state protocol
- Metric: link cost
- Update method: triggered updates
- Suitable for: large networks
Characteristics:
- Fast convergence
- Supports large networks
- Supports multiple metrics
- Not prone to routing loops
Inter-Domain Routing Protocols
BGP (Border Gateway Protocol)
- Type: path vector protocol
- Function: exchanges routing information between ASes
- Characteristics:
- strongly policy-driven
- highly stable
- supports complex routing policies
- suitable for large networks
How BGP works:
- Establish the connection: BGP routers set up a TCP connection
- Exchange routes: they exchange network reachability information
- Apply policy: the best path is chosen according to policy
- Update the routing table: the local routing table is updated
3. IP Multicast
The Multicast Concept
- One-to-many communication: one sender, many receivers
- Multicast group: the set of devices that receive the multicast data
- Multicast address: the address that identifies a multicast group
Multicast Addresses
IPv4 multicast addresses:
- Range: 224.0.0.0 - 239.255.255.255
- Format: 1110 + 28-bit group identifier
IPv6 multicast addresses:
- Range: ff00::/8
- Format: ff + 4-bit flags + 4-bit scope + 112-bit group identifier
Multicast Protocols
IGMP (Internet Group Management Protocol)
- Function: manages multicast group membership
- Versions: IGMPv1, IGMPv2, IGMPv3
- How it works:
- A host joins a multicast group
- A router queries the group members
- Hosts report their membership
PIM (Protocol Independent Multicast)
- Function: establishes a multicast tree between routers
- Modes:
- Dense mode (PIM-DM)
- Sparse mode (PIM-SM)
4. Mobile IP
The Mobile IP Concept
- Mobile node: a device that can change its network location
- Home agent: the router in the mobile node’s home network
- Foreign agent: the router in the network the mobile node is currently in
- Home address: the permanent IP address of the mobile node
- Care-of address: the temporary address of the mobile node on the foreign network
How Mobile IP Works
- Home registration: the mobile node registers with the home agent
- Foreign registration: the mobile node registers with the foreign agent
- Data forwarding:
- the home agent receives the data addressed to the mobile node
- it tunnels the data to the foreign agent
- the foreign agent forwards the data to the mobile node
The Mobile IP Communication Process
- Mobile node → correspondent node: sent directly
- Correspondent node → mobile node: forwarded through the home agent
5. Network Layer Devices
Router
Main functions:
- Packet forwarding: forwards packets according to the routing table
- Routing table maintenance: maintains information about the network topology
- Internetworking: connects different networks
- Protocol conversion: converts between different protocols
The structure of a routing table:
- Destination address: the address of the target network
- Next hop: the address of the next-hop router
- Interface: the outgoing interface
- Metric: the path cost
Types of routers:
- Core router: a router in the backbone network
- Edge router: a router in an access network
- Border router: a router that connects different ASes
Layer 3 Switch
Characteristics:
- Integrated functions: combines the functions of a switch and a router
- High performance: hardware forwarding, which is fast
- VLAN support: supports virtual LANs
- QoS support: supports quality of service guarantees
How it works:
- Hardware forwarding: forwarding is done with dedicated hardware
- Route caching: frequently used routing information is cached
- Fast convergence: supports fast routing convergence
Exercise 1
Briefly describe the basic principles of RIP and OSPF.
Approach: state the principle and the working procedure of each protocol in turn.
Steps:
RIP (Routing Information Protocol):
Basic principle:
- a distance vector protocol
- each router exchanges routing information only with its neighbours
- the shortest path is computed with the Bellman-Ford algorithm
- the metric is hop count, with a maximum of 15 hops
How it works:
- The router initializes its routing table
- It exchanges routing tables with its neighbours at regular intervals
- It updates the routing table using the distance vector algorithm
- The process repeats until the network converges
OSPF (Open Shortest Path First):
Basic principle:
- a link state protocol
- every router collects link state information for the whole network
- the shortest path is computed with the Dijkstra algorithm
- the metric is link cost
How it works:
- Discover the neighbouring routers
- Measure the link costs
- Build the link state database
- Compute the shortest path with the Dijkstra algorithm
- Update the routing table
Answer: RIP is a distance vector protocol that exchanges hop counts with neighbours and computes paths with Bellman-Ford, which is simple but converges slowly; OSPF is a link state protocol that floods the topology to every router and computes paths with Dijkstra, which converges faster and scales better.
Exercise 2
What is the main role of a router?
Approach: group the six roles by function, and describe what each one actually does.
Steps:
The main roles of a router include:
-
Packet forwarding:
- forwards packets according to the routing table
- chooses the best transmission path
- makes internetworking possible
-
Routing table maintenance:
- maintains information about the network topology
- updates routing entries
- handles routing changes
-
Internetworking:
- connects different networks
- makes heterogeneous internetworking possible
- supports conversion between different protocols
-
Traffic control:
- controls the flow of packets
- implements load balancing
- avoids network congestion
-
Security control:
- access control lists (ACLs)
- firewall functions
- enforcement of security policies
-
Network management:
- network monitoring
- fault diagnosis
- performance optimization
Answer: a router forwards packets along the path chosen by its routing table, maintains that table as the topology changes, and interconnects different networks; it also handles traffic shaping, security filtering, and network management tasks.
| Term | Abbreviation | Explanation |
|---|---|---|
| Internet Protocol version 6 | IPv6 | The IP protocol with 128-bit addresses |
| Routing Information Protocol | RIP | An intra-domain distance vector routing protocol |
| Open Shortest Path First | OSPF | An intra-domain link state routing protocol |
| Border Gateway Protocol | BGP | An inter-domain routing protocol |
| Autonomous System | AS | A network under a single administrative domain |
| Internet Group Management Protocol | IGMP | Multicast group membership management |
| Protocol Independent Multicast | PIM | A multicast routing protocol |
| Mobile IP | - | An IP protocol that supports host mobility |
| Care-of Address | CoA | The address of a mobile host on a foreign network |
| Home Agent | HA | The router in a mobile host’s home network |
| Foreign Agent | FA | The router in a mobile host’s foreign network |
| Link-Local Address | - | An IPv6 address valid only on the local link |
| Global Unicast Address | - | A globally routable IPv6 address |
| Anycast Address | - | An address sent to the nearest of a group of interfaces |
| Multicast Address | - | An address sent to a group of interfaces |
| Interior Gateway Protocol | IGP | The collective term for intra-domain routing protocols |
| Exterior Gateway Protocol | EGP | The collective term for inter-domain routing protocols |
