Cisco Router Configuration – CLI Static and Dynamic Routing Configuration Basics

1. Explain and provide an example of how to define a static route. Explain when static routes would be used.

Configure a static route by first logging into user exec or enable mode by typing enable at the CLI then enter the password when requested. Then type config t and press Enter to get into the configuration mode. Then type:

ip route 192.168.0.0 255.255.255.0 10.0.0.1

and press Enter to add a router to the 192.168.0.0 network through the 10.0.0.1 gateway. Static routes should be used when the network design does not warrant the additional overhead of enabling a routing protocol and most commonly when configuration a point to point WAN link in which there are only two hosts on the network segment.

2. How do routers use the routing table to determine the best path to a destination network?

Routers use the routing table to lookup the next hop or neighbor to which they need to forward traffic to a specific destination. If the routing table contains a specific entry for the destination then the next hop specified in the routing table for that destination is used. If there is no entry for that destination then the router will forward the traffic to the default gateway configured in the routing table. If there is more than one path to the same destination listed then the router will use the path chosen based upon the routing protocol (by administrative distance), prefix length (the larger the number of bits in the subnet mask are preferred), and metric of that path.

3. Explain how distance vector routing protocols update their routing table and the methods used to ensure that the information is correct.

Distance vector routing protocols update their routing tables by sending their entire routing table to their next hop neighbors. The routing tables when using distance vector protocols only what the router knows about it’ neighboring routers rather than the entire network topology as is the case with a link state protocol. Distance vector protocols usually broadcast updates to their neighbors but can be configured to use multicast instead which conserves resources. Show commands can be used once the protocol is running to verify that routes are correct. Authentication can also be enabled so that only the network devices configured to participate in the distance vector updates are included in the updates. Also, using the passive-interface mode on interfaces will disable updates from those interfaces while they can still participate by listening which can be used to control which interfaces provide updates.

4. Explain the importance of administrative distance in determining path selection.

Administrative distance is used by routers to determine which path to select when there are multiple paths available to the same destination. More reliable route sources have lower administrative distances. For example a static route has an administrative distance of 1, EIGRP is 5 while a directly connected route is 0 (since a routing protocol that automates adding routes would be less reliable than a human entering the route and directly connected would be most reliable of all).

In order to configure the routers static routes first type enable then type in the privilege mode password then type config t to enter configuration mode. Then to configure static routes, after you have planned the network IP addressing topology, and after the IP addresses of the interfaces have been configured, on the CLI type (while in configuration mode) ip route 172.16.0.0 255.255.0.0 10.0.0.1 for example to enter a router to the 172.16.0.0 network from the 10.0.0.0 network through the 10.0.0.1 gateway. To add default routes, first make sure the CLI is in configuration mode then ip route 0.0.0.0 0.0.0.0 10.0.0.1 to add the gateway of last resort or ip route 0.0.0.0 0.0.0.0 s0/0 to make s0/0 the gateway of last resort.

5.

To enable RIP on a router, while starting in configuration mode type router rip and then RIP will be enabled and the CLI will be in router mode. Then type:

version 2

to enable RIP version 2 which should be used instead of version 1 as it can handle classless routing and adds security and performance features. Then add the networks that will be advertised by RIP by typing:

network 10.0.0.0

while in router mode, for example so that RIP will advertise the 10.0.0.0 network to neighboring routers. Use the same network command for each network that will be advertised by RIP. Then once all networks have been added, type

Exit

and press Enter then type

Exit

again and press Enter then type

show ip route

to verify that routes have been added to the routing table using RIP. You can also type

show ip route rip

to see only routes added by RIP.

6.

To enable IGRP on a router, first start in configuration mode by typing router igrp 100 and then IGRP will be enabled and the CLI will be in router mode. Then type:

network 10.0.0.0

to configure IGRP to handle routing tables for network 10.0.0.0 (so this would be one of the networks advertised by IGRP). Note that the subnet mask is not included because IGRP is not classless. Then configure IGRP neighbors of the router by typing:

neighbor 10.0.0.100

while in router mode, for example so that IGRP will advertise the 10.0.0.0 network to adjacent routers. Then once all networks have been entered, type Exit and press Enter then type Exit again and press Enter (to exit out of router mode and also out of configuration mode). Then type:

show ip route

to verify that IGRP routes have been added to the routing table which means that IGRP is working.

Leave a Reply

Your email address will not be published. Required fields are marked *

*