Router Interface Configurations

Router Interface Configurations

Objective:

  • Connect, configure, and verify operation status of a device interface

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 section looks specifically at some of the basic configurations that you can apply to LAN and WAN interfaces on a router.

Assigning an IP Address

Recall from Chapter 1, “Standard Internetworking Models,” that the basic functionality of a router is to forward packets from one network to another, using logical addressing. 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 interface 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

NOTE
Remember, if this was a router with a fixed interface (not modular), the command might look something
like this:
Router(config)#interface serial 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 (discussed in next section), this router forwards any packets destined for 192.168.1.x 255.255.255.0 out its serial 0/0 interface.

TIP
Because a router needs to forward packets between networks, you cannot configure two interfaces with IP addresses that are part of the same subnet. For example, you cannot configure serial 0 for 192.168.1.1 255.255.255.0 and interface ethernet 0 with an IP of 192.168.1.2 255.255.255.0. Because both IPs exist on the 192.168.1.0 network, the router cannot distinguish to which interface to send packets destined for 192.168.1.x. When a configuration error such as this is attempted, the router informs you that the IP net work overlaps with another interface and does not let you assign the second IP address.

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.

EXAM ALERT
The description interface command assigns a description to a specific interface.

Enabling the Interface

All router 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

EXAM ALERT
You should be able to seamlessly assign an IP address on any interface and administratively enable it for the exam.

TIP
If your interface is not connected to any other devices to communicate at Layer 2, you can use the no keepalives command on the interface to keep your interface active. A keepalive is a mechanism that the IOS uses to send messages to itself or to the other end to ensure a network interface is alive.

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 at speeds of 10mbps or 100mbps at halfor 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:

WAN-Specific Commands

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 cross-over 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 set a lower clock rate or you are connecting to a WAN service that is using sub-T1 speeds or virtual circuits (discussed later in Chapter 22, “Wide Area Network Connection”), 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 kilobits per second. The following configuration demonstrates both of these commands in action for a router in a lab simulating a 64kbps circuit:

Saving Configurations

Objective:

  • Manage IOS configuration files (including: save, edit, upgrade, restore)

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 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. The last two are discussed later in this chapter; the Global Configuration command to save the configuration in a switch or router IOS is as follows:
Router(config)#copy running-config startup-config

EXAM ALERT
Cisco advises that you do not need to save the configuration in a simulation. Despite my danger-seek ing lifestyle, I highly recommend you err on the safe side by saving your configuration in case this pol icy changes in the future.

TIP
After performing the copy running-config startup-config, later IOSs ask you for the filename that you want to call the configuration file with [startup-config] in brackets. If you hit the Enter key, it saves it as the startup-config that will be loaded on next reboot. Saving it with a different filename saves the configuration, but that configuration will not be the one that is loaded.

EXAM ALERT
If you want to return your router or switch to its default configuration, you can use the Privileged EXEC command, erase startup-config, and reboot the device with the reload command. After the router or switch reboots, you should enter into Setup Mode because the configuration in NVRAM was
erased.

STEP BY STEP
8.1 Configuring Router Interfaces
1. Go into Privileged EXEC by typing enable.
2. Enter Global Configuration by typing configure terminal.
3. 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.0.0.
4. Enable the interface using the no shutdown command.
5. 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.
6. Enable the interface by using the no shutdown command.
7. 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 SIMILAR THE FOLLOWING:

About the author

Prasanna

Leave a Comment