Configure IP Address For an Interface in Cisco
Last Updated :
08 May, 2024
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. | PC | 4 |
---|
2. | Router | 2 |
---|
IPv4 Addressing Table:
S.NO | Device | IPv4 Address | Subnet Mask | Default Gateway |
---|
1. | PC0 | 192.168.10.1 | 255.255.255.0 | 192.168.10.2 |
---|
2. | PC1 | 192.168.20.1 | 255.255.255.0 | 192.168.20.2 |
---|
3. | PC2 | 192.168.30.1 | 255.255.255.0 | 192.168.30.2 |
---|
4. | PC3 | 192.168.40.1 | 255.255.255.0 | 192.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:
Similar Reads
Configure IP Address for Interface in Cisco Switches To configure an IP Address on a switch interface, first, we must change the interface from a layer 2 interface to a layer 3 interface. A point to note is that to provide an IP Address to a switch interface, the switch first must be a Multilayer Switch and all ports of an MLS is layer 2 by default. T
2 min read
Configuring a Loopback Interface in Cisco A loopback interface is used for device identification. Although you can use any interface address to determine if the device is online, we recommend using the loopback address. Network topology changes can remove interfaces or change addresses, but the loopback address never changes. Uses of Loopba
1 min read
Configuring NAT For IP Address Conservation in Cisco IP address conservation is the goal of Network Address Translation (NAT). It makes it possible for private IP networks to connect to the Internet using unregistered IP addresses. Before packets are routed to another network, NAT acts as a router, typically connecting two networks, and converts the p
7 min read
Configuring EIGRP Passive Interface in Cisco Pre-requisite: What is Passive-Interface Command Behavior in RIP, OSPF & EIGRP? EIGRP Passive Interface is enabled, and the router begins to originate Hello packets and process incoming EIGRP packets on all interfaces that fall within the specified network range. But, this is an unnecessary wast
3 min read
Configuring Per Interface OSPF in Cisco A routing technique called OSPF (Open Shortest Path First) is used in computer networks to choose the optimum route for packet forwarding. As a link-state routing protocol, OSPF determines the shortest path between any two nodes using knowledge on the network topology, including the condition and pr
2 min read