15 configuring ip unicast-routing, 1 enabling static routing – CANOGA PERKINS 9175 Configuration Guide User Manual
Page 89
CanogaOS Configuration Guide
15-1
15 Configuring IP Unicast-Routing
This chapter contains basic IPUC configuration examples. To see details on the
commands used in these examples, or to see the outputs of the validation commands,
refer to other references. To avoid repetition, some Common commands, like configure
terminal, have not been listed under the Commands Used section.
15.1 Enabling Static Routing
This example shows the complete configuration required to enable static routing in a
simple network topology. Static routes are useful in small networks. They are simple
solutions for making a few destinations reachable. Large networks use dynamic routing
protocols. A static route is composed of a network prefix (host address) and a nexthop
(gateway).
Router R1 is configured with three static routes, one for the remote network
10.10.12.0/24 and the others for the loopback addresses (host addresses) of routers R2
and R3. In all three routers, interface eth0 of router R2 is the gateway. Router R3 is
configured with a default static route that is equivalent to configuring separate static
routes with the same gateway or nexthop address. Router R2 has two routes, one for
each of the remote routers' loopback address.
Figure 15-1: Static Routing
R1
DUT# configure terminal
Enter the configure mode
DUT(config) # interface loopback 0
Specify the loopback as the interface you want to
configure.
DUT(config-if) # ip address 192.168.0.1/32
Configure the IP address on this interface and specify a
32-bit mask, making it a host address.
DUT(config-if) # exit
Exit the Interface mode and return to Configure mode.
DUT(config) # ip route 10.10.12.0/24 10.10.10.2
DUT(config) # ip route 192.168.0.2/32 10.10.10.2
DUT(config) # ip route 192.168.0.3/32 10.10.10.2
Specify the destination prefix and mask for the network
for which a gateway is required, for example,
10.10.12.0/24. Add a gateway for each of them (in this
case 10.10.10.2 for all). Since R2 is the only next hop
available, you can configure a default route instead of
configuring the same static route for individual
addresses, see the configuration of R3.
R2
DUT# configure terminal
Enter the Configure mode
DUT(config) # interface loopback 0
Specify loopback as the interface you want to configure.
DUT(config-if) # ip address 192.168.0.2/32
Configure the IP address on this interface and specify a