Configuring Routing on a Cisco router
IP routing is automatically on by default. If ip routing has been disabled , you can just turn it on in the config mode using the “ip routing” command .
Dumbledore(config)#ip routing
Dumbledore(config)#ctrl-Z
There are two ways a router knows where to send packets.
The administrator can assign static routes, or
the router can learn routes by using a dynamic routing protocol
Static routes are normally used in very simple networks.
A static route, tells the Cisco IOS in the router that any network traffic going to a specified network should be forwarded to an specific IP address (just like a gateway, if you want to go somewhere, just go though that gate !). This is done with the “ip route” command.
Dumbledore#config t
Dumbledore(config)#ip route 192.168.1.0 255.255.255.0 1.1.1.1
Dumbledore(config)#ctrl-Z
192.168.1.0 is the remote network that you want to send packets to (remember this is the “network address, not an IP address of a host ! )
255.255.255.0 is the subnet mask of that remote network
1.1.1.1 is the gateway, this is where you send packets, trying to get to the remote network. This must be a specific IP address (usually the interface IP of your neighboring router)
You can check the routing table using
Dumbledore#show ip route
When running a dynamic routing protocol,
your router talks to the other directly connected routers, and exchange routing information (yes they like to gossip !). Your router tell other router about networks it knows, in turn the other routers tell your router about the networks that they know. This way all routers learn about all available networks. This way all routers (running that dynamic routing protocol) are able to adjust to changes in network topologies. If a route is physically removed, or a neighbor router goes down, the routing protocol searches for a new route.
There are many different dynamic routing protocols,
and they all use different variables, known as "metrics," to decide upon routes. A router needs to be running the same routing protocol as its neighbors. Many routers can, run multiple protocols.
How to configure RIP (Routing Information Protocol) on Cisco routers. As for any configuration, you have to go into the configuration mode
Dumbledore#configDumbledore(config)#router rip
“rip” is the name of the routing protocol
Dumbledore(config-router)#network 1.1.1.0
Dumbledore(config-router)#network 2.2.2.0
Dumbledore(config-router)#ctrl-Z
to check the configuration
Dumbledore#show ip protocols
Now when you issue the show ip protocols command, you should see an entry describing RIP configuration.
Saving Cisco Router configuration
Once you have configured routing on the router, and you have configured individual interfaces, your router should be capable of routing traffic. Give it a few moments to talk to its neighbors, then issue the commands show ip route and show ip arp. There should now be entries in these tables learned from the routing protocol.
If you turned the router off right now, and turned it on again! you would have to start configuration over again. Your running configuration is not saved to any permanent storage media. You can see this configuration with the command show running-config.
Dumbledore#show running-config
You use “copy running-config startup-config” to save
your running configuration.
Dumbledore#copy running-config startup-config. Your configuration is now saved to non-volatile RAM (NVRAM).
Use “show startup-config” to view the config in NVRAM
Disclaimer
This document is to help you configure Cisco routers. We do not guarantee the accuracy of information in this document. Use at your own risk. The author will not be liable for any damages that occur as a result of using this document.