Learn Cisco CLI – Part 3 – Configuring Interfaces Basics

Table of Contents
Learn Cisco CLI - Part 3

Configuring Interfaces

These blog posts I created to help me as a reference tool, as well as a way of retaining the knowledge. If you find it useful that’s just a plus.

Configuration Commands

Interface

Changes from global configuration mode to interface configuration mode, allowing you to configure the specified interface.

				
					Syntax:
interface Serial 0/0/0
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#interface GigabitEthernet0/1 
Router1(config-if)#
				
			
IP Address

Assigns an IP address and subnet mask to an interface.

				
					Syntax:
ip address [ip-address] [subnet-mask]
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#interface GigabitEthernet0/1 
Router1(config-if)#ip address 10.1.1.1 255.255.255.0
				
			
No Shutdown

Enables an interface that was previously disabled.

				
					Syntax:
no shutdown
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#interface GigabitEthernet0/1 
Router1(config-if)#ip address 10.1.1.1 255.255.255.0
Router1(config-if)#no shutdown
				
			
Description

Assigns a description to an interface for easy identification.

				
					Syntax:
description [description]
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#interface GigabitEthernet0/1 
Router1(config-if)#ip address 10.1.1.1 255.255.255.0
Router1(config-if)#description Link to HQ
				
			

Hostname

Sets the device name (hostname) for easier identification of the router.

				
					Syntax:
hostname [hostname]
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#hostname Router2
Router2(config)#
				
			

Interface Management

Clock Rate

Sets the clock rate for a Data Communications Equipment (DCE) interface.

				
					Syntax:
clock rate [clock-rate]
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#interface GigabitEthernet0/1 
Router1(config-if)#clock rate 128000
				
			

IP Host

Configures a static hostname-to-address mapping in the host cache of a device.

				
					Syntax:
ip host [host-name] [ip-address]
				
			

Example:

				
					Router1>enable
Router1#configure terminal
Router1(config)#ip host Webserver 172.16.0.1
				
			

Verification and Monitoring

Show IP Interface

Displays IP information for a specified interface.

				
					Syntax:
show ip interface [interface] [interface-number]
				
			

Example:

				
					Router1>enable
Router1#show ip interface GigabitEthernet 0/1
				
			

Show IP Interface Brief

Displays a brief summary of interface status and configuration.

				
					Syntax:
show ip interface brief
				
			

Example:

				
					Router1>enable
Router1#show ip interface brief
				
			

Show Running-Config

Displays the active configuration file, allowing you to verify interface settings.

				
					Syntax:
show running-config
				
			

Example:

				
					Router1>enable
Router1#show running-config
				
			

Show Controllers

Displays cable orientation for Serial interfaces.

				
					Syntax:
show controllers [type number]
				
			

Example:

				
					Router1>enable
Router1#show controllers Serial 0/0/0
				
			

Show Interfaces

Displays statistics for all interfaces configured on the router.

				
					Syntax:
show interfaces [type number]
				
			

Example:

				
					Router1>enable
Router1#show interfaces Serial 0/0/0
				
			

Ping

Sends an Internet Control Message Protocol (ICMP) echo request to the specified address to test connectivity.

				
					Syntax:
ping [ip-address]
				
			

Example:

				
					Router1>ping 8.8.8.8
				
			

EVE-NG Lab

In this lab, we will configure router interfaces using a simple topology that involves three routers (Router1, Router2, and Router3) connected via serial interfaces. The lab will cover configuring IP addresses, verifying connectivity with the ping command, and using the show commands to gather information about the interface configuration.

Device Interface IP Address Subnet Mask
Router1
S0/0/0
10.1.1.1
255.255.255.0
Router2
S0/0/0
10.1.1.2
255.255.255.0
Router2
S0/0/1
172.16.10.2
255.255.255.0
Router3
S0/0/0
172.16.10.1
255.255.255.0

Configuring IP Addresses

Router1

Enter global configuration mode:

				
					Router1>enable
Router1#configure terminal
				
			

Configure the IP address for S0/0/0 interface:

				
					Router1(config)# interface Serial 0/0/0
Router1(config-if)# ip address 10.1.1.1 255.255.255.0
Router1(config-if)# no shutdown
				
			

Verify the configuration:

				
					Router1(config-if)#do show ip interface brief
				
			

Exit the interface configuration mode:

				
					Router1(config-if)# exit
				
			

Router2

Enter global configuration mode:

				
					Router2>enable
Router2#configure terminal
				
			

Configure the IP address for S0/0/0 interface:

				
					Router2(config)# interface Serial 0/0/0
Router2(config-if)# ip address 10.1.1.2 255.255.255.0
Router2(config-if)# no shutdown
				
			

Configure the IP address for S0/0/1 interface:

				
					Router2(config)# interface Serial 0/0/1
Router2(config-if)# ip address 172.16.10.2 255.255.255.0
Router2(config-if)# no shutdown
				
			

Verify the configuration:

				
					Router2(config-if)#do show ip interface brief
				
			

Exit the interface configuration mode:

				
					Router2(config-if)# exit
				
			

Router3

Enter global configuration mode:

				
					Router3>enable
Router3#configure terminal
				
			

Configure the IP address for S0/0/0 interface:

				
					Router3(config)# interface Serial 0/0/0
Router3(config-if)# ip address 172.16.10.1 255.255.255.0
Router3(config-if)# no shutdown
				
			

Verify the configuration:

				
					Router3(config-if)#do show ip interface brief
				
			

Exit the interface configuration mode:

				
					Router3(config-if)# exit
				
			

Verifying Connectivity

All Routers

After configuring the IP addresses, it’s essential to verify that each router can reach the others by using the ping command.

				
					Router1>enable
Router1#ping 10.1.1.2
				
			
				
					Router2>enable
Router2#ping 10.1.1.1
Router2#ping 172.16.10.1
				
			
				
					Router3>enable
Router3#ping 172.16.10.2
				
			

Display detailed information:

				
					Router>enable
Router#show cdp neighbors detail
				
			

Leave a Comment