*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  Linux HOWTOs -> Prefix lengths for routing              
Title
Content
 
   
Prefix lengths for routing

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 "Application Specified Integrated Circuit" 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 (infos on multi-homing: Procider-Internal Aggregation based on Geography to Support Multihoming in IPv6; GAPI: A Geographically Aggregatable Provider Independent Address Space to Support Multihoming in IPv6; Extension Header for Site-Multi-homing support; IPv6 Multihoming Solutions)

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:

  • Network:

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

  • Netmask:

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 
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
   
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service