How To Configure Router Interface IP In Packet Tracer

Building on the previous post, I trust you’ve successfully set up the infrastructure by linking the routers in Cisco Packet Tracer following the provided steps and guidelines.

While connecting the switches to their respective routers will be covered in the next lecture, our focus now shifts to initiating the initial router configuration and familiarizing ourselves with the Cisco IOS command line interface.

iOS Commands & Description

CommandUse
enable (>)This command enters privileged mode, also known as enable mode. It’s a more powerful level with access to all configuration commands. Think of it as unlocking a hidden admin panel.
configure terminal (#)Within privileged mode, this command enters global configuration mode. This is where you configure the entire router, including interfaces, routing protocols, and security settings.
interface <interface address subnetmask>This command assigns an IP address and subnet mask to the chosen interface. For example “interface 20.20.20.0 255.255.255.252”. Think of this as giving the interface its unique address and network identity on the network.
hostname <desired_name>This command sets the hostname of the router. You can replace <desired_name> it with any unique and descriptive name you want. Think of it as giving your router a nickname that other devices on the network can recognize
no shutThis command activates the selected interface. An interface in a “shut” state is like having the cable unplugged, while “no shut” is like plugging it back in and allowing data to flow through
write memoryThis command saves changes. Can also be written as “wr” for short
show ip Interface Brief The command provides a concise summary of a router’s interfaces, including their status, configured protocol, and primary IP addresses

Cisco iOS CLI

To open the Cisco CLI in Packet Tracer:

  1. Double-click the router you want to configure.
  2. In the pop-up window, click the tab labelled “CLI” to access the command-line interface.
  3. If this is your first time configuring this router, you’ll see a prompt asking if you want to enter the initial configuration dialogue. Select “No” for now.

Follow the steps below to configure the first interface of the LAGOS router, the interface

Router> enable
Router# config t (short code for configure terminal command)
Router(config)# hostname LR

After changing the hostname, you’ll observe the default router hostname switch to LR. Feel free to choose any hostname you prefer. In my case, I opted for LR, signifying LAGOS Router.

LR(config)# interface g0/0/0 
LR(config-if)# ip address 20.20.20.1 255.255.255.252
LR(config-if)# no shut
LR(config)# exit 
LR# write memory
LR#

By configuring and saving the initial interface on the LAGOS Router, you’ve taken a crucial step. However, with a total of 18 interfaces, efficiency becomes paramount. Luckily, Cisco iOS allows us to concatenate commands for faster configuration.

First, create a spreadsheet containing a table with interface names, corresponding IP addresses, and subnets. Next, prepare a notepad with two command strings. The first string sets the hostname and configures the initial interface. Since the hostname only needs to be set once, the second string focuses on connecting the remaining interfaces. For each subsequent interface, modify the interface name and IP address accordingly. Let’s explore this approach further with samples.

SPREADSHEET DATA

Lagos Router:
Hostname: LR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.1 255.255.255.252 (Route to Lag-gen router)
– interface -g0/1/0 – 20.20.20.5 255.255.255.252 (Route to Abuja)

Abuja Router:
Hostname: AR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.6 255.255.255.252 (Route to Lagos)
– interface -g0/1/0 – 20.20.20.9 255.255.255.252 (Route to Gen-link)
– interface -g0/2/0 – 20.20.20.13 255.255.255.252 (Route to Gen-link)

Lag-Gen Router:
Hostname: LGR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.2 255.255.255.252 (Route to Lagos)
– interface -g0/1/0 – 20.20.20.17 255.255.255.252 (Route to Gen-link)

Gen-Link Router:
Hostname: GLR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.18 255.255.255.252 (Route to Lag-gen)
– interface -g0/1/0 – 20.20.20.10 255.255.255.252 (Route to Abuja)
– interface -g0/2/0 – 20.20.20.33 255.255.255.252 (Route to Delta)
– interface -g0/3/0 – 20.20.20.21 255.255.255.252 (Route to Bornu)

Delta Router:
Hostname: DR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.34 255.255.255.252 (Route to Gen-link)
– interface -g0/1/0 – 20.20.20.37 255.255.255.252 (Route to Kano)
– interface -g0/2/0 – 20.20.20.14 255.255.255.252 (Route to Abuja)

Kano Router:
Hostname: KR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.42 255.255.255.252 (Route to Bornu)
– interface -g0/1/0 – 20.20.20.38 255.255.255.252 (Route to Delta)

Bornu Router:
Hostname: BR
Enable Secret – [none]
– interface -g0/0/0 – 20.20.20.22 255.255.255.252 (Route to gen-link)
– interface -g0/1/0 – 20.20.20.41 255.255.255.252 (Route to Kano)


COMMANDS WHICH ARE USED TO CONFIGURE THE HOST NAME AND FIRST INTERFACE IP

enable
configure terminal
hostname LR
interface g0/0/0
ip address 20.20.20.1 255.255.255.0
no shut
exit

COMMANDS WHICH ARE USED TO CONFIGURE THE IP FOR OTHER INTERFACES

interface/1/0
ip address 20.20.20.5 255.255.255.0
no shut
exit
exit
wr

Now you must repeat the process for all the routers and their interfaces. If you keenly follow up the procedure, you can complete the IP address configuration for all the interfaces connecting a router on the network.

The show ip interface brief command quickly checks interface status, assigned IP addresses, and operational status. The show command is used for troubleshooting and verifying network configurations. You can execute it in privileged mode or global configuration mode by prefixing it with do.

  • Interface: Displays the name of each interface (e.g., GigabitEthernet0/0, FastEthernet0/1).
  • IP Address: Shows the configured IP address on each interface. If unassigned, it may display “unassigned” or a placeholder.
  • OK?/Method: Provides interface status and IP address assignment method (e.g., “manual” for static or “DHCP” for dynamic).
  • Status/Protocol: Displays operational status (e.g., “up” or “down”) and IP routing protocol status.
USING SHOW INTERFACE COMMAND In "Privilege Mode"

LR>enable
LR#show ip interface brief 
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES manual administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
GigabitEthernet0/0/0   20.20.20.1      YES manual up                    up 
GigabitEthernet0/1/0   20.20.20.5      YES manual up                    up 
GigabitEthernet0/2/0   unassigned      YES unset  administratively down down 
GigabitEthernet0/3/0   unassigned      YES unset  administratively down down 
Vlan1                  unassigned      YES unset  administratively down down
LR#

USING SHOW INTERFACE COMMAND In "Global Config Mode"

LR>enable
LR#configure terminal
LR(config)# do show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES unset  administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
GigabitEthernet0/0/0   20.20.20.1      YES manual up                    up 
GigabitEthernet0/1/0   20.20.20.5      YES manual up                    up 
GigabitEthernet0/2/0   unassigned      YES unset  administratively down down 
GigabitEthernet0/3/0   unassigned      YES unset  administratively down down 
Vlan1                  unassigned      YES unset  administratively down down
LR(config)#

What’s Next?

With the following steps, you’ll properly configure the interface IP addresses for the route links on our routers. The process will be similar when assigning IP addresses for the 10.x network, which we’ll explore in the next post. As our network takes shape, we’ve already learned about IP subnetting and created two network subnets. Now, we’re configuring the interface IP addresses for the routers. This is just the beginning of our journey as we delve into network design step by step.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *