16: IP R
Through the Routing
Configuring the IP Routing Protocol is described in the following sections:
Selecting Routes Through the Routing Table
Routing Management Policy
For a router, the routing table is the key to forwarding packets. Each router saves a
routing table in its memory, and each entry in this table specifies the physical port of
the router through which a packet is sent to a subnet or a host. The packet can reach
the next router over a particular path or reach a destination host through a directly
A routing table has the following key entries:
A destination address—Identifies the destination IP address or the destination
network of the IP packet, which is 32 bits in length.
A network mask—Made up of several consecutive 1s, which can be expressed
either in the dotted decimal format, or by the number of the consecutive 1s in the
mask. Combined with the destination address, the network mask identifies the
network address of the destination host or router. With the destination address
and the network mask, you have the address of the network segment where the
destination host or router is located. For example, if the destination address is
220.127.116.11, the address of the network where the host or the router with the
mask 255.255.0.0 is located is 18.104.22.168.
The output interface—Indicates an interface through which an IP packet should be
The next hop address—Indicates the next router that an IP packet will pass
The priority added to the IP routing table for a route—Indicates the type of route
that is selected. There may be multiple routes with different next hops to the same
destination. These routes can be discovered by different routing protocols, or they
can be the static routes that are configured manually. The route with the highest
priority (the smallest numerical value) is selected as the current optimal route.
Routes are divided into the following types: subnet routes, in which the destination is
a subnet, or host routes, in which the destination is a host.
In addition, depending on whether the network of the destination host is directly
connected to the router, there are the following types of routes:
Direct route—The router is directly connected to the network where the
destination is located.
Indirect route—The router is not directly connected to the network where the
destination is located.
To limit the size of the routing table, an option is available to set a default route. All
the packets that fail to find a suitable table entry are forwarded through this default
In a complicated Internet configuration, as shown in Figure 53, the number in each
network is the network address. The router R8 is connected to three networks, so it
has three IP addresses and three physical ports. Its routing table is shown in Figure 53.