Configure Static Routing

Plugging Cisco routers together and hoping they work out of the box is not something you should hope for. A router can learn about networks in two ways, manually from configured static routers which we will talk about today and dynamic routing protocols which will talk about on Wednesday. Let's get started! Static routes are not that uncommon they at first need some attention to get set up but after it is working nothing needs to change. A good example of using a static route is with a stub network. A stub network is only accessed by a single router and no other routes are configured so there is only one path the network traffic can take. Notice the picture below and how any traffic going towards the network cloud from the 192.168.1.0 network will always pass the 172.16.5.0 network. Why waste putting a routing protocol here?) 

Stub Network
In order to configure a static route you must be in the global configuration mode, the ip route command complete syntax is the following: ip route prefix mask {ip-address} | interface-type interface-number [ip-address]} [dhcp] [distance] [name next-hop-name] [permanent | track number] [tag tag] For the CCENT/CCNA the complete syntax is not relevant, let's use a simpler version of the ip route syntax: ip route network-address subnet-mask {ip address | exit interface} The network address is the destination network or the remote address that will be added in the routing table. (For the complete syntax this follows on the prefix parameter) The subnet mask is the subnet mask of the remote network that will be added in the routing table. (For the complete syntax this follows on the mask parameter) One or both of the following commands must be configured: The ip-address in the syntax is usually called the next-hop router's IP address The exit-interface is the outgoing interface that would be used in forwarding the packets io the destination network (For the complete syntax this follows on the interface-type interface-number parameter) Looking at the picture above we need to have a static route on R2, we can do these in two ways the first example is using the next hop IP address. (For this example the next hop IP address is 172.16.5.1 R1's serial 0/0/0 interface. The next example is using the exit interface out of R2. [code]R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.5.1[/code]   [code]R2(config)#ip route 192.168.1.0 255.255.255.0 serial 0/0/1[/code] The last thing we need to do in order for this stub network to work is put a default route on R1 because R2 is going to the cloud the (internet or network) any traffic like a web request going to the internet needs to be forwarded to R2. A default route is a route that will match every IP address. Remember that a router does not have every single possible route on the internet or network usually these can be summary routes and default routes. Like on R2 we can do this in two ways, the first example is using the next hop IP address. (For this example the next hop IP address is 172.16.5.2 R2's serial 0/0/1 interface. The next example is using the exit interface out of R1. [code]R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.5.2[/code]   [code]R1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0[/code] That's my tutorial for configuring static routes. Static routes do need some overhead but once you get them working you don't need to even touch it again. You can find more information at Cisco.com and the Cisco Learning Network. Like always I hope this information/tutorial was informative if you have any ideas on the next topic I should cover in the ICND1 or ICND2 area let me know by commenting below.


Comments:

Dynamic Routing Protocols | Cisco Skills -

[...] Post navigation ← Previous [...]