Routing decisions are based on data about reachability of various network prefixes that are either manually configured or collected from routing protocols. This decision making is usually trivial for end hosts (all traffic is sent to the default router) but becomes increasingly complicated as we move towards the Internet core.
Reachability information concerning a specific network prefix is known as a route. Actual content of a route depends both on the routing platform and the protocol that generated it, but typically we can expect to find the following data:
1. Destination prefix consisting of a network address and prefix length.
2. IP address of the next hop, defining the router that receives the outgoing datagrams whenever this route is used.
3. Preference of the route, also known under the (slightly confusing) name administrative distance. This can be used for assigning priorities to routing protocols so that routes learned from one protocol are preferred a priori to those learned from another protocol.
4. Source of the route, i.e., the protocol the route was learned from or a special local source (automatic routes for directly connected networks, static routes etc.). In the case of dynamic routing protocols, the neighbouring router that sent us the route may also be recorded.
5. Other protocol independent data, for example age of the route.
6. Dynamic protocol specific data – metric etc.
Individual routes are organised into sets known as routing tables. The common router platforms have separate tables for IPv4 and IPv6.
Example 6.1. Cisco IOS
Cisco command line interface handles the two routing tables implicitly: commands containing ip route and ipv6 route affect IPv4 and IPv6 unicast routing tables, respectively. For example, the entire routing table can be displayed by entering show ip route for IPv4 and show ipv6 route for IPv6.
Example 6.2. JUNOS
Juniper routers deal with different routing tables explicitly. They are identified by names consisting of a protocol family identifier and a non-negative integer (separated by a period). Thus inet.0 and inet6.0 are the main unicast routing tables for IPv4 and IPv6, respectively. The command show route displays all routing tables. A specific routing table can be selected by appending keyword table and the name of the desired table. For example, enter show route table inet6.0 to get the IPv6 routing table.
Example 6.3. Linux
Linux has separate routing tables for IPv6 and IPv4 that are directly accessible via the /proc filesystem:
• /proc/net/ipv6_route – IPv6 routing table
• /proc/net/route – IPv4 routing table
These tables can be displayed and managed either by traditional Unix commands like netstat and route (of course, with few Linux-specific idiosyncrasies), or by the more powerful ip command that comes with the iproute2 suite. The IPv6 routing table can be displayed using the command ip -6 route.
