Cisco IOS Configuration Commands

   

Cisco IOS Configuration Commands

Now that you have seen how to use the standard UNIX tools to configure a simple router, consider configuring a generic Cisco router to perform the same task. Even if you have no interest in using Cisco for this purpose, please read on as you will see a marked similarity between the command sets shown here and the Linux Policy Routing toolset. If you are already familiar with Cisco IOS (Internetwork Operating System) command sets, feel free to skip this section.

This section will assume that no special configuration tasks are needed for the Cisco router. I will only show how to set it up to perform the exact same task and configuration as you have just seen with the Linux router.

The Cisco IOS configuration commands are entered at a terminal session with the router directly into the configuration. This session is either directly connected through the management port or a telnet session. Alternatively, you can enter in all the commands to a file, which is then either uploaded into the router or the router can boot off of a TFTP server and load the configuration file. If you want to learn how to do these various things, please refer to the Cisco IOS documentation. This section assumes that you already have this knowledge.

The core command used in most of this section is the ip command. This command is then followed by the action to take. For example, you have the ip address command for adding and deleting TCP/IP addresses, and the ip route command for adding and deleting TCP/IP routes. Other subcommands are covered as you read through this book. For more information refer to the Cisco IOS documentation.

ip address

The ip address form of the command will let you configure your interfaces with IPv4 addresses. On the router you would then have the following configuration command file sections:

 
 interface FastEthernet0  ip address 192.168.1.254 255.255.255.0 ! interface TokenRing0  ip address 10.1.1.254 255.255.255.0 
 

Note that unlike UNIX, the interface to operate upon is specified by a different command, interface . Thus in IOS a group of commands can be specified to operate upon an interface by including them under the appropriate interface section.

In IOS, as in Linux 2.1 and higher, assigning an IP address to an interface automatically places the appropriate network route into the routing table. Thus the preceding configuration file snippet has already defined the directly connected network routes for 192.168.1.0/24 and 10.1.1.0/24.

ip route

In order to complete your configuration you need to specify the default route. This is done through the ip route subcommand. You need to add the full default route specification:

 
 ip route 0.0.0.0 0.0.0.0 10.1.1.1 
 

This will add the default route to all other destinations. This Cisco router is now in the same state as your Linux router from the previous section. Of course there are other commands that need to be in the Cisco configuration file in order for this router to work, but this section is only considering what you need to input to enable the same behavior you saw with the UNIX router system.


   
Top


Policy Routing Using Linux
Policy Routing Using Linux
ISBN: B000C4SRVI
EAN: N/A
Year: 2000
Pages: 105

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net