Discovering computer networks: hands on in the Open Networking Lab
Discovering computer networks: hands on in the Open Networking Lab

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

Free course

Discovering computer networks: hands on in the Open Networking Lab

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.

Add an IP address

Download this video clip.Video player: 62_add_an_ip_address.mp4
Skip transcript

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.

End transcript
 
Interactive feature not available in single page view (see it in standard view).

Activity 4 Test yourself

5 minutes

1. By default, are router interfaces turned on?

a. 

(a) No.


b. 

(b) Yes.


The correct answer is a.

2. Which IOS modes allow you to issue the show IP interface brief command?

a. 

(a) Privileged exec


b. 

(b) User exec


c. 

(c) Global configuration


d. 

(d) Interface configuration


The correct answers are a and b.

3. Which of these are a valid IPv4 host on the network 192.168.0.0/24?

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 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.

  1. Drag two routers and a switch onto the work area.
  2. 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.)
  3. Configure an IP address on the connected interface on each router.
  4. 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.

OPNL_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus