Module 15 Cisco
Module 15 Cisco
Static Routes
Static routes can be configured for IPv4 and IPv6. Both protocols support the
following types of static routes: standard static route, default static route, floating
static route, and summary static route. Static routes are configured using the ip route
and ipv6 route global configuration commands. When configuring a static route, the
next hop can be identified by an IP address, exit interface, or both. How the
destination is specified creates one of the three following types of static route: next-
hop, directly connected, and fully specified. IPv4 static routes are configured using
the following global configuration command: ip route network-address subnet-
mask { ip-address | exit-intf [ip=address] } [distance]. IPv6 static routes are
configured using the following global configuration command: ipv6 route ipv6-
prefix/prefix-length { ipv6-address | exit-intf [ipv6-address]} [distance]. The command
to start an IPv4 routing table is show ip route | begin Gateway. The command to
start an IPv6 routing table is show ipv6 route | begin C.
In a next-hop static route, only the next-hop IP address is specified. The exit interface
is derived from the next hop. When configuring a static route, another option is to use
the exit interface to specify the next-hop address. Directly connected static routes
should only be used with point-to-point serial interfaces. In a fully specified static
route, both the exit interface and the next-hop IP address are specified. This form of
static route is used when the exit interface is a multi-access interface and it is
necessary to explicitly identify the next hop. The next hop must be directly connected
to the specified exit interface. In a fully specified IPv6 static route, both the exit
interface and the next-hop IPv6 address are specified. Along with show ip
route, show ipv6 route, ping and traceroute, other useful commands to verify
static routes include: show ip route static, show ip route network, and show
running-config | section ip route. Replace ip with ipv6 for the IPv6 versions of the
command.
A default route is a static route that matches all packets. A default route does not
require any far-left bits to match between the default route and the destination IP
address. Default static routes are commonly used when connecting an edge router to
a service provider network, and a stub router. The command syntax for an IPv4
default static route is similar to any other IPv4 static route, except that the network
address is 0.0.0.0 and the subnet mask is 0.0.0.0. The 0.0.0.0 0.0.0.0 in the route will
match any network address. The command syntax for an IPv6 default static route is
similar to any other IPv6 static route, except that the ipv6-prefix/prefix-length is ::/0,
which matches all routes. To verify an IPv4 default static route, use the show ip
route static command. For IPV6 use the show ipv6 route static command.
A host route is an IPv4 address with a 32-bit mask or an IPv6 address with a 128-bit
mask. There are three ways a host route can be added to the routing table:
automatically installed when an IP address is configured on the router, configured as
a static host route, or automatically obtained through other methods not covered in
this module. Cisco IOS automatically installs a host route, also known as a local host
route, when an interface address is configured on the router. A host route can be a
manually configured static route to direct traffic to a specific destination device. For
IPv6 static routes, the next-hop address can be the link-local address of the adjacent
router; however, you must specify an interface type and an interface number when
using a link-local address as the next hop. To do this, the original IPv6 static host
route is removed, then a fully specified route is configured with the IPv6 address of
the server and the IPv6 link-local address of the ISP router.