Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CN Lab 7-10

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

Computer Networks Lab 7

Mapping real time Data


1. Learning Objectives:
Getting knowledge of mapping real time data communication networks in simulation
world in CISCO Packet Tracer environment.

2. Equipment Required:
A working computer having Cisco packet tracer installed.

3. Introduction:
Packet Tracer is a protocol simulator developed at Cisco Systems. Packet Tracer (PT) is a
powerful and dynamic tool that displays the various protocols used in networking, in either
Real Time or Simulation mode. This includes layer 2 protocols such as Ethernet and PPP,
layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols such as TCP and UDP.
Routing protocols can also be traced. Packet Tracer is a supplement to and not a
replacement for experience with real equipment. Students are encouraged to compare the
results obtained from Packet Tracer network models with the behavior of real equipment.

Computer Networks Department of Information Sciences, UE, Lahore


1
4. Procedure:

TASK: Design a simple network using Packet Tracer by configuring router from config
tab
This exercise emphasizes on the need of getting knowledge of simulation environment of the
networking area. You are required to create a simple network topology connecting a router to 2
PCs through a switch and ensure the connectivity.

Step 1 From your Cisco Packet Tracer Window, go to Routers section and select a generic 2621XM
Router.

Computer Networks Department of Information Sciences, UE, Lahore


2
Step 2 Similarly, place a 2620 switch and 2 PC ( End Devices ) in your Packet Tracers Window.

Step 3 Now, in order to connect the devices, select the copper straight-through cable from the
“Connections” section and connect the devices as shown below:

Computer Networks Department of Information Sciences, UE, Lahore


3
The above snapshot shows that all the devices have been connected. The network will work fine
when all the lights are green. To make the network working, we need to configure the router and
the PC’s IP addresses.

Step 4 Assign IP addresses along with their gateways to the 2 PCs by double clicking the PCs to
open their dialog boxes. In this case, we have assigned 192.168.1.2 and 192.168.1.3 respectively.

Computer Networks Department of Information Sciences, UE, Lahore


4
Step 5 Configuring the Router:
Open the Router0 property dialog box by double clicking it selecting the “FastEthernet 0/0” from
the Config Tab. Assign the IP address 192.168.1.1 to the port. Subnet mask will be added
automatically and checkmark the Port Status On.

Step 6 After done with the configuration, you will see that all the lights are green now showing
that network is ready to be operated.

Computer Networks Department of Information Sciences, UE, Lahore


5
Step 7 After successfully creating the topology, you can check the connectivity of the network by
selecting a packet from the right window and sending it from one PC to another by clicking one by
one as shown below:

Finally, you can see that the packet transmission is successful as shown by the message
window:

Computer Networks Department of Information Sciences, UE, Lahore


6
Computer Networks Lab 8
Configuring Router from Command Line Interface
Router Mode Switching Commands

Router>enable from User Mode to Privilege Mode


Router#configure terminal from Privilege Mode to Global Conf. Mode
Router(config)#exit from Global Conf. Mode to Privilige Mode
Router#disable from Privilege Mode to User Mode

Help and auto completion in CLI of Router


You can also type short commands. For example instead of typing enable command you can type
en
Router>en
Router#

If you want to take help you can type first few characters of command and then enter ?

Router #e? it will list the commands starting from e


enable exit
Router#? it will list all commands in privilege mode
Router# en press Tab Buton on Keyboard and it will Router #enable auto-
complete the command in next line

Basic Router Configurations.

a. Setting up router hostname.


Router>enable change to privilege mode
Router #configure terminal change to global configuration mode
Router (config) # hostname R1 change router hostname to R1
R1(config)#exit exit from global conf. mode

b. Setting up Console or User Mode Password

R1>enable change to privilege mode


R1#configure terminal change to global configuration mode
R1(config)#line console 0 change to console line sub-mode
R1(config-line)#password dcn123 set dcn123 as password on user mode
R1(config-line)#login prompt for password
R1(config-line)#exit exit from line sub-mode
R1(config)#exit exit from global configuration mode
R1#

Computer Networks Department of Information Sciences, UE, Lahore


7
c. Setting up Privilege Mode Password
R1>enable change to privilege mode
R1#configure terminal change to global configuration mode
R1(config)#enable password dcn456 set dcn456 as password on privilege mode
R1(config)#exit exit from global configuration mode
R1#

d. Removing console/user mode and privilege mode passwords


R1#configure terminal change to global configuration mode
R1(config)#no enable password remove password on privilege mode
R1(config)#line console 0 change to console line sub-mode
R1(config-line)#no password remove password on user mode
R1(config-line)#no login remove login prompt
R1(config-line)#exit exit from line sub-mode
R1(config)#exit exit from global configuration mode
R1#

e. Backup of Running Configuration File


R1#copy running-config startup-config press enter twice

This command will backup running-config file in RAM into NVRAM with the file name of startup-
config.
Following commands can also be used to create backup in NVRAM.

R1#write
R1#write memory

f. Restoring Backup File from NVRAM


R1#copy startup-config running-config press enter twice

This command will copy backup file (startup-config) from NVRAM into RAM

g. Disabling DNS Lookup on Router


When you enter wrong command,router searches the command in its database.which take time
and you can’t work while router is searching for command. To disable this, we usually press
ctrl+shift+6 to stop translation but following command can also be used.

R1#conf t change to global configuration mode


R1(config)#no ip domain-lookup disable dns name lookup
R1(config)#exit exit from global configuration mode
R1#

h. Setting a Banner/Welcome Message on the router

Computer Networks Department of Information Sciences, UE, Lahore


8
R1#conf t change to global configuration mode
R1(config)#banner motd $*****Authorized Access Only*****$
Setting Banner to *****Authorized Access Only*****
R1(config)#exit exit from global configuration mode
R1#

i. Assigning IP Address to Router LAN Interface (Fastethernet)


R1#configure terminal change to global configuration mode
R1(config)#interface fastethernet 0/0 change to interface fa 0/0 sub-mode
R1(config-if)#ip address 192.168.1.1 255.255.255.0
Set ip-address for fa 0/0 as 192.168.1.1.

R1(config-if)#no shutdown activate fa 0/0


R1(config-if)#exit exit from fa 0/0 sub-mode
R1(config)#exit exit from global configuration mode
R1#

j. Verifying IP address and Status of Fastethernet interfaces


R1#show ip interface brief All interfaces with their status and ip will be shown by
this command.

R1#show interfaces fastethernet 0/0 Displaying particular interface

k. Displaying RAM and NVRAM Files


R1#show running-config it will display all the configuration done on router
R1#show startup-config it will display all the configuration done on router copied
to NVRAM from RAM

Computer Networks Department of Information Sciences, UE, Lahore


9
Design the following network by configuring router from Command Line Interface
Use the topology as shown in figure below and follow the Step-1 ro Step-3 as discussed above.
Note: For connections, Copper cross-over is used as PCs and router are same functionality
devices.

Step 4
Assign IP addresses along with their gateways to the 2 PCs by double clicking the PCs to open
their dialog boxes. In this case, we have assigned 192.168.1.2 and 192.168.2.2 respectively.

Note: The ips’ assigned to both the PCs’ must belong to two different networks in this case.

Computer Networks Department of Information Sciences, UE, Lahore


10
Step 5
Configuring the Router from CLI:
Open CLI (command line interface) of router, you will be prompted a question as shown in the
figure below. Type no and Press enter two times as we do not want the question answer dialog
and want to configure router from commands.

Step 6
Assign the IPs to Fastethernet Interfaces Fa 0/0 and Fa 0/1. The IPs should be same as assigned to
default gateways of PCs respectively. Also activate the interfaces.

Step 7
Verify the interfaces through verification commands.

Step 8
After done with the configuration, you will see that all the lights are green now showing that
network is ready to be operated.

Step 9
Checking Connectivity
Method 1: After successfully creating the topology, you can check the connectivity of the
network by changing the mode from real mode to simulation mode and then selecting a packet
from the right bar of the PT window and sending it from one PC to another. You will see an
animated packet transmitted from source PC to Destination PC. Finally, you will see that the
packet transmission is successful as shown by the message window.
Method 2: Ping using command prompt window of one PC to another.
Method 3: Do the same as Method 1 but in Real Time mode.

Computer Networks Department of Information Sciences, UE, Lahore


11
5. Questions:
Before leaving the lab answer the questions below and show them to your instructor:
Q1. How to verify configuration of console and Privilige mode Passwords?
Q2. Enlist IPv4 classes with their network and host portions. What is the reason behind this
classification?

Computer Networks Department of Information Sciences, UE, Lahore


12
Computer Networks Lab 9
Accessing the Router Remotely & WAN
1. Learning Objectives:
To learn how to access the router remotely using telnet and SSH Protocols. We will also learn how to
connect two routers on WAN via serial cables.

2. Equipment Required:
A working computer having Cisco packet tracer installed.

3. Introduction:
WAN:
A wide area network (WAN) is a telecommunications network or computer network that extends over
a large geographical distance. Wide area networks often are established with leased telecommunication
circuits.
Business, education and government entities use wide area networks to relay data among staff, students,
clients, buyers, and suppliers from various geographical locations. In essence, this mode of
telecommunication allows a business to effectively carry out its daily function regardless of location.
The Internet may be considered a WAN.
Imagine that you are the primary network engineer for an enterprise TCP/IP internetwork. Your
company is building a new building at a site 100 miles away from your corporate headquarters. You
will of course install a LAN throughout the new building, but you also need to connect that new remote
LAN to the rest of the existing enterprise TCP/IP network.
To connect the new building’s LAN to the rest of the existing corporate network, you need some kind
of a WAN. At a minimum, that WAN needs to be able to send data from the remote LAN back to the
rest of the existing network and vice versa. Leased line WANs do exactly that, forwarding data between
two routers.
From a basic point of view, a leased line WAN works a lot like an Ethernet crossover cable connecting
two routers, but with few distance limitations. Each router can send at any time (full-duplex) over the
leased line, for tens, hundreds, or even thousands of miles.
To connect LANs together using a WAN, the internetwork uses a router connected to each LAN, with
a WAN link between the routers. First, the enterprise’s network engineer would order some kind of
WAN link. A router at each site connects to both the WAN link and the LAN. Note that crooked line
between the routers is the common way to represent a leased line when the drawing does not need to
show any of the physical details of the line.

Computer Networks Department of Information Sciences, UE, Lahore


13
WAN carries data in two formats (encapsulation). HDLC and PPP. HDLC stands for Higher Level Data
Link Control. By default HDLC is activated on serial interfaces. It’s cisco specific. HDLC does not
support authentication. It uses no compression and no error correction is performed. PPP stands for
Point to Point Data. Commands are given in sub-mode of serial interface to change to PPP standard.
There are two types of PPP. PAP and CHAP.

Different Names for a Leased Line

Rules to Assign IPs to Router:


1. All the LAN and WAN should be in different networks.
2. Router Fast Ethernet IP and the LAN network assigned should be in the same network.
3. Both the interfaces of router facing each other should be in the same network.
4. All the interfaces of the routers should be in different networks.

Telnet:
Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers,
routers or switches. Through Telnet, an administrator or another user can access someone else's
computer, router or switch remotely. On the Web, HTTP and FTP protocols allow you to request
specific files from remote computers, but not to actually be logged on as a user of that computer,
router or switch. With Telnet, you log on as a regular user with whatever privileges you may have
been granted to the specific application and data on that computer, router or switch. Telnet uses
VTY lines on Cisco IOS. Telnet is less secure and not encrypted.

Computer Networks Department of Information Sciences, UE, Lahore


14
Pre-requisite for Telnet Access
1. Connectivity
2. IP Address
3. VTY lines and privilege mode must be configured with passwords.

SSH:
Secure Shell (SSH), is a protocol for securely getting access to a remote router. It is widely used by
network administrators to control routers remotely. SSH commands are encrypted and secure in several
ways. Both ends of the client/server connection are authenticated using a digital certificate, and
passwords are protected by being encrypted.

4. Procedure:
TASK: Enable Telnet and SSH on Cisco Router

To enable telnet on Cisco router, simply do it with “line vty” command. First of download the CISCO
packet racer Lab for slate. The Lab is configured with DHCP server (but you should check all IPs) and
all clients get IP address from DHCP Server on Router.

Go to router R1 console and configure telnet with “line vty” command.

Computer Networks Department of Information Sciences, UE, Lahore


15
Command descriptions:
The “line vty” command enable the telnet and the “0″ is just let a single line or session to the router.
If you need more session simultaneously, you must type “line vty 0 10“.
The “password” command set the “Pass123” as password for telnet. You can set your own password.
The “login” command authenticate and ask you the password of telnet. If you type “no login”
command, the telnet never authenticate for password which is not a good practice in real network
environment.
The “logging synchronous” command stops any message output from splitting your typing.
The “exec-timeout” command just sets the time-out limit on the line from the default to
“40″ minutes.
The motd-banner forces a banner message to appear when logging in.
OK, the Telnet services enabled successfully. But you must set the enable passwordfor router in
order to control it remotely.

Testing Telnet Connectivity


Now from a client PC test the telnet connectivity and to insure that it works fine or not yet. If it is not
work, try to troubleshoot telnet errors.
Let’s test telnet from the admin PC. Type telnet 192.168.10.1 and press enter, then enter the telnet
password. Next type enable command and press enter, then type the router password.

Computer Networks Department of Information Sciences, UE, Lahore


16
Now you are remotely connected to router R1 and you can execute all router commands through
telnet command line interface.

If you need more information about Telnet commands and options, from the config-linemode type
“?“, the question mark will display all telnet commands.

That is it, the telnet services configuration on Cisco router.

2. Enable Telnet and SSH: SSH Configuration.


Secure Shell or SSH is a secure protocol and the replacement for Telnet and other insecure remote
shell protocols. So for secure communication between network devices, I strongly recommend using
SSH instead of Telnet.

Computer Networks Department of Information Sciences, UE, Lahore


17
Configure SSH on Cisco routers and switches with the below step by step guide to SSH configuration.

1. Open the router R1 console line and create domain and user name.

Then “ip domain-name” command create a domain and named Technig.com.


The “username Shais Password Pass123” command just create a user name “Shais” with
“Pass123” password.

2. If you don, just follow and generate the encryption keys for securing the ssh session.

The name for the keys will be: R1.Technig.com


Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]
R1(config)#
Type “crypto key generate rsa” command and press enter, when ask you “How many bits in
the modulus [512]:” just type “1024″ and press enter. The system will generate1024 bits keys
to secure session lines. You can choose modulus in the range of 360 to 2048.

Computer Networks Department of Information Sciences, UE, Lahore


18
3. Now enable SSH version 2, set time out duration and login attempt time on the router.
Remember this message if you going to use ssh version 2 “Please create RSA keys (of at least
768 bits size) to enable SSH v2.”

4. Enable vty lines and configure access protocols.

The configuration is the same as telnet, just the transport input ssh command change the line
to Secure Shell. Configuration has completed, next you must test ssh from a client PC.

Testing SSH Connectivity


From a client PC, open the command line and type “ssh -l Shais 192.168.10.1” then press enter.
Packet Tracer PC Command Line 1.0

Computer Networks Department of Information Sciences, UE, Lahore


19
Here, I have connected successfully and the connection is secured with Secure Shell.

Hope you understand the configuration of enable Telnet and SSH on Cisco router and
switches. Now you should be able to simply enable Telnet and SSH on your routers and
switches.

Computer Networks Lab 10


Building a WAN Between Two LANs
Step 1 Construct the following topology. Assign all IPs and activate all Fast Ethernet Interfaces.

Step 2 Then pick up DCE Serial Cable and connect the two routers via serial interfaces.
Note: If Serial Interface not already installed in the routers, we have to manually place WIC-2T
module in the routers using Physical Mode.

Computer Networks Department of Information Sciences, UE, Lahore


20
Step 3 Configure Serial interfaces of both the routers, the same as we do Fast Ethernet Interfaces.
But IPs assigned to both the serials interfaces should belong to one network and the network
should be unique, different from all other LAN or WAN Networks.
Step 4 Finally, to make the link work, the router with the DCE cable installed must do one
function normally done by the CSU/DSU. The CSU/DSU normally provides a function called
clocking, in which it tells the router exactly when to send each bit through signaling over the
serial cable. A router serial interface can provide clocking, but the router does not do so unless
configured with the clock rate command. Clock Rate command is only configured in the router
showing clock symbol near its interface.

Step 5 Verify through show interfaces or show ip interface brief

TASK 2.1: Accessing Router Remotely via Telnet on TCP Protocol.


Step 1 Configure vty password and privilege mode password on Router you want to access
remotely.

Computer Networks Department of Information Sciences, UE, Lahore


21
Step 2 transport input telnet when configured in configure mode of a router activates telnet on
the virtual line.

Step 3 Open Command Prompt Window on one of remote PCs, and type the command telnet Router
IP. You will be asked vty password. After entering the vty password you will be proceeded to router’s
user mode in the same command prompt window.

Computer Networks Department of Information Sciences, UE, Lahore


22

You might also like