Powered by Blogger.

Configuring IP Address




Configuring IP address on an Interface:

You must plan your network before configuring the IP addresses. You need to calculate the subnet mask for the network. After calculating the subnet masks, you have to decide the router IP addresses. For example, consider a Class C network with three routers. The IP addresses of the routers are 192.172.2.7, 192.172.22, and 192.172.2.40. To configure IP addresses for the router, you have to configure the interface and then the IP address for that interface. A router may consist of multiple interfaces such as:

Ø  Ethernet – Provides an interface that operates through an Ethernet card.

Ø  Serial – provides a general interface that can be used with any type of device. Serial interface operates through serial ports.

To configure IP address for the router interface:

1.    Open the CLI.

2.    Switch to the configuration mode.

3.    Type interface Ethernet 0 to configure the Ethernet interface for the port 0.

4.    Type ip address 192.172.2.7 255.255.255.240 to configure the IP address for this interface, where, 192.172.2.7 indicates the IP address and 255.255.255.240 indicates the subnet musk.

5.    Press enter

To configure IP address for serial interfaces, you can enter serial 0 or serial 1 in place of Ethernet in the interface command. 0 and 1 indicates the number of the serial port. The IP addresses for the router can be viewed using the show interface command. The remaining two routers can be configured similarly. If every router has three different interfaces, you can configure a different IP address for all interfaces. The router will perform data transactions on all three interfaces.

After all configurations are made, you can update the startup configuration file by using the copy command.

Serial Interface Command

The serial interface is connected to the router via a CSU/DSU type of device. The Channel 
Service Unit / Data Service Unit (CSU/DSU) is a device that connects to the router to a 
digital line. The CSU / DSU device provides clock signals to the router to transfer data 
through the connecting link in the network. If you connect two Cisco routers back to back 
using a serial interface, the routers act as the data terminal equipment (DTE) by default. The 
DTE is a device that controls data flow to and from the computer. To enable the serial 
interface, one router should be configured as the data communication equipment (DCE) 
using the clock rate command. The DCE is a device that allows communication between the 
DTEs. The syntax of the command is:

clock rate x

where, x is the clock rate in bits per second. Select the clock rates supported by your serial 
interface. Use the clock rate ? command to display the available clock rates on the interface.
All interfaces have a bandwidth value, which is used by the routing protocols such as IGRP,
 EIGRP, and OSPF to calculate best path to a network. You can also change the bandwidth 
of the interfaces using the bandwidth command.

Router configurations

Whenever you change the router configuration, it is required to save the changes to the configuration files. The router loses the modified configuration on reload or power failure, if changes are not saved. The configuration files also contain the commands that are used to configure the router. These files are of two type, Running configuration and Startup configuration. The configuration files are located in the RAM, NVRAM or TFTP server. The currently operating configuration of the router is located in RAM. The backup and saved configurations are either located in NVRAM or TFTP server.

Creating Configuration File

You can create a new configuration file for the router from the CLI. You need to enter the privileged mode to begin the configuration of the router. The actual configuration is performed in the configuration mode. The configuration of a router includes:

> Enable routing
> Configuring different interfaces
> Configuring routing protocols

To create an empty configuration file:

1. Open the CLI of the router.
2. Switch to the privileged mode.
3. Type configure t to switch to the configuration mode
4. Press enter. The command prompt changes to (config)#.
5. Type exit to complete the configuration.
6. Type copy running-config startup-config to save the configuration as the default startup-configuration file for the router.

Viewing Configuration Files

The configuration files for the router can be displayed using the show command from the privileged mode. To view the configuration file, you need to open the CLI of the router and switch to the privileged mode. You can use the following commands to view the configuration files.

> To view startup  configuration file, type show startup-config in the command prompt.

> To view running configuration file, type show running-config or show run in the command prompt.

Saving onfiguration Files

The configuration changes that you make to the router are saved to the current configuration file. These changes will not reflect in the router, when the router reboots. To apply the changes, when the router restarts, the changes need to be saved in the running-config file. The copy command allows you to copy the configuration file from one location to the other. You can copy the configuration file from the NVRAM, the ftp server, or from the ROM as the running configuration file.

 The syntax of the copy command is:

copy [source] [destination]

To save the configuration changes to the running-config file from the TFTP server:

1. Open the router CLI.
2. Switch to the privileged mode.
3. Type copy tftp running-config to copy the configuration changes to the running-config file from the TFTP server. Then the router prompts you for the remote address.
4. Enter the remote address.
5. Press enter. The router prompts you for the source file name.
6. Enter the source file name.
7. Press enter to copy the file.

Erasing Configuration Files:

You can delete the existing configuration files for the router using the erase command. The erase command removes the startup-config file from the NVRAM.

To delete a configuration file:

1. Open the CLI.
2. Switch to the privileged mode.
3. Type erase startup-config to delete the startup-config file from the NVRAM
4. Type show startup-config to verify whether the configuration file is deleted.

Verifying Router Configuration

After you configure the router, you can verify the configuration using the show running-config command. You can use the show startup-config command to verify the configurations that would be used on reloading the router. The commands such as pig, telnet, show cdp and traceroute allow you to troubleshoot the configuration if required. Few other command that enable you to see the router configuration are:

show interface
show ip interface
show ip interface brief
show protocols
show controllers

The show interface command is one of the most common commands that can be used to verify the status and configuration of the router interfaces. You can view a detailed configuration of individual interfaces using the show interface command. The syntax of this command is given as:

show interface type slot/port

where, type represents the type of router interface.For example, to view the details of the serial 0 interface, type show interface serial 0 in the command prompt.

The show ip interface command allows you to view IP configuration of the router interface. The syntax of this command is given as:

show ip interface type slot/port

where, type represents the type of the router interface. The output of this command includes status of the intrface, IP address and the mask and the information of whether the access list is configured to the interface.
show ip interface brief_Command

the show ip interface brief command allows you to view the router interface description in a single line. It displays an overview of the interface that includes the logical address and status of the interface.

show protocols Command
The show protocols command displays the status of the physical and data link layers and IP addresses of each interface command to the router.

 show controllers Command

The show controllers command enables you to view the information of the physical connections of the interface. In case of serial interface, the command displays the type of serial cable connected to the serial port of the router.

Consider two Cisco routers R1 and R2, connected back to back using a DTE/DCE cable. The routers cannot communicate, as both are DTE devices. To allow serial communication between them, configure one router as a DCE device. If you want to verify which router is connected to the DCE end of the cable, use the show controllers command. The syntax of the command is given as:

show controllers serial slot/port

For example, you use the show controllers command on router R1. If the output of the command displays the interface as V.35 DCE cable, you must configure the router R1 to provide clocking to the router R2.






  © Blogger template Werd by Ourblogtemplates.com 2009

Back to TOP