Skip to content
Related Articles

Related Articles

Configure IP Address For an Interface in Cisco

View Discussion
Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 21 Jul, 2022
View Discussion
Improve Article
Save Article

The interface is the port at which the router connects to a given network. It acts as an entry or exit point for data that is to be transmitted through the router. Every interface must be labeled or assigned an IP address, which should be unique among all the IP addresses in the network. 

In Cisco Packet Tracer, to understand the process of assigning IP addresses, we will be using routers. This is because a router has many interfaces to connect to different networks and also after configuring a router by any routing protocol(RIP, static routing, etc.), we can observe how an interface and an IP address work in a router. 

Steps to configure an IP address for an interface of a router in Cisco Packet Tracer:

Step 1: Open Cisco Packet Tracer and select the following devices:

S.NO

Device

Quantity

1.

PC4

2.

Router2

IPv4 Addressing Table:

S.NO

Device

IPv4 Address

Subnet Mask

Default Gateway

1.

PC0192.168.10.1255.255.255.0192.168.10.2

2.

PC1192.168.20.1255.255.255.0192.168.20.2

3.

PC2192.168.30.1255.255.255.0192.168.30.2

4.

PC3192.168.40.1255.255.255.0192.168.40.2
  • Create the following topology and label the configuration as shown in the figure:

 

  • Also, assign the respective IP addresses and default gateways to all 4 PCs.

Step 2: In Cisco Packet Tracer, assigning IP addresses to an interface of a router can either be done through the command line or the GUI mode. Both of them are discussed as follows:

Through command line mode:

  • Firstly, enter the command line by clicking on any router and then selecting the CLI tab.
  • Enter config mode by typing the following commands in the command line:
en
config t
  • Now we can assign IP addresses to their respective interfaces. To do this, firstly we need to enter into the interface we want to assign the IP address. This is done by typing the keyword interface followed by the label of the interface.

Interface [label of the interface]:

For example:

interface fa0/0
  • After entering the interface, type the command IP address followed by the IP address you want to assign and also followed by the subnet mask of the IP address assigned.

IP address [IP address to be assigned] [subnet mask of the IP address]

For example:

IP address 192.168.20.2 255.255.255.0
  • After assigning the IP address type, the command no shutdown to activate the port. Initially, all the ports of the router are switched off, so we need to manually activate them. You would also note that the color of the triangles representing the ports of the router changes to green and also start pointing upward.

For example:

no shutdown
  • At last, exit the interface by typing the following command:
exit
  • Repeat the above steps for all the interfaces of the router, and then for all interfaces of other routers as well.

Following is the image of the command line of the router after configuring all interfaces:

 

For a better understanding of the process, you may refer to the following simulation:

 

Through GUI mode:

  • Click on any router and select the Config tab from the above tabs.
  • Now find the interface to which you want to assign the IP address, from the tabs available on the left side of the window.

For example:

 

  • After selecting the interface, fill in the IP address and the subnet mask in the fields named IPv4 Address and Subnet Mask.

For example:

 

  • Activate the port by checking the checkbox labeled as On for the Port Status option.

For example:

 

The interface of the router has been assigned an IP address.

  • Repeat the above steps for all the interfaces of the router, and then for all interfaces of other routers as well.

Simulation Result:

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!