10.4 Configure an IP address
The video below explains how to configure an IP address on a router. As you will see, you can use Packet Tracer or PT Anywhere to emulate this task. However, not all routers have the same interfaces, so first it’s necessary to determine what interfaces your router has. The common interface types are:
- FastEthernet
- GigabitEthernet
- Serial.
Watch the video below (which is about 3 minutes long) to see how to discover a router’s interfaces and configure their IP addresses.
Note that the presenter uses the Tab key to complete certain commands; in PT Anywhere the Tab key cannot be used in this way.
Box _unit6.2.4 Add an IP address

Transcript
In this part the task is to set the IP address 192.168.0.1 on the interface GigabitEthernet0/0 and then save the configuration. We are connected to a blank router, remember to answer no to the configuration wizard, then enter privileged exec with the command enable. First let’s check to see what interfaces we have available to configure. We can do this by typing show ip interface brief. The output of this command lists the types of interfaces available on the router. It will show the IP address of the interface if one has been configured as well as the current status of the interface. We can see GigabitEthernet0/0 is an available interface but is not configured.
Therefore, we need to make a configuration change, so we will need to enter global configuration mode. This is a good time to point out you do not need to type out the full command for Cisco’s IOS to understand the command. For example, I can type conf tinstead of configure terminal and the router will accept this command as long as it is not ambiguous. Another shortcut is to use the Tab key to complete the command for you. The next command we need to type is interface GigabitEthernet0/0. We only have to type int, then we can press the Tab key. interfacewill be auto- completed for us. Then instead of typing GigabitEthernet0/0, I can save time by only typing g0/0 – the router will also accept this. You will notice the prompt has changed again from ‘config’ to ‘config-if’ – this indicates that we are now configuring an interface. Now we can add the IP address to the router. Use the command ip address 192.168.0.1 255.255.255.0. This is the IP address followed by the subnet mask, more on this later. The IP address is now configured. But the interface will not function – this is because by default router ports are turned off. To turn the interface on, you will need to use the command no shutdown. The interface is now functional.
We can check this with the show ip interface brief command, but we are currently in the wrong mode. We can get back to privileged exec mode by either typing exittwice, or end to go straight back to privileged exec mode. From here we can use the shortest version of the command sh ip int brto see the configuration change. We can now see GigabitEthernet0/0 has an IP address and the status is ‘up, up’ meaning the interface is working correctly. Don’t forget to save the configuration. We can do this by typing copy run start.
Activity _unit6.2.4 Activity 4 Test yourself
a.
(a) No.
b.
(b) Yes.
The correct answer is a.
a.
(a) Privileged exec
b.
(b) User exec
c.
(c) Global configuration
d.
(d) Interface configuration
The correct answers are a and b.
a.
(a) 192.168.0.254
b.
(b) 192.168.0.255
c.
(c) 192.168.0.0
d.
(d) 172.16.0.12
e.
(e) 192.168.1.1
The correct answer is a.
Activity _unit6.2.5 Activity 5 Try it out
10 minutes
Open PT Anywhere [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)] in a new tab or window so you can read these instructions.
- Drag two routers and a switch onto the work area.
- Connect each router to the switch using a GigabitEthernet port. (Using a switch between the routers avoids complications that can arise when connecting routers directly in PT Anywhere.)
- Configure an IP address on the connected interface on each router.
- Attempt to ping between the routers.
Discussion
By now you should be familiar with the commands for entering global configuration mode. If in doubt, look back to Activity 3 in Section 10.3. Once in global configuration mode, you should have entered the command interface g0/?, replacing the question mark with the number of the interface that you chose. The next command should be no shutdown to turn the interface on. You could have used the command show ip interface brief to check your settings.
Was your ping successful? If not, check that you were pinging the correct IP address for the other router and that this was correctly configured.