address and network mask, you can get the address of the network segment where the destination
host or router resides. For example, if the destination address is 129.102.8.10 and the mask is
255.255.0.0, the address of the network segment where the destination host or router resides is
l
z
z
discovered by different routing protocols, or be manually configured static routes.
be selected as the current
all into the following categories:
to the
129.102.0.0. A mask consists of some consecutive 1s, represented either in dotted decima
notation or by the number of the consecutive 1s in the mask.
z
Interface: It indicates through which interface IP packets should be forwarded to the destination.
Nexthop: It indicates the next router that IP packets will pass through to reach the destination.
Preference: There may be multiple routes with different next hops to the same destination. These
routes may be
The one with the highest preference (the smallest numerical value) will
optimal route.
According to different destinations, routes f
z
Subnet route: The destination is a subnet.
z
Host route: The destination is a host.
In addition, according to whether the network where the destination resides is directly connected
router, routes fall into the following categories:
z
Direct route: The router is directly connected to the network where the destination resides.
z
Indirect route: The router is not directly connected to the network where the destination resides.
In order to avoid an oversized routing table, you can set a default route. All the packets for which the
router fails to find a matching entry in the routing table will be forwarded through this default route.
Figure 21-1
shows a relatively complicated internet environment, the number in each network cloud
dress. Router G is connected to three networks, and so it has three IP
Figure 21-1
indicate the network ad
addresses and three physical ports. Its routing table is shown in
.
Figure 21-1
Routing table
n Network
erface
Destinatio
Nexthop
Int
11.0.0.0 14.0.0.1
3
12.0.0.0 14.0.0.1
3
13.0.0.0 16.0.0.1
2
14.0.0.0 14.0.0.3
3
21-2