CCNA 640-802 And 200-120 Exam Tutorial:
Static Routing And The ip route Command
By Chris Bryant, CCIE #12933
Your Cisco CCNA certification exam training is packed with routing protocols - both versions of RIP, along with EIGRP and OSPF - and it's really easy to overlook static routes and the ip route command. Static routes are important to know for two reasons:
Nothing about static routing is complicated, and we want any questions about static routes to be easy points on CCNA exam day. There are a few tricky little details that you need to know for both the certification exam and working on production networks, so let's take a look at those right now in this CCNA case study.
We're going to use the ip route command to create static routes. The values that follow the ip route command can be tricky at first. The ip route command will be followed by the destination network, a subnet mask, and one of the following:
That's a very important detail to note, so I'll mention it again. If you decide to configure a static route on a Cisco router using an IP address, it has to be the IP address of the downstream router. If you want to specify an interface, it has to be the local router's interface.
In this CCNA case study, we want to configure a static route to 184.108.40.206 /24. The downstream router's interface that will receive these packets has an IP address of 220.127.116.11. The local router's interface that will send the packets is the serial1 interface. We can specify either of these in the ip route command and it will be a valid command, as shown below.
R1(config)#ip route 18.104.22.168 255.255.255.0 22.214.171.124 (next-hop IP address)
R1(config)#ip route 126.96.36.199 255.255.255.0 serial0 ( local exit interface)
Note that these ip route statements use subnet masks, not wildcard masks. The following statements would be invalid on a Cisco router:
R1(config)#ip route 188.8.131.52 0.255.255.255 184.108.40.206
R1(config)#ip route 220.127.116.11 0.255.255.255 serial0
On occasion, you may find it helpful to write a static route that has only one possible destination. This type of route is a host route, and host routes are configured by using a subnet mask of 255.255.255.255. You can still use either the next-hop IP address or local exit interface in the ip route command.
R1(config)#ip route 18.104.22.168 255.255.255.255 22.214.171.124
R1(config)#ip route 126.96.36.199 255.255.255.255 serial0
A static route type that really comes in handy on occasion is a default static route. This does not mean that the packets will use this routing table entry by default; it means that this is the gateway of last resort and will only be used if there are no other possible matches in the routing table.
The syntax for a default static route takes a little getting used to, sinec it uses a destination network and subnet mask of all zeroes. As with the "regular" static route we configured earlier in this tutorial, you can specify a next-hop IP address or a local router interface.
R1(config)#ip route 0.0.0.0 0.0.0.0 188.8.131.52 (next-hop IP address)
R1(config)#ip route 0.0.0.0 0.0.0.0 serial0 (local exit interface)
Static routing is an important part of your Cisco CCNA certification exam training, and it's also a very important part of working with production networks. I can practically guarantee you that this skill will come in handy on exam day and in your networking career!
For literally hundreds of other Cisco tutorials, videos, and articles to help you with your career and your certification exam studies, visit my Cisco Certification tutorials page!
Beat the September 2013 CCNA exam changes with my $44 CCNA Video Boot Camp --
If you don't pass for any reason before September 30, 2013, you will receive full and free access to the all-new Video Boot Camp I'm creating for the 200-101 CCNA exam!
Click that link or this banner and let's get started on your CCNA --- with my $44 CCNA Video Boot Camp!
To your success,
"The Computer Certification Bulldog"