Static Routing

Static routing is a straight forward process. If you want packets to be routed between two routers, update each router’s routing table with the network address of the other router as well as the path to get there

This is how it is done,
  • Name the routers and give the Ethernet and Serial ports desired IP address

  • When you give IP addresses, make sure the serial link that connects both the router are in same network

  • Add the destination network to each router’s routing table using the add route command in the Global config mode.

Let’s configure static routing in the network shown below,

  • Assign IP address to the Ethernet and Serial ports of the first router R1
  • Set the clock rate to 64000 at the serial port of DCE - Data Communication End. When two routers are connected in a network, one acts as the DCE and the other as a DTE – Data Termination End

.

  • Now add the destination network to the routing table and check whether it is connected serially using show ip route command


  • The same procedure is done on the second router. Once this is done, you can ping all the ports successfully

Digg ThisAdd To Del.icio.us Add To Furl Add To Reddit Fav This With Technorati Add To Yahoo MyWeb Add To Newsvine Add To Google Bookmarks Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This

Routing Basics

Routing Basics
The router must know the following details in order to route packets to the destined address
  • Destination Address
  • Neighbor routers from which it can learn about remote networks
  • Possible routes to all remote networks
  • The best route to each remote network

The router can learn these information from the neighboring router or an administrator can manually feed all these information. In dynamic routing, the routing table is automatically updated with all these information. In case of static routing an administrator has to manually feed in the network details of the neighboring as well as remote networks for the packet to be route and every time a device is added or removed, the administrator has to manually update each and every routing table

Digg ThisAdd To Del.icio.us Add To Furl Add To Reddit Fav This With Technorati Add To Yahoo MyWeb Add To Newsvine Add To Google Bookmarks Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This

Configuring a Cisco Router

In the previous posts, I have explained how to upload the IOS and create a start up configuration, now we can configure the router which includes naming and setting passwords.


Name the Router: An un-configured router will show the device name as Router> by default; you have to give it a specific name so that it can be identified easily in a network. For this, we enter the Privilege EXEC mode and give it a host name,

Router>
Router>enable
Router#configure terminal
Router(config)#hostname CORE
CORE(config)

Now we have named the Router as ‘CORE’. This is the same way how you name a Cisco Switch.


Password protecting a router: There are three types of password that can be use to control access on a router. The first one is to limit access to the User EXEC mode; the second one is to limit access to the Privileged EXEC mode and the third one to limit access to the router through telnet.

Console Password: The console password would limit access to the User EXEC mode in a router, which means that if someone connects a PC to the router, he won’t be able to get to the User EXEC mode.


CORE>enable
CORE#configure terminal
CORE(config)#line console 0
CORE(config-line)#password 12345
CORE(config-line)#login
CORE(config-line)#exit


It’s important to use the login command because it’s like asking the router to prompt for the password when someone tries to login. Without the login command, the user won’t be asked for a password.


Enable Mode Password: This password control access to the Privileged EXEC mode. So you can give the user a low level access with the console password and a high level access with the enable mode password.
Continuing with the above configuration,


CORE(config)#enable password 121212
CORE(config)#enable secret NETWORK


There are two ways of setting enable password, you can either use the command enable password or enable secret . The difference is that if don’t use enable secret, the password you type in will appear in the running configuration as plain text, but if you use the enable secret command, the password will be encrypted. If you use both the methods like I did in the above configuration, only the encrypted password will be accepted.


Telnet Password: Telnet is used to login to a router remotely. While the two passwords explained above are optional, Telnet won’t work unless and until you set a password for Telnet in your router.


CORE(config)#line vty 0 4
CORE(config-line)#password CISCO
CORE(config-line)#login


Here vty 0 4 refers to 5 virtual terminals, which means that 5 users can connect to your router at the same time.
This is how the configuration would look like,

Now we have to save this configuration in the NVRAM, so that in case you have to reboot the router, the configuration is not erased. For this, you can use ‘Write’ of ‘copy running-config startup-config’. This procedure can be anytime while configuring also.

If you run ‘show run’ command, you can see that only the enable mode password is encrypted, the rest are in plaintext. In order to encrypt the entire password you can run the ‘Service password-encryption’ in the config mode.

Digg ThisAdd To Del.icio.us Add To Furl Add To Reddit Fav This With Technorati Add To Yahoo MyWeb Add To Newsvine Add To Google Bookmarks Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This

Router booting process

The points below are the step by step process which runs in a router when you switch it on.

  • The first thing it does is a POST, Power On Self Test, which checks whether all the components like the fan, interfaces, memory and CPU are working.
  • The router then loads the IOS. There are three possible locations to find an IOS,

- Flash Memory, which is the default location

- TFTP server

- ROM, the router will boot in the ROM Monitor Mode


  • Now the router has booted up and it looks for a startup configuration file in the NVRAM. Whenever we configure a router, the changes are done in the RAM memory and it has to copied to the NVRAM (Non-Volatile RAM) using the ‘write’ command, so that when you restart the router the startup configuration file is still there.
  • If there is no valid startup configuration file, the router prompts you to go to a set up mode. This is a tedious method, so type No and then the router prompts whether you would like to have an auto install. Press Enter key. The router auto configures and takes you to the User EXEC mode.

Now you have a fresh Cisco router with an IOS and a startup configuration, the next thing we configure is Host names and password for access control.

Digg ThisAdd To Del.icio.us Add To Furl Add To Reddit Fav This With Technorati Add To Yahoo MyWeb Add To Newsvine Add To Google Bookmarks Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This

Setting up a Cisco Device – Installing IOS

IOS, as you know refers to Internetwork Operating System which works only on Cisco devices; it comes in the form of binary (.Bin) file. While selecting an IOS image, you have to first check whether it’s compatible with your device.

The naming of the IOS image is done in such a manner that it contains the compatible device name, the version, in which memory the IOS is going to run and the compression type.

PPPPP - FFFF - MM

• ‘P’ refers to the Platform. It’s usually the device name. Keep in mind that it may not be a router always, but can be any Cisco device that runs on an IOS.
• ‘F’ refers to the features. Like n for IPX, d for Desktop Subset etc.
• The first ‘M’ refers to the run time memory, i.e. where the image is going to run on the router. (F-Flash, M-RAM, R-ROM, L-Relocated at run time)
• The second ‘M’ refers to the compression technique used to compress the image so that it can be transferred to the router. (Z-Zip Compression, X-MZIP Compression, W-STAC Compression)

Examples of an image file c3640–ds–mz.

Getting ready to upload an image file:
If you are uploading IOS image file on a fresh device or just upgrading with a latest version, make sure the version of the IOS is compatible with your device and you have enough flash memory. Use ‘show version’ and ‘show flash’ command for this.
In order to upload the IOS file into the device you require a TFTP server. Once you have the TFTP server installed in your system, it has to set in the server mode then ping your Cisco device to check for connectivity. Now you are good to go.

IOS uploading process:
. Launch the TFTP server and set the default directories for upload and download
In the privileged mode, type the command ‘copy tftp flash’. This will copy the IOS file in the upload directory to the flash memory
. When prompted for the address of the remote host, type in the IP address of your system
. And when prompted for the source file name, type in the IOS image file name and add the extension .bin
. Once the erase and upload process is done, the device restarts and boot under the new IOS.

When the IOS is corrupted of erased:
If something goes wrong, like uploading a non compatible IOS image or the image gets corrupted, the devices gets booted in a ‘ROM monitor mode’ which is like the ‘safe mode’ in Windows. This can be identified with the prompt ‘hostname (boot)>

This is possible because an operating system is loaded in the ROM memory of the device to boot in case the IOS image fails and since this OS is in the ROM memory, there is no question of it getting corrupted.
Now you can continue the process of uploading IOS and make sure you don’t make any mistakes this time.

Some copy commands:
To copy from router to system: R#copy run tftp
To copy from system to router: R#copy tftp run
To copy from flash to system: R#copy flash tftp
To copy from system to flash: R#copy tftp flash
For all the above copy commands to work TFTP server should be running and the router should be able to ping that system.

TFTP servers are small in size and available for free download. There are a lot of free TFTP servers out there, pick one that’s easy to use.
If you are using Windows Visata, you won’t see HyperTerminal in that. You can download this for free from internet.

Digg ThisAdd To Del.icio.us Add To Furl Add To Reddit Fav This With Technorati Add To Yahoo MyWeb Add To Newsvine Add To Google Bookmarks Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This