Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

UCCN1004 Data Communications and Networking

Lab 2: Building your first Local Area Network (LAN)


Introduction

In this lab, you will learn the process of connecting and configuring PCs, servers, and one router
to form Ethernet LANs in Packet Tracer simulation. You will learn and experience the basic
configuration procedures for Cisco network devices. These procedures require the use of Cisco
Internetwork Operating System (IOS) and the related commands. An understanding of the
configuration process using the IOS is essential for network administrator and network engineers.

Exercise 1: Setting up the Router with a console PC

1. Drag a Cisco 1841 router and a PC into the Packet Tracer workspace.

2. Select the “Console” cable from “Connections”.

3. During the connection, select “RS 232” when you click on PC0. Select “Console” (means
the console port of the router) when you click on the Router0. (Note: In the real world,
configuration of Cisco Router is done using this blue cable called rollover cable, as
shown in the following diagram).

1
Exercise 2: Adding Extra Module to the Router

1. Click here

2. Click here 3. Click here to off


the router’s power
(green = power on)

1. Double click on Router0. First, click on “Physical” tab. Then click on the “WIC-
1ENET”. Click on the switch to “off” it. (Note: “WIC-1ENET” provides an extra
Ethernet port for the router, which has a bandwidth of 10Mbps. Fast Ethernet has a
bandwidth of 100Mbps)

5. Click here to on
4. Click here and the switch again
drag the module
into the slot

2. Click on the module located at the bottom right corner and drag it into the left slot. Then
click on the switch to “on” router again.

2
Exercise 3: Configuring the Router using Terminal

1. Double click on PC0, click on “Desktop” tab, and then click on “Terminal”. (Note: In
real life, this is equivalent to HyperTerminal or PuTTY for Windows XP.)

2. Set the parameters according to the above screen, click “ok” to continue.

3. From now on, use the “Terminal” of PC0 to configure the router instead of using the CLI
in router. (Note: “Terminal” is how a router is configured in the real world. “CLI” is just
a “convenience” in Packet Tracer. “CLI” does not exist in the real world”.)

The “CLI” of Router does not exist in the real world.

3
This is how PC access router's CLI to configure router in the real
world, with a rollover cable and a Terminal program.

4. Wait for the booting up of the router. Type “no” (as shown in the above screen).

5. Hit enter key to get the first router prompt.

Router>

4
Exercise 4: Some Basic Commands and IOS Command History

1. Type “enable” to get into privileged mode. The pound sign (#) indicates you are now in
privileged mode. Type “disable” to return to user mode or exit from privileged mode.
Type “en” again to get into privileged mode again. Without going into the priviledged
mode, you can’t configure or change the setting (e.g. IP addresses) of the router.

Router>enable
Router#disable
Router>en
Router#

2. The keystrokes in the following table are meant to help you edit the commands. Because
you’ll want to correct or type certain commands again and again, Cisco IOS provides
certain keystroke combinations to help you and make the process more efficient.

3. Type “?” to list all commands available in the current command mode (or prompt). If the
list is too long, hit space bar to continue.

Router#?

4. Type “c?” to list all the possible commands that start with the letter ‘c’.

Router#c?

5. Type “cl?” to list all the possible commands that start with the letters ‘cl’.

Router#cl?
clear clock

6. Type “clock”. After you hit enter the “% Incomplete command” tells you that more
parameters need to be entered.

Router#clock
% Incomplete command.

5
7. Type “clock ?”. This will show all subcommands for this command (in this case, Set,
which sets the time and date).

Router#clock ?
set Set the time and date

8. Type “show clock” to check the time and date.

Router#show clock

9. Type “clock set 12:14:01 25 Dec 2010” to check the time and date.

Router#clock set 12:14:01 25 Dec 2010

10. Type “show clock” again to check for the new time and date.

Router#show clock

11. Type “show version” to display the information about the current Cisco IOS software.

Router#show version

12. Type “show flash” to display the information about the flash memory.

Router#show flash

13. Type “show history” to list all commands in the history buffer (that you have typed
previously).

Router#show history

14. Use the “up” cursor key ↑ (first) and the “down” ↓ cursor key to scroll up and down the
“history” commands. For the following commands use ONLY the “up” and “down”
cursor key. DON’T hit “enter”.

Router#<press ↑>
Router#show history
Router#<press ↑>
Router#show flash
Router#<press ↑ two times>
Router#show clock
Router#<press ↓ four times>
Router#

15. The following command causes the router to now remember the last 4 commands in the
buffer. The default history buffer size is 10 lines.

Router#terminal history size 4


Router#show history

6
16. Now change the history buffer size to 25 lines.

Router#terminal history size 25

17. Type “show ip interface brief” to display a summary of all interfaces. This is a useful
command to check the name of the interfaces available in the router.
Router1#show ip interface brief

18. Type “show interfaces” to display detailed information on each interface. (Hit space bar
to continue when you see –more–)
Router1#show interfaces

19. Type “configure terminal” or “conf t” to move to global configuration mode. This prompt
indicates that you can start making changes and configuration in the router.

Router#conf t
Router(config)#

20. Type “hostname uccn1004” to change the “prompt” name. Type “exit” to return to the
“root directory” or privileged mode.

Router(config)#hostname uccn1004
uccn1004(config)#exit
uccn1004#

21. Sometimes you may type a wrong command in the privileged mode. For example, instead
of typing “show”, you have typed “shw”. This will cause you to wait for some
unnecessary time (about 1 minute) of this “Translating …domain server” before it exits
to the prompt again.

uccn1004#shw <hit enter>


Translating "shw"...domain server (255.255.255.255) <wait for a minute>
% Unknown command or computer name, or unable to find computer address

uccn1004#

22. Go to global configuration mode (with “config” prompt) to get rid of the above 1-minute
wait of the “translating …domain server” for this lab exercise.

uccn1004#conf t
uccn1004(config)#no ip domain-lookup
uccn1004(config)#exit
uccn1004#shw

23. Lastly, please be careful of the “prompt” or mode of the Cisco router. Cisco commands
work closely with the “prompt”. Remember the commands together with prompt or
mode. Certain commands won’t work in some prompt. For example:

7
uccn1004#conf t
uccn1004(config)#show ip int br
^
% Invalid input detected at '^' marker.

uccn1004(config)#exit

uccn1004#show ip int br

24. The following table shows the command modes (or prompt) in a typical Cisco router.
There are other modes than these. Not all commands work in all modes. Be careful. If
you type in a command that you know is correct—show running-config, for example—
and you get an error, make sure that you are in the correct mode:

8
Exercise 5: Password Setup for Router0

1. There are three common sets of passwords that we are going to configure in the Cisco
router: (i) console, (ii) enable and (iii) telnet.

2. Configure a password of “nice” for console mode. (Note: Whenever a user tries to enter
into the console command line, a password is required.)

uccn1004#conf t
uccn1004(config)#line console 0
uccn1004(config-line)#password nice
uccn1004(config-line)#login
uccn1004(config-line)#exit

3. Configure a secret password of “good” for “enable” command.


uccn1004(config)#enable secret good

4. Exit to the very beginning of the router CLI.


uccn1004(config)#end
uccn1004#disable
uccn1004>exit

Press RETURN to get started.

5. Try the passwords: When you hit enter (into console command line) and being asked for
a password, type “nice”. When you type “enable” and being asked for a password, type
“good”.
User Access Verification

Password:

uccn1004>enable
Password:
uccn1004#

6. Configure a banner that says “Welcome to UCCN1004 - Authorized Users Only”.


uccn1004#conf t
uccn1004(config)#banner motd #

Enter the text followed by the '#' to finish

Welcome to UCCN1004 – For UTAR students to play play only#

uccn1004(config)#exit

7. Test the banner and console password by logging out of the router and logging back in.
Get into enable mode after successfully logging into the console.

9
uccn1004#logout

<Enter>
(Try to notice this part for the banner that you have keyed in……)

User Access Verification


password:nice
uccn1004>en
password:good

10
Exercise 6: Setting up LANs

Fa0/1

Fa0/0

Fa0/1

Figure 1: Your first network

1. Add an extra switch (model 2950-24), PCs and server in order to form the above
network.

2. MAKE SURE that Fa0/0 of Router0 is connected to Fa0/1 of switch0, and Fa0/1 of
Router0 is connected to the Server0. Use “Connection → Copper straight-through” to
perform the connection between Router0 and Switch0. Use “Connection → Copper
cross-over” to perform the connection between Router0 and Server0. For connections
between PCs and Switch0 use “Connection → Automatically Choose Connection
Type”.

3. Configure the IP address of the fa0/0 and fa0/1 port according to the following
commands. <tab> in the command stands for tab key.
uccn1004#conf<tab>
uccn1004#configure t<tab>
uccn1004#configure terminal
uccn1004(config)#int fa0/1
uccn1004(config-if)#ip address 192.168.10.254 255.255.255.0
uccn1004(config-if)#description connection to DNS server
uccn1004(config-if)#no shutdown

11
uccn1004(config-if)#exit
uccn1004(config)#

uccn1004(config)#int fa0/0
uccn1004(config-if)#ip address 192.168.15.254 255.255.255.0
uccn1004(config-if)#description connection to LAN 1
uccn1004(config-if)#no shutdown

4. You may exit configuration mode by keying ctrl-z. This will bring you back to the
privileged mode prompt. You could also accomplish the same thing by keying “exit”
twice. The “exit” command moves you back one level. Or keying “end” to achieve what
can be done with <ctrl-z> (Press “crtl” key and “z” key, don’t type it).
uccn1004(config-if)#<ctrl-z>
uccn1004#

OR

uccn1004(config-if)#exit
uccn1004(config)#exit
uccn1004#

OR

uccn1004(config-if)#end
uccn1004#

5. Display the active configuration in DRAM by typing:


uccn1004#show running-config

6. Display the saved configuration in NVRAM. Is there “anything” after you have typed the
command?

uccn1004#show startup-config

7. Nothing will show because the configuration you done previously is on running-config
file in DRAM (temporary storage) and hasn’t save into startup-config file in NVRAM
(permanent storage).

8. Save the running (active) configuration to NVRAM by typing:


uccn1004#copy running-config startup-config
Destination filename [startup-config]? {Press Enter}

9. Now display the contents of NVRAM again


uccn1004#show startup-config

12
10. This time, you should see the active configuration saved in NVRAM. By saving the
running-config to the startup-config, the router will load in your “configuration” during
the next power up (on and off the power switch of the router).

11. Issue the command to show which Layer 3 protocols are currently running on the router.

uccn1004#show protocols

12. Lastly, configure the static IP for Server0 based on the following diagram.

13
Exercise 7: Setting up DHCP service in Router

1. Based on the network of Figure 1, at this point, the PCs have not obtained their IP
address configuration yet. The PCs will obtain their dynamic IP from Router0.

2. Use the following commands to set up the DHCP service for the LAN, in Router0.
Router0 will act as a DHCP server. (Note: Besides a DHCP server, Cisco router can also
provide DHCP service.)

uccn1004#conf t
uccn1004(config)#ip dhcp pool ANYNAME_JOHN
uccn1004(dhcp-config)#network 192.168.15.0 255.255.255.0
uccn1004(dhcp-config)#default-router 192.168.15.254
uccn1004(dhcp-config)#dns-server 192.168.10.1
uccn1004(dhcp-config)#end
uccn1004#

3. Go to the “Command Prompt” of all the PCs and type “ipconfig /renew” to obtain the
dynamic IP addresses from Router0 for PC1, PC2 and PC3.

4. If your PCs didn’t get any IP address:


a. Check Router0. Make sure the Fa0/0 is connected with Fa0/1 of the switch.
b. Check Router0 and make sure the IP address for Fa0/0 is 192.168.15.254.
c. Check Router0, make sure the DHCP configuration is done by typing
uccn1004#show running-config

5. After the PCs have obtained their IP address. Please ping the gateway IP and
(192.168.15.254) to make sure that the IP address are properly configured. It is always a
good habit to ping the gateway IP to test basic connectivity.

14
6. Now go to Router0, and key in the following command.

uccn1004#show ip dhcp binding

15
Exercise 8: Telnet to Router for CLI

1. Configure a password of “baik” on Router0 that will enable remote users (the PCs) to
Telnet into it. Users (PCs) will able to configure the router remotely by using telnet.
uccn1004#conf t
uccn1004(config)#line vty 0 4
uccn1004(config-line)#password baik
uccn1004(config-line)#login
uccn1004(config-line)#end
uccn1004#

2. Go to PC1, open the command prompt and type “telnet 192.168.15.254”. Hope that you
still remember which password (there are 3 passwords now: the console password “nice”,
the enable password “good”, and the telnet password “baik”). Type the telnet password
“baik” first and then “good” for enable.

PC>telnet 192.168.15.254
Trying 192.168.15.254 ...Open
Welcome to UCCN1004 - For UTAR students to play play only

User Access Verification

Password:baik
uccn1004>en
Password: good
uccn1004#

3. Instead of using the “terminal CLI”, we can now continue to use the “telnet CLI” to
perform the configuration of the router.
uccn1004(config)#ip domain-lookup
uccn1004(config)#ip host dns_server 192.168.10.1
uccn1004(config)#end

4. Verify that the name “dns_server” is in Router0’s host table with the show hosts
command.
uccn1004#show hosts

5. Ping ‘dns_server’ and verify that the pings succeed.


uccn1004#ping dns_server

6. Go to PC2 and telnet to Router0. Do the same to PC3, telnet to Router0 too.

7. Go back to Router0 and type


uccn1004#show users

16
Exercise 9: Save your file

1. Follow the steps to save your file at the end of the class.

File Save As Remember to choose file location. (Eg: USB drive) File name: Save

2. The file type will be .pkt. This is a packet tracer file type.

3. Make sure you finish your Lab2 before next lab session.

4. To continue Lab3, remember to bring your Lab2 saved file.

17

You might also like