Cisco CCNA Static and Dynamic  Routes


Static routing is fine for very small networks or even lab environments.  Anytime there is a change to the network topology, static routes need to be updated manually.

Dynamic routing is essentially a necessity in larger networks.  Routing protocols can dynamically update routing tables to account for failures and changes within the network.  when protocols are used to find and update routing tables on routers.

A routing protocol defines the set of rules used by a router when it communicates between neighbor routers.


Cisco CCNA Static Routes


Static routing occurs when you manually add routes in each router’s routing table. There are pros and cons to static routing, but that’s true for all routing processes.

Things that are good about static routing:

-No overhead on the router CPU

-No bandwidth usage between routers

-Security (because the administrator can allow routing to only certain networks)

Things that aren’t so good about static routing:

-The administrator must really understand the internetwork and how each router is connected in order to configure routes correctly.

-If a network is added to the internetwork, the administrator has to add a route to it on all routers—by hand.

-It just won’t work in large networks because maintaining it would be a full-time job in itself.

General rule is static routing is fine for small static networks but does not scale and requires manual changes when the topology changes.


Cisco CCNA Static Route Configuration


Here’s the command you use to add a static route to a routing table:

ip route

[destination_network] [mask] [next-hop_address

or exitinterface] [administrative_distance] [permanent]

This list describes each command in the string:

ip route: The command used to create the static route.

destination network: The network you’re placing in the routing table.

mask: The subnet mask being used on the network.

next-hop address: The address of the next-hop router that will receive the packet and forward it to the remote network. This is a router interface that’s on a directly connected network. You must be able to ping the router interface before you add the route.

exit interface: You can use it in place of the next-hop address if you want, but it’s got to be on a point-to-point link, like a WAN. This command won’t work on a LAN (i.e. Ethernet).

administrative distance: By default, static routes have an Administrative Distance of 1 (except when using exit interface which will have an Administrative Distance of 0, same as a connected interface). You can change the default value by adding an administrative weight at the end of the command.

permanent: If the interface is shut down, or the router can’t communicate to the next-hop router, the route will automatically be discarded from the routing table. Choosing the permanent option keeps the entry in the routing table no matter what happens.


Cisco CCNA Static Route Example


This slide shows an example of a simple static route command.

The first static route will have an Administrative Distance of 1 while the second will have an Administrative Distance of 0.  Why?

Answer, static routes pointing to a next hop IP address have an administrative Distance of 1 while static routes pointing to an interface have an Administrative Distance of 0.

Note: Static routes are useful in a very small, stub network or dial on demand configurations.  They should not be used in large networks or even small networks that are prone to changes.

Cisco CCNA Default Routes


We use default routing to send packets with a remote destination network not in the routing table to the next-hop router. It is a good idea to always place a default route so that you don’t have any black holes in your routing.  You can only use default routing on stub networks—those with only one exit port out of the network so that you don’t have to run a routing protocol on the router.

Remember, routers look for the longest match of the destination IP address in the routing table starting with 32 bits and working backward.  If no matching route is found, a default route is installed is used and the packet is forwarded to the next-hop specified in the default route.  If no default route is configured and there is not a match in the routing table the packet is dropped.


Cisco CCNA Default Route Example


This slide shows three examples of defining a default route.  All accomplish the exact same thing…

Note:  The “ip default-gateway” command is utilized on layer 2 switches when an IP address is configured on the switch for management purposes.  This allows the switch to be accessible from nodes on remote networks.

The “ip route” has an Administrative Distance of 1.

The “ip route s0/0” has an Administrative Distance of 0 just as a connected interface.

What is the main difference between the two default routes above?

Answer: The Administrative Distance.  The AD of the first default route will be 1 while the AD of the second default route will be 0.

Administrative Distance (AD) defines the reliability of a routing protocol.  It is used by Cisco routers when there are two or more routes to the same destination from two different routing protocols.  When this happens, the route with the lower AD is utilized.


Cisco CCNA Routing Loops


Be careful not to create routing loops as they create black holes.  In the example on the slide the routing loop is created via default routes.  In operational networks routing loops are typically created by redistributing one routing protocol into another.


Cisco CCNA Larger Static Route Example


This slide shows an example of using both static and default routing on a network with four routers. Every router would need to have the routing tables built.  As you can see even in this simple network with 4 routers, numerous routes would need to be configured on the network.  Expanding this from 4 to 40 routers you can see that static routes do not scale, nor do they account for dynamic changes on the network.


Cisco CCNA Static Route Question



Next hop

Next hop

Next hop