Cisco Router Interface Configuration – CCNA Course
In this article, we’ll see the Cisco Router interface configuration under our CCNA course.
Because a primary purpose of Cisco routers and switches is to transfer data between their interfaces, the configuration parameters that you apply to these interfaces dramatically affect how these devices operate in an Internetwork.
These interface configurations vary depending on the type of interface you are configuring and even which Layer 2 frame encapsulation you are utilizing for WAN interfaces. This article looks specifically at some of the basic configurations that you can apply to LAN and WAN interfaces on a router.
Assigning an IP address
If you configure an IP address on an interface, that router systematically assumes that all packets that are destined for that IP address’s network should be routed out that specific interface.
For instance, if you assign the IP address of 192.168.1.1 with a subnet mask of 255.255.255.0 on a serial interface, the router automatically assumes when that interface is enabled that all packets destined for 192.168.1.x are to be sent out the WAN serial interface.
As you can see, assigning an IP address to an interfaces plays a pivotal role in a router’s primary routing operation. The command to help fulfill that role on a given interface is IP address, followed by the assigned IP address for that interface and the subnet mask.
For instance, if you wanted to assign the IP address of 192.168.1.1 with a subnet mask of 255.255.255.0 to the serial 0/0 interface of the 2600 modular router, the configuration would look like this:
Router(config)#interface serial 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0
The first line in the configuration navigates you to the appropriate interface that you wish to configure. In this case, it is the first serial interface in the first module on the 2600 router (serial 0/0).
The second command assigns the IP address of 192.168.1.1 to this interface. After this interface is enabled, this router forwards any packets destined for 192.168.1.x 255.255.255.0 out of its serial 0/0 interface.
For documentation and reference, you can assign a description to this interface by using the description command on the interface:
Router(config-if)#description This is my first interface description.
Enabling the Interface
All routers interfaces are in a disabled (shutdown) state by default. It is the duty of the configuring administrator to enable the interface by using the no shutdown command.
If properly configured and connected to the network, the interface comes up and begins routing data in and out that interface. An example of administratively enabling the interface with the no shutdown command is as follows:
Router(config)#interface serial 0/0 Router(config-if)#no shutdown
LAN specific commands
Many of the LAN interfaces on a router have auto-sensing capabilities such as duplex and speed. For instance, a Fast Ethernet interface can run out at speeds of 10mbps or 100 Mbps at half or full-duplex.
It is generally a good idea to manually assign an interface’s duplex and speed in case your connected device does not support auto-negotiation. The configuration to manually set the speed and duplex on an interface is fairly straightforward, as follows:
Router(config)#interface FastEthernet 0/0 Router(config-if)#speed 100 Router(config-if)#duplex full
When configuring synchronous serial interfaces, you may discover that you have to configure some additional parameters to ensure proper functionality of your Wide Area Network (WAN) interfaces.
For instance, when you have a serial crossover cable between two routers’ serial interfaces in a lab environment, the serial interface with the DCE cable attached to it has to provide timing for the network for data to be recognized on this link.
The command to provide this synchronous timing on the network is clock rate, followed by the speed in bits per second.
Additionally, WAN serial interfaces automatically assume that the circuit connected to them is of T1 speed (1.54mbps). In instances where you have a set of lower clock rate or you are connecting to a WAN service that is using sub-T1 speeds or virtual circuits, it is imperative to redefine the bandwidth that is connected to the interface for accurate operation of routing decisions. You can achieve this redefinition by using the bandwidth command followed by the speed of the circuit in kilo-bits per second.
The following configuration demonstrates both of these commands in action for a router in a lab simulating a 64kbps circuit:
Router(config)#interface Serial 0/0 Router(config-if)#clock rate 64000 Router(config-if)#bandwidth 64
If you are like me, you like living on the edge by configuring your devices during scheduled brown-outs in a room full of people with size 15 feet who are prone to accidentally kick the power cord out of your Cisco device.
The problem with that lifestyle is that when the power returns to your router or switch, the hard work you put into your configuration is gone because all your configurations were made to the running configuration stored in volatile RAM. This is unfortunately true unless of course, you save your configuration file into NVRAM and make that your startup configuration.
The versatile command that deserves all this credit for saving your hides is the copy command. With this command, you are telling the Cisco IOS to copy a file from one file system to another.
Some options you have after the copy command are running-config, startup-config, flash, and tftp.
Router(config)#copy running-config startup-config
Step by step – Cisco Router Interface Configuration
- Go to Privileged EXEC by typing enable.
- Enter Global configuration by typing “configure terminal“.
- Go into the Fast Ethernet interface 0/0 and configure the IP address of 172.16.1.1/16 by typing “IP address 172.16.1.1 255.255.255.0“.
- Enable the interface using the “no shutdown” command.
- Type “exit” and go into the Serial interface 0/0 and configure the IP address of 192.168.1.1/24 by typing “ip address 192.168.1.1 255.255.255.0″.
- Enable the interface by using the “no shutdown” command.
- Type “end” or press Ctrl+Z to go back to Privileged EXEC, and save the configuration by using “copy running-config startup-config”.
The result should look something like the following:
! step 1 Router>enable ! step 2 Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z ! Step 3 Router(config)# interface fastethernet 0/0 Router(config-if)#ip address 172.16.1.1 255.255.0.0 ! step 4 Router(config-if)#no shutdown ! step 5 Router(config-if)#exit Router(config)#interface serial 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 ! step 6 Router(config-if)#no shutdown ! step 7 Router(config-if)#router(config-if)#end 00:04:48: %SYS-5-CONFIG_I: Configured from console by console Router# copy running-config startup-config Destination filename [startup-config]?