3.4. Prefix lengths for routing

In the early design phase it was planned to use a fully hierarchical routing approach to reduce the size of the routing tables maximally. The reasoning behind this approach were the number of current IPv4 routing entries in core routers (> 104 thousand in May 2001), reducing the need of memory in hardware routers (ASIC driven) to hold the routing table and increase speed (fewer entries hopefully result in faster lookups).

Todays view is that routing will be mostly hierarchically designed for networks with only one service provider. With more than one ISP connections, this is not possible, and subject to an issue named multi-homing.

3.4.1. Prefix lengths (also known as "netmasks")

Similar to IPv4, the routable network path for routing to take place. Because standard netmask notation for 128 bits doesn't look nice, designers employed the IPv4 Classless Inter Domain Routing (CIDR, RFC 1519 / Classless Inter-Domain Routing) scheme, which specifies the number of bits of the IP address to be used for routing. It is also called the "slash" notation.

An example:

3ffe:ffff:100:1:2:3:4:5/48
   

This notation will be expanded:

3ffe:ffff:0100:0000:0000:0000:0000:0000
   

ffff:ffff:ffff:0000:0000:0000:0000:0000
   

3.4.2. Matching a route

Under normal circumstances (no QoS) a lookup in a routing table results in the route with the most significant number of address bits means the route with the biggest prefix length matches first.

For example if a routing table shows following entries (list is not complete):

3ffe:ffff:100::/48     ::            U  1 0 0 sit1 
3ffe::/16              ::192.88.99.1 UG 1 0 0 tun6to4 
2000::/3               ::192.88.99.1 UG 1 0 0 tun6to4
   

Shown destination addresses of IPv6 packets will be routed through shown device

3ffe:ffff:100:1:2:3:4:5/48  ->  routed through device sit1
3ffe:ffff:200:1:2:3:4:5/48  ->  routed through device tun6to4