Computer Networks Lab Manual

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

SMI UNIVERSITY Computer Science Department

Department of Computer Science

Lab Manual for

Computer Communication & Networks: CEN-303 (3+1)

B.S (CS)

Semester:

Spring 2023

]Course Coordinator:

Dr. Haque Nawaz Lashari

Lab Instructor

Mr. Asif Khan


SMI UNIVERSITY Computer Science Department

Preface
SMI UNIVERSITY Computer Science Department

Table of Content
Lab No. Objective Page No
1 To learn how to make a crossover cable and
straight through cable connector.
To learn how to establish connection and
2 communication between two PCs.
3 To learn and understand the concept of IP
address and subnet mask.
4 To learn how to access operating system of a
switch.
5 To learn how to configure operating system of
a switch.
6 To learn how to access router.
To learn how to configure a router.
7
To learn how to create static routing between
8 two networks.
To learn how to create static route using more
9 than two Hop.
To learn how to create dynamic routing using
10 R.I.P.
SMI UNIVERSITY Computer Science Department

CERTIFICATE
Department of Computer Science
Computer Communication & Networks (CEN303)

This is to certify that Mr/Ms. ______________________________ So/Do


_____________________ having Roll No. ____________________ has successfully
completed Laboratory work during Fall Semester Spring 2023.

Course Supervisor:

Dr. Haque Nawaz Lashari

Signature: Signature:
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 1 Student’s Name:

Objective:
To learn how to make a crossover cable and straight through cable connector.

Required Tools / Equipment:


➢ RJ45 connector
➢ Crimper Tool
➢ Twisted Pair cable
➢ Cutter

Procedure:
Making of Straight cable:

➢ At both connectors, straight through cable have same color coding.


➢ Color coding for straight through cable is

1. Green White
2. Green
3. Orange White
4. Blue
5. Blue White
6. Orange
7. Brown White
8. Brown

➢ By using this color coding grab all the wires together and with the help of cutters, cut
the upper portion of wires
➢ Insert the wire in RJ45 Connector and press the connector by using Crimper Tool in
the end.

pg. 1
SMI UNIVERSITY Computer Science Department

Making of Crossover cable

➢ Crossover Cable has different color coding at both connectors.


➢ Color coding for Crossover cable is:

Connector 1 Connector 2

1. Green White 1. Orange White


2. Green 2. Orange
3. Orange White 3. Green White
4. Blue 4. Blue
5. Blue White 5. Blue White
6. Orange 6. Green
7. Brown White 7. Brown White
8. Brown 8. Brown

By using this color coding grab all the wires together and cut the upper portion of wires by
using cutter.

Insert the wire in RJ45 Connector and press the connector by using Crimper Tool.

Result:
A Connector was successfully connected to Crossover and Straight-through cable.

LAB TASK: Students will make straight and cross cable themselves.

pg. 2
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 2 Student’s Name:

Objective:
To learn how to establish connection and communication between two PCs.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ PCs
➢ Crossover cable

Procedure:
1. Take two PCs.
2. Connect both by Cross over cable at Fast Ethernet Port.
3. Now give IP to both PCs. For example
PC 1: 10.0.0.1
PC 2: 10.0.0.2
4. Now give default gateway of the same IP class.
Default Gateway: 10.0.0.10
5. Open command Line Interface of any PC and ping another PC. For example
PC 1>ping 10.0.0.2

Result:
Successfully communicated between two PCs

LAB TASK: Create a scenario. Connect three Pcs together through a Switch. Check
connectivity by using Ping command.

pg. 3
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 3 Student’s Name:

Objective:
To learn and understand the concept of IP address and subnet mask.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Switch
➢ PCs

Theory:
MAC Address is a physical Address. It consist of 48 bits (6 Bytes).

IP address is a logical/Unique address that identifies the devices. It consist of 32 bits address
(4 Bytes). IP address have 2 addresses

Internal Address: Made by organization

External Address: Made by ISO

There are two types of IPS:

Dynamic IP: Assign Different IP every time

Static IP: Assign fix IP

There are public and private IP addresses

Private: Made by internal Administration

IP address Formula: 2n

1 IP address is divided into 4 octant.

Classful addressing:
• IANA gives IP address Structure by Dividing into classes.
• In Classful Addressing the Address divided in 5 classes.
• Class A,B,C,D,E
• Class A is used by Government organizations.
• Class B and C mostly used for public and private purpose.
• Class D used for Multicasting.
• Class E used for Experimental and Practical purpose.

pg. 4
SMI UNIVERSITY Computer Science Department

IP CLASSES 1st OCTENT RANGE 1st OCTENT HOB


CLASS A 1-------------126* 0
CLASS B 128 ------------ 191 10
CLASS C 192 -------------- 110
223
CLASS D 224 ------------- 239 1110
CLASS E 240 ------------- 255 1111

*127 is reserved for looping.


• Each IP octant is of 8 Bits.

IP CLASSES 1st OCTENT HOB FORMAT DEFAULT


RANGE SUBNET
MASK
CLASS A 1---------- 126 0 NHHH 255.0.0.0
CLASS B 128--------- 191 10 NNHH 255.255.0.0
CLASS C 192--------223 110 NNNH 255.255.255.0
CLASS D 224 -------- 239 1110 ------------ -------------------
CLASS E 240 -------- 255 1111 ------------ -------------------

• Class A: 28 Network
224 User ID (Host ID)
• Class B: 2 Network
2 Host
• Class C: 3 Network
1 Host
CLASSES OCTENT OCTENT OCTENT OCTENT
A N H H H
255 0 0 0
B N N H H
255 255 0 0
C N N N H
255 255 255 0

Now we will create a network of 10 PCs for message passing between them with the help of a
switch in Packet Tracer environment.

pg. 5
SMI UNIVERSITY Computer Science Department

Procedure:
1. Place 10 PCs and connect them with a switch using straight-through cable on Fast
Ethernet Port.
2. Assign IP address of any class to all PCs.
3. Turn all connected ports on and select one IP to make default gateway, for example.
4. Default Gateway : 10.0.0.1
5. Provide each PC the default gateway.
6. Ping any computer to test connection for example PC 1 to PC 8
7. PC 1> ping 10.0.0.5
8. Similarly ping PC 2 to PC 8
9. After successful ping, send message from any Computer.

Result:
Successfully communicated between “10 PCs”.

LAB TASK: Create a scenario. Connect multiple PCs to Switch0 and Switch1. Connect both
switches with each other. Now, ping from any one PC from Switch0 to Switch1.

pg. 6
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 4 Student’s Name:

Objective:
To learn how to access operating system of a switch.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Switch

Theory:
In packet tracer, there is an option of CLI. It is the primary user interface used for configuring,
monitoring, and maintaining Cisco devices. This user interface allows user to directly and
simply execute Cisco IOS commands, whether using a router console or terminal, or using
remote access methods.

CLI interface has three modes.

1. User mode
2. Privilege/Executive mode
3. Global configuration mode

User mode: In this mode, only limited switch contents/configuration can be viewed. It is
default mode.

Privilege/Executive mode: Full contents/configuration of switch can be viewed in this mode.

Global configuration mode: Any configuration can be changed in this mode.

Uni-Cast: Unicast is used when two network nodes need to talk to each other.

Multi-Cast: Multicast is like a broadcast that can cross subnets, but unlike broadcast does not
touch all nodes

Broadcast: If all of the nodes are on the same subnet, then broadcast becomes a viable
solution. All nodes on the subnet will see all traffic.

Domain: A group of computers and devices on a network that are administered as a unit with
common rules and procedures. Within the Internet, domains are defined by the IP address. All
devices sharing a common part of the IP address are said to be in the same domain.

A switch has only one domain by default. Domain is also called ‘VLan’. Different ports can be
managed under one or more than one domain. It is also called VLan.

pg. 7
SMI UNIVERSITY Computer Science Department

Procedure:
1. Start packet tracer 6.2 and select switch 2950T-24.
2. Double click on it and an interface window will be opened. It has three tabs; Physical,
config and CLI. Select CLI tab as shown in fig below.
3. CLI stands for “Command Line Interface

4. Press RETURN (Enter Key) to start using CLI. Command prompt Switch> shows default
user mode.

To enter into Privilege/Executive mode from User mode and vice versa:

Switch>enable --------------- To enable Privilege mode


Switch# ---------------- # shows Privilege mode
Switch#disable --------------- To disable Privilege mode

pg. 8
SMI UNIVERSITY Computer Science Department

Switch> --------------- Returned to User mode


To enter into Global configuration mode from Privilege mode and vice versa:
It is not possible to enter into Global configuration mode directly. It is mandatory to enter into
Privilege mode first then switch to Global configuration mode.

Switch#configure terminal ---------------- To enable Global configuration mode


Switch(config)# ---------------- (config)# shows Global configuration mode
Switch(config)#exit --------------- To disable Global configuration mode
Switch# --------------- Returned to Privilege mode

end command can also be used for this purpose.

To change Host name of Switch:

Switch(config)#hostname CS ---------------- To change Host name from Switch to CS


CS(config)# ---------------- Host name is changed to CS

To display version information:


CS>show version

To enable inter VLan routing:


CS(config)#interface vlan 1
CS(config-if)#ip address 192.168.2.2 255.255.255.0 --------- IP has been assigned to VLan1
CS#show interface vlan1

Vlan1 is administratively down, line protocol is down…….

To UP ports logically:
CS(config-if)#no shutdown

CS(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

To Set Privilege mode password:


CS(config)#enable password SMIU ------ Set Privilege mode password SMIU

To verify Privilege mode password:


CS>enable
Password: <type SMIU>
CS#

To Set Privilege mode password in encrypted form:


CS(config)#enable secret COMPUTERSCIENCE

pg. 9
SMI UNIVERSITY Computer Science Department

To verify Privilege mode password in encrypted form:

CS>enable
Password: <type SMIU>
Password: <type COMPUTERSCIENCE>
CS#

To remove Privilege mode password:


CS(config)#no enable password

CS>enable
Password: <you have to type only encrypted form password now if set before>
CS#

To remove Privilege mode password in encrypted form:


CS(config)#no enable secret

CS>enable
CS# ------ You will have to enter Privilege mode password here if set before

Show contents of Current Configuration (RAM)


CS#show running-config

interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.2.2 255.255.255.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
LAB TASK: Students will replace default Switch name with their Name. They are required to
create Vlan and will detect if they have successfully created it. Also will check switch version.

pg. 10
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 5 Student’s Name:

Objective:
To learn how to configure operating system of a switch.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Switch

Theory:

Procedure:
To Assign password to console mode in Switch:

Switch(config)# line console 0


Switch(config-line)#password SMIU

To ask for Login:

Switch(config-line)# Login
Before user mode it asks for Password to Login.

To enable password for the user who is accessing through remote PC/Telnet:

Switch(config)#interface vlan1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config-if)#no shutdown

Vty is used to access switch from remote PC or Telnet

Switch(config)# line Vty 0 2 (for 2 telnet users)


Switch(config-line)# password 1234
Switch(config-line)# Login

PC Command Prompt:
1. Connect PC to Switch.
2. Give IP to PC and Ping with switch. 192.168.1.3 255.255.255.0
Now go to command prompt of PC:
Pc> ipconfig

C:\>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Request timed out.

pg. 11
SMI UNIVERSITY Computer Science Department

Reply from 192.168.1.2: bytes=32 time<1ms TTL=255


Reply from 192.168.1.2: bytes=32 time<1ms TTL=255
Reply from 192.168.1.2: bytes=32 time<1ms TTL=255

Ping statistics for 192.168.1.2:


Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

If it Replies then:

Pc> telnet 192.168.1.2

C:\>telnet 192.168.1.2
Trying 192.168.1.2 ...Open

User Access Verification

Password: <1234>

To show the Mac Address of PC:

We can use this command either on telnet interface or to CLI

On telnet:

Switch>show mac-address-table
Mac Address Table
-------------------------------------------

Vlan Mac Address Type Ports


---- ----------- -------- -----

1 00d0.bc81.a4de DYNAMIC Fa0/1

On CLI:

Switch>show mac-address-table
Mac Address Table
-------------------------------------------

Vlan Mac Address Type Ports


---- ----------- -------- -----

1 00d0.bc81.a4de DYNAMIC Fa0/1

Access Mode: If any Fast-Ethernet port exist, we can turn its mode to access mode for devices
like PC, Routers; this is not applied to Switch.

Trunk Mode: If any fastEthernet port, we turn its mode to trunk mode for Switch only.

pg. 12
SMI UNIVERSITY Computer Science Department

To port to access mode:


Switch(config)#interface fastethernet 0/1
Switch(config-if)#Switchport mode access

To port to trunk mode:


Switch(config)#interface fastethernet 0/1
Switch(config-if)#Switchport mode trunk

To port security:
Switch(config-if)# Switchport port-security

Mac binding to port:


#Switchport port-security Mac-address 00d0.bc81.a4de ----- Mac Address displayed before

Binding with connected PC at current line: (we use Sticky)

Switch(config-if)# Switchport port-security Mac-address Sticky

This command directs Switch to give access only to the specified device which is defined by
Mac Address.

Violation: (If occurs)

Switch(config-if)# Switchport port-security violation shutdown


Switch(config-if)# Switchport port-security violation restricted
Switch(config-if)# Switchport port-security violation protect

Port Security:

1. Violation
It sends message to administrator for un-authorized person
a) Restricted (not provide service and will not only notify network administrator
by messages but also provide mac address of the intruder pc)
b) Shutdown (This will logically shut down the port)
c) Protect (not provide service and will notify network administrator by
messages)

2. Maximum (Hint-rate count how many time a person tries to port)

3. MAC address (Bind the MAC address to port)

LAB TASK: Students will replace default Switch name with their Name. They are required to
connect pcs and will apply a) console password, secret, and will telnet to connected pc. B) port
securities will be applied and connected pc will bind with mac address. Replace it with another
pc and observe port security behavior.

pg. 13
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 6 Student’s Name:

Objective: To learn how to access router.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Theory:
Router works on 3rd layer which is named as “Network Layer”.

How to identify an IP address?

Ping your network using a broadcast address, i.e. "ping 192.168.1.255". After that, perform
"arp -a" to determine all the computing devices connected to the network. 3. You may also use
"netstat -r" command to find an IP address of all network routes.

What are Routing Table & Routing Protocol?

A routing table is a set of rules, often viewed in table format, which is used to determine where
data packets is traveling over an Internet Protocol (IP) network will be directed. All IP-enabled
devices, including routers and switches, use routing tables

A routing protocol specifies how routers communicate with each other, disseminating
information that enables them to select routes between any two nodes on a computer
network. Routing algorithms determine the specific choice of route. Each router has a priori
knowledge only of networks attached to it directly.

How many types of firewall are used for network security purpose?

A firewall is a hardware or software system that prevents unauthorized access to or from a


network. It can be implemented in both hardware and software, or a combination of both.
Firewalls are frequently used to prevent unauthorized Internet users from accessing private
networks connected to the Internet. All data entering or leaving the intranet pass through the
firewall, which examines each packet and blocks those that do not meet the specified security
criteria.

The National Institute of Standards and Technology (NIST) 800-10 divide firewalls into three
basic types:

• Packet filters
• Stateful inspection
• Proxys

pg. 14
SMI UNIVERSITY Computer Science Department

What is Backhaul in networking?

In a hierarchical telecommunications network the backhaul portion of the network comprises


the intermediate links between the core network, or backbone network and the small sub
networks at the "edge" of the entire hierarchical network.

2620 CISCO Router is used.

- 1 console port

- 2 network (ethernet) ports

Procedure:
To see Details of interface:

Router>show ip interface brief

Interface IP-Address OK? Method Status Protocol


FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset administratively down down
Serial2/0 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down

Set IP address for Router (2620-CISCO):

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#interface ?

Ethernet IEEE 802.3


FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Loopback Loopback interface
Serial Serial
Virtual-Template Virtual Template interface
range interface range command

Router(config)#Interface fastEthernet 0/0


Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#exit

pg. 15
SMI UNIVERSITY Computer Science Department

Router#exit
Router>
To set password on console mode:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#line console 0
Router(config-line)#password SMIU
Router(config-line)#login
Router(config-line)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#exit

Router con0 is now available


Press RETURN to get started.
User Access Verification
Password: <type password given above ------> SMIU>

To set password for those user (remote computer) who want to access the router
through 'telnet' command:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line vty 0 2
Router(config-line)#password SMIU
Router(config-line)#login
Router(config-line)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#exit
Set Hostname:

Router>enable
Router#configure
Configuring from terminal, memory, or network [terminal]? <Press Enter>
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname SmartRouter
SmartRouter(config)#exit
SmartRouter#
%SYS-5-CONFIG_I: Configured from console by console

SmartRouter#exit

pg. 16
SMI UNIVERSITY Computer Science Department

To save all commands on RAM:

Router>enable
Router#copy running-config startup
Destination filename [startup-config]?
Building configuration...
[OK]

To set Password on privilege (enable) Mode:

Router>enable
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password SMIU
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#exit
Router con0 is now available
Press RETURN to get started.
Router>enable
Password: <Write Password SMIU here>

To set Secret on privilege (enable) Mode:

Router>enable
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable secret password SMIU
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#exit

Router con0 is now available


Press RETURN to get started.

Router>enable
Password: <Ask for Privilege mode password here>
Password: <Ask for Secret on privilege mode here>
Router#exit
LAB TASK:

Students will connect two PC with two routers named as Name:0 & Name:1. Practice all
commands mentioned in this lab 6. And ping from one Pc connected to one router to second
pc connected with second router.

pg. 17
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 7 Student’s Name:

Objective:
To learn how to configure a router.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Theory:
How to get detail of interface:

Open CLI interface of router and write following:

Router>enable
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset administratively down down
Serial2/0 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
Router#

Set IP address for Router (2620-CISCO):

Go to CLI interface of router

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#exit

Router con0 is now available

pg. 18
SMI UNIVERSITY Computer Science Department

Press RETURN to get started.


Router>

How to connect two routers:

Connect two routers; each using serial port 2/0 as shown in fig.

Open CLI interface of Router0 and write following commands:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.10.10.1 255.255.255.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to down


Router(config-if)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip interface brief


Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset administratively down down
Serial2/0 10.10.10.1 YES manual down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
Router#exit

Router con0 is now available


Press RETURN to get started.
Router>

Above configuration shows that Router0 serial interface 2/0 is now assigned with IP 10.10.10.1
and it is manual down (serial port interface will be UP only if both sides of interfaces are UP).

Now open CLI interface of router1 and write following commands:

pg. 19
SMI UNIVERSITY Computer Science Department

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.10.10.2 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up

Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up

Router(config-if)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip interface brief


Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset administratively down down
Serial2/0 10.10.10.2 YES manual up up
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
Router#

Above configuration shows that Router1 serial interface 2/0 is now assigned with IP 10.10.10.2
and it is manually up (serial port interface is UP because both sides of interfaces are UP now).

To allow any router to be connected with Router0:

Open CLI interface of Router0 and write following commands:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.2
Router(config)#do show running-config
Building configuration...

pg. 20
SMI UNIVERSITY Computer Science Department

Current configuration : 753 bytes


!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
ip address 10.10.10.1 255.255.255.0

pg. 21
SMI UNIVERSITY Computer Science Department

clock rate 2000000


!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.2
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

Note: ip route 0.0.0.0 0.0.0.0 10.10.10.2 shows that any terminal having any network IP and
any network subnet mask is permitted to connected via 10.10.10.2 (IP address of router1 serial
2/0 interface). Similarly this can also be checked with ip route command as shown below:

Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

pg. 22
SMI UNIVERSITY Computer Science Department

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area


* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 10.10.10.2 to network 0.0.0.0

10.0.0.0/24 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
S* 0.0.0.0/0 [1/0] via 10.10.10.2

Note: S* shows that static route has been created for any network via 10.10.10.2 (which is IP
address assigned to router1 serial interface 2/0).

Router#

To allow any router to be connected with Router1:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 10.10.10.1 to network 0.0.0.0

10.0.0.0/24 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
S* 0.0.0.0/0 [1/0] via 10.10.10.1

Note: S* shows that static route has been created for any network via 10.10.10.1 (which is IP
address assigned to router0 serial interface 2/0).

To reset ip address for router0:

Open CLI interface of router0 and write following commands:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 2/0

pg. 23
SMI UNIVERSITY Computer Science Department

Router(config-if)#no ip address [** this reset any ip assigned to router0 serial 2/0 interface]
Router(config-if)#shutdown [** this turns router0 serial 2/0 interface down]

Router(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to administratively down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to down

Router(config-if)#exit
Router(config)#do show running-config
Building configuration...

Current configuration : 741 bytes


!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address

pg. 24
SMI UNIVERSITY Computer Science Department

duplex auto
speed auto
shutdown
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
no ip address [** this shows any ip assigned to router0 serial 2/0 interface has been cleared]
clock rate 2000000
shutdown
!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.2
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

pg. 25
SMI UNIVERSITY Computer Science Department

Router(config)#

To reset ip address for router1:

Open CLI interface of router1 and write following commands:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 2/0
Router(config-if)#no ip address
Router(config-if)#shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to administratively down


Router(config-if)#exit
Router(config)#do show running-config
Building configuration...

Current configuration : 721 bytes


!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!

pg. 26
SMI UNIVERSITY Computer Science Department

!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
no ip address
shutdown
!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.1
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!

pg. 27
SMI UNIVERSITY Computer Science Department

!
!
end

Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#exit

Router con0 is now available


Press RETURN to get started.
Router>

LAB TASK:

Students will connect two routers using serial port named as Name:0 & Name:1. Practice all
commands mentioned in this lab 6. And ping from one Pc connected to one router to second
pc connected with second router.

pg. 28
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 8 Student’s Name:

Objective:
To learn how to create static routing between two networks.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Theory:
Procedure:

1. Deploy a network having two pcs and two routers as shown in fig.

Router0 fastEthernet 0/0 port is connected with Router1 fastEthernet 0/0 port and
Router0 fastEthernet 1/0 port is connected with PC0 fastEthernet0 port. Similarly,
Router1 fastEthernet 0/0 port is connected with Router0 fastEthernet 0/0 port and
Router1 fastEthernet 1/0 port is connected with PC1 fastEthernet0 port.

2. Open Router 0 CLI interface and write following commands

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#Interface fastEthernet 1/0 [*** this interface connected to PC0]
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

pg. 29
SMI UNIVERSITY Computer Science Department

Router(config-if)#exit

Router(config)#Interface fastEthernet 0/0 [*** this interface connected to Router1]


Router(config-if)#ip address 10.10.1.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#hostname R-1 [*** Router 0 is named as R-1 now]


R-1(config)#

3. Now open Pc0 ip configuration and assign 192.168.1.2 subnet 255.255.255.0 and default
gateway 192.168.1.1
4. Now open router1 CLI window and write following commands

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R-2 [*** Router 1 is named as R-2 now]
R-2(config)# interface fastEthernet 1/0 [*** this interface connected to PC1]
R-2(config-if)#ip address 192.168.2.1 255.255.255.0
R-2(config-if)#no shutdown

R-2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

pg. 30
SMI UNIVERSITY Computer Science Department

R-2(config-if)#
R-2(config-if)#exit

R-2(config)#interface fastEthernet 0/0


R-2(config-if)#ip address 10.10.1.2 255.255.255.0
R-2(config-if)#no shutdown

R-2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to


up

R-2(config-if)#exit
R-2(config)#

pg. 31
SMI UNIVERSITY Computer Science Department

5. Now open Pc1 ip configuration and assign 192.168.2.2 subnet 255.255.255.0 and default
gateway 192.168.2.1
6. Open command line prompt of PC0

C:>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time=57ms TTL=255


Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255

Ping statistics for 192.168.1.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 57ms, Average = 14ms

[Ping is successful as Pc0 and R1 interface 1/0 are part of same network i-e Connected together]

C:>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.1.1: Destination host unreachable.


Reply from 192.168.1.1: Destination host unreachable.
Reply from 192.168.1.1: Destination host unreachable.
Reply from 192.168.1.1: Destination host unreachable.

Ping statistics for 192.168.2.2:


Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

pg. 32
SMI UNIVERSITY Computer Science Department

[Ping is not successful as Pc0 and R1 interface 1/0 are part of different network i-e not connected
together]

7. Open CLI interface of R-1

R-1>enable

R-1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnets


C 10.10.1.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet1/0

Above command show that how many networks are connected to R1 router. If PC0 want to
communicate to PC2, R-1 must be configured to route data from PC0 to PC1.

R-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-1(config)#

R-1(config)#ip route 192.168.2.0 255.255.255.0 10.10.1.2

Note: [** 192.168.2.0 is the ip of network which we want to route to router R1, though the
interface of router R2 whose ip is 10.10.1.2, 255.255.255.0 is the subnet mask of network
192.168.2.0***]

R-1(config)#exit
R-1#
%SYS-5-CONFIG_I: Configured from console by console

R-1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

pg. 33
SMI UNIVERSITY Computer Science Department

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnets


C 10.10.1.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet1/0
S 192.168.2.0/24 [1/0] via 10.10.1.2

Note now 192.168.2.0/24 has been added to the routing table of router R1. Data of network
129.168.2.0 will route through the R2 interface which is connected to R1 having ip address of
10.10.1.2

We also have to make static route in router R2 to network 192.168.1.0 to have successful bi
direction communication between 192.168.1.0 and 192.168.2.0.

8. Open CLi interface of R2

R-2>enable
R-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-2(config)#ip route 192.168.1.0 255.255.255.0 10.10.1.1
R-2(config)#exit
R-2#
%SYS-5-CONFIG_I: Configured from console by console

R-2#R-2# show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnets


C 10.10.1.0 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 10.10.1.1
C 192.168.2.0/24 is directly connected, FastEthernet1/0

9. Now go to PC0 command prompt

C:\>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=1ms TTL=126


Reply from 192.168.2.2: bytes=32 time<1ms TTL=126
Reply from 192.168.2.2: bytes=32 time<1ms TTL=126

pg. 34
SMI UNIVERSITY Computer Science Department

Reply from 192.168.2.2: bytes=32 time<1ms TTL=126

Ping statistics for 192.168.2.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

10. Go to Pc1 command prompt

C:\>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=1ms TTL=126


Reply from 192.168.1.2: bytes=32 time<1ms TTL=126
Reply from 192.168.1.2: bytes=32 time=1ms TTL=126
Reply from 192.168.1.2: bytes=32 time<1ms TTL=126

Ping statistics for 192.168.1.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

pg. 35
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 9 Student’s Name:

Objective:
To learn how to create static route using more than two Hop.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Theory:
Procedure:

1. Deploy a network as shown in fig.

Router0 serial port 2/0 interface is connected with Router1 serial port 2/0 interface and
Router0 fastEthernet port 1/0 interface is connected with PC0 fastEthernet port 0 interface.
Router1 serial port 2/0 interface is connected with Router0 serial port 2/0 interface, Router1
serial port 3/0 interface is connected with Router2 serial port 3/0 interface and Router1
fastEthernet port 1/0 interface is connected with PC1 fastEthernet port 0 interface.
Router2 serial port 3/0 interface is connected with Router1 serial port 3/0 interface and
Router2 fastEthernet port 1/0 interface is connected with PC2 fastEthernet port 0 interface.

Assign IP to Router0 interfaces:

1. Open CLI interface of Router0 and write following commands

R-0>enable
R-0#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

pg. 36
SMI UNIVERSITY Computer Science Department

R-0(config)#interface fastEthernet 1/0


R-0(config-if)#ip address 192.168.1.1 255.255.255.0
R-0(config-if)#no shutdown

R-0(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

R-0(config-if)#exit
R-0(config)#interface serial 2/0
R-0(config-if)#ip address 10.10.1.1 255.255.255.0
R-0(config-if)#no shutdown

R-0(config-if)#exit

Assign IP to PC0:

Open IP configuration of PC1 and give ip 192.168.1.2, subnet : 255.255.255.0 and default
gateway 192.168.1.1

Assign IP to Router1 interfaces:

R-1>enable
R-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-1(config)#interface serial 2/0
R-1(config-if)#ip address 10.10.1.2 255.255.255.0
R-1(config-if)#no shutdown

R-1(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up

R-1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up

R-1(config-if)#exit
R-1(config)#

pg. 37
SMI UNIVERSITY Computer Science Department

R-1(config)#interface fastEthernet 1/0


R-1(config-if)#ip address 192.168.2.1 255.255.255.0
R-1(config-if)#no shutdown

R-1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to


up

R-1(config-if)#exit
R-1(config)#

R-1(config)#interface serial 3/0


R-1(config-if)#ip address 20.20.1.1 255.255.255.0
R-1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial3/0, changed state to down


R-1(config-if)#

Assign IP to PC1:

Open IP configuration of PC1 and give ip 192.168.2.2, subnet : 255.255.255.0 and default
gateway 192.168.2.1

pg. 38
SMI UNIVERSITY Computer Science Department

Assign IP to Router2 interfaces:

R-2>enable
R-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-2(config)#interface fastEthernet 1/0
R-2(config-if)#ip address 192.168.3.1 255.255.255.0
R-2(config-if)#no shutdown

R-2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to


up

R-2(config-if)#exit
R-2(config)#interface serial 3/0
R-2(config-if)#ip address 20.20.1.2 255.255.255.0
R-2(config-if)#no shutdown

R-2(config-if)#
%LINK-5-CHANGED: Interface Serial3/0, changed state to up

R-2(config-if)#exit
R-2(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up

Assign IP to PC2:

Open IP configuration of PC2 and give ip 192.168.3.2, subnet : 255.255.255.0 and default
gateway 192.168.3.1

pg. 39
SMI UNIVERSITY Computer Science Department

Introduce static route between 192.168.1.0 and 192.168.2.0:

Open router R-0 CLI interface and run following commands:

R-0>enable
R-0#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-0(config)#ip route 192.168.2.0 255.255.255.0 10.10.1.2
R-0(config)#
Open router R-1 CLI interface and run following commands:

R-1>enable
R-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-1(config)#ip route 192.168.1.0 255.255.255.0 10.10.1.1
R-1(config)#

Introduce static route between 192.168.1.0 and 192.168.3.0:

Open router R-0 CLI interface and run following commands:

R-0(config)#ip route 20.20.1.0 255.255.255.0 10.10.1.2


R-0(config)#ip route 192.168.3.0 255.255.255.0 10.10.1.2

Open router R-2 CLI interface and run following commands:

R-2>enable
R-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-2(config)#ip route 10.10.1.0 255.255.255.0 20.20.1.1
R-2(config)#ip route 192.168.1.0 255.255.255.0 20.20.1.1

pg. 40
SMI UNIVERSITY Computer Science Department

Introduce static route between 192.168.2.0 and 192.168.3.0:

Open router R-1 CLI interface and run following commands:

R-1(config)#ip route 192.168.3.0 255.255.255.0 20.20.1.2

Open router R-2 CLI interface and run following commands:

R-2>enable
R-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R-2(config)#ip route 192.168.2.0 255.255.255.0 20.20.1.1

Checking PC0 Connectivity with other networks:

Open Command Prompt of PC0 and run following commands:

Packet Tracer PC Command Line 1.0


C:\>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Request timed out.


Reply from 192.168.2.2: bytes=32 time=4ms TTL=126 [**PC0 is connected with PC1]

Reply from 192.168.2.2: bytes=32 time=3ms TTL=126


Reply from 192.168.2.2: bytes=32 time=3ms TTL=126

Ping statistics for 192.168.2.2:


Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 4ms, Average = 3ms

C:\>Ping 10.10.1.2

Pinging 10.10.1.2 with 32 bytes of data:

Reply from 10.10.1.2: bytes=32 time=2ms TTL=254 [**PC0 is connected with 10.10.1.2]

Reply from 10.10.1.2: bytes=32 time=3ms TTL=254


Reply from 10.10.1.2: bytes=32 time=12ms TTL=254
Reply from 10.10.1.2: bytes=32 time=3ms TTL=254

Ping statistics for 10.10.1.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 12ms, Average = 5ms

C:\>ping 192.168.1.1

pg. 41
SMI UNIVERSITY Computer Science Department

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time=1ms TTL=255 [**PC0 is connected with R-0]
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255

Ping statistics for 192.168.1.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\>ping 20.20.1.2

Pinging 20.20.1.2 with 32 bytes of data:

Reply from 20.20.1.2: bytes=32 time=3ms TTL=253 [**PC0 is connected with 20.20.1.2]
Reply from 20.20.1.2: bytes=32 time=2ms TTL=253
Reply from 20.20.1.2: bytes=32 time=10ms TTL=253
Reply from 20.20.1.2: bytes=32 time=13ms TTL=253

Ping statistics for 20.20.1.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 13ms, Average = 7ms

C:\>ping 192.168.3.2

Pinging 192.168.3.2 with 32 bytes of data:

Request timed out.


Reply from 192.168.3.2: bytes=32 time=5ms TTL=125 [**PC0 is connected with PC2]
Reply from 192.168.3.2: bytes=32 time=11ms TTL=125
Reply from 192.168.3.2: bytes=32 time=12ms TTL=125

Ping statistics for 192.168.3.2:


Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 12ms, Average = 9ms

Checking PC1 Connectivity with other networks:

Open Command Prompt of PC1 and run following commands:

Packet Tracer PC Command Line 1.0


C:\>ping 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:

pg. 42
SMI UNIVERSITY Computer Science Department

Reply from 192.168.2.1: bytes=32 time=1ms TTL=255 [**PC1 is connected with R-1]
Reply from 192.168.2.1: bytes=32 time<1ms TTL=255
Reply from 192.168.2.1: bytes=32 time<1ms TTL=255
Reply from 192.168.2.1: bytes=32 time<1ms TTL=255

Ping statistics for 192.168.2.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\>ping 20.20.1.2

Pinging 20.20.1.2 with 32 bytes of data:

Reply from 20.20.1.2: bytes=32 time=3ms TTL=254 [**PC1 is connected with 20.20.1.2]
Reply from 20.20.1.2: bytes=32 time=3ms TTL=254
Reply from 20.20.1.2: bytes=32 time=2ms TTL=254
Reply from 20.20.1.2: bytes=32 time=13ms TTL=254

Ping statistics for 20.20.1.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 13ms, Average = 5ms

C:\>ping 192.168.3.2

Pinging 192.168.3.2 with 32 bytes of data:

Reply from 192.168.3.2: bytes=32 time=1ms TTL=126 [**PC1 is connected with PC2]
Reply from 192.168.3.2: bytes=32 time=3ms TTL=126
Reply from 192.168.3.2: bytes=32 time=2ms TTL=126
Reply from 192.168.3.2: bytes=32 time=14ms TTL=126

Ping statistics for 192.168.3.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 14ms, Average = 5ms

pg. 43
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 10 Student’s Name:

Objective:
To learn how to create dynamic routing using R.I.P.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Theory:
Procedure:

1. Deploy a network as shown in fig.

2. Assign suitable ip addresses to PC’s and each network nodes.

pg. 44
SMI UNIVERSITY Computer Science Department

Initialize RIP in router0:

3. Open CLI interface of router0 and write following commands

R-0>enable
R-0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R-0(config)#router rip [**Initialize RIP in router0]
R-0(config-router)#network 192.168.2.0 [**Network 192.168.2.0 is directly connect with
router0]

R-0(config-router)#network 14.14.1.0 [**Network 14.14.1.0 is directly connect with


router0]

R-0(config-router)#exit

Note: router rip command initialize RIP in router. After that we have to describe each
network which is connected directly with this router using Network command and its
network IP.

Initialize RIP in router1:

4. Open CLI interface of router1 and write following commands

R-1>enable
R-1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R-1(config)#router rip
R-1(config-router)#network 14.14.1.0
R-1(config-router)#network 13.13.1.0
R-1(config-router)#exit
R-1(config)#

Initialize RIP in router2:

5. Open CLI interface of router2 and write following commands

R-2>enable
R-2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R-2(config)#router rip
R-2(config-router)#network 13.13.1.0
R-2(config-router)#network 12.12.1.0
R-2(config-router)#exit
R-2(config)#

Initialize RIP in router3:

6. Open CLI interface of router3 and write following commands

pg. 45
SMI UNIVERSITY Computer Science Department

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 12.12.1.0
Router(config-router)#network 11.11.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router4:

7. Open CLI interface of router4 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 11.11.1.0
Router(config-router)#network 90.90.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router5:

8. Open CLI interface of router5 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 90.90.1.0
Router(config-router)#network 80.80.1.0
Router(config-router)#exit

Initialize RIP in router6:

9. Open CLI interface of router6 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 80.80.1.0
Router(config-router)#network 70.70.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router7:

10. Open CLI interface of router7 and write following commands

pg. 46
SMI UNIVERSITY Computer Science Department

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 70.70.1.0
Router(config-router)#network 60.60.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router8:

11. Open CLI interface of router8 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 60.60.1.0
Router(config-router)#network 50.50.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router9:

12. Open CLI interface of router9 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 50.50.1.0
Router(config-router)#network 40.40.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router10:

13. Open CLI interface of router10 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 40.40.1.0
Router(config-router)#network 30.30.1.0
Router(config-router)#exit
Router(config)#

pg. 47
SMI UNIVERSITY Computer Science Department

Initialize RIP in router11:

14. Open CLI interface of router11 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 30.30.1.0
Router(config-router)#network 20.20.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router12:

15. Open CLI interface of router12 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 20.20.1.0
Router(config-router)#network 10.10.1.0
Router(config-router)#exit
Router(config)#

Initialize RIP in router13:

16. Open CLI interface of router13 and write following commands

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 10.10.1.0
Router(config-router)#network 192.168.1.0
Router(config-router)#exit
Router(config)#

Check if RIP has identified all nodes

Check If RIP has created dynamic routing above mentioned networks

Go to CLI interface of router0 and check number of ip routes.

R-0#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

pg. 48
SMI UNIVERSITY Computer Science Department

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area


* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

R 10.0.0.0/8 [120/12] via 14.14.1.1, 00:00:03, Serial2/0


R 11.0.0.0/8 [120/3] via 14.14.1.1, 00:00:03, Serial2/0
R 12.0.0.0/8 [120/2] via 14.14.1.1, 00:00:03, Serial2/0
R 13.0.0.0/8 [120/1] via 14.14.1.1, 00:00:03, Serial2/0
14.0.0.0/24 is subnetted, 1 subnets
C 14.14.1.0 is directly connected, Serial2/0
R 20.0.0.0/8 [120/11] via 14.14.1.1, 00:00:03, Serial2/0
R 30.0.0.0/8 [120/10] via 14.14.1.1, 00:00:03, Serial2/0
R 40.0.0.0/8 [120/9] via 14.14.1.1, 00:00:03, Serial2/0
R 50.0.0.0/8 [120/8] via 14.14.1.1, 00:00:03, Serial2/0
R 60.0.0.0/8 [120/7] via 14.14.1.1, 00:00:03, Serial2/0
R 70.0.0.0/8 [120/6] via 14.14.1.1, 00:00:03, Serial2/0
R 80.0.0.0/8 [120/5] via 14.14.1.1, 00:00:03, Serial2/0
R 90.0.0.0/8 [120/4] via 14.14.1.1, 00:00:03, Serial2/0
R 192.168.1.0/24 [120/13] via 14.14.1.1, 00:00:03, Serial2/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0

R stands for dynamic route performed with RIP protocol. As there are total 15 networks. Two
networks 192.168.2.0 and 14.14.1.0 are connected directly to router0. Other 13 networks are
connected to router by using RIP protocol (dynamic routing).

Open command prompt of PC0 and ping PC1.

Packet Tracer PC Command Line 1.0


C:\>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=195ms TTL=114


Reply from 192.168.1.2: bytes=32 time=59ms TTL=114
Reply from 192.168.1.2: bytes=32 time=39ms TTL=114
Reply from 192.168.1.2: bytes=32 time=42ms TTL=114

Ping statistics for 192.168.1.2:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 39ms, Maximum = 195ms, Average = 83ms

LAB TASK: Students will replace default Router names with their Name. They are required
to connect 16 routers in series and two pc at both ends. Initiate RIP on each router. Connect
connectivity and show ip route command on any one of the router.

pg. 49
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 11 Student’s Name:

Objective:

Configuring DHCP within a LAN in a packet Tracer

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Procedure:

1. Create a LAN like given below.

2. Configure router interface with ip 10.0.0.1 and subnet mask 255.0.0.0

Router>enable
Router#config t
Router(config)#interface fastethernet0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

3. Click on server->config, then assign gateway in our example 10.0.0.1

pg. 50
SMI UNIVERSITY Computer Science Department

4. Click on Fastethernet and assign ip address and subnet mask. I am going to use
10.0.0.2 and subnet mask 255.0.0.0 for our server.

5. Click on DHCP, there you can see default pool.

6. Just give default gate way, here we are using 10.0.0.1.

7. DNSserver, Just give our server ip address, 10.0.0.2.

8. Then just edit start ip address. I am going to give 10.0.0.10 and subnet mask
255.0.0.0

9. In Maximum Number of Users, Here we are using Class A Network so we can use
1, 67, and 77,216 ip address. Just give how many ip address you want in this pool. I
am going to give 500

10. Assign TFTP server ip address, just give our server ip address, 10.0.0.2.

Step 11: And click on save. That’s it...

pg. 51
SMI UNIVERSITY Computer Science Department

pg. 52
SMI UNIVERSITY Computer Science Department

pg. 53
SMI UNIVERSITY Computer Science Department

pg. 54
SMI UNIVERSITY Computer Science Department

pg. 55
SMI UNIVERSITY Computer Science Department

Conclusion:It has been observed DHCP configured successfully.

pg. 56
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 12 Student’s Name:

Objective:
Connect LAN with wireless router.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Procedure:

1. Create a topology like this.

2. Single click on PC.

pg. 57
SMI UNIVERSITY Computer Science Department

3. Switch off the button.

4. Drag and drop the Ethernet card and insert wireless card.

pg. 58
SMI UNIVERSITY Computer Science Department

5. Switch on the light.

Conclusion:

After connecting LAN to wireless router communication will be start automatically because
router is by default configure.

pg. 59
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 13 Student’s Name:

Objective:

Configuring wireless router with LAN by using WAP2-PSK algorithm.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Procedure:

1. Create a topology like this.

2. Double click on router.

pg. 60
SMI UNIVERSITY Computer Science Department

3. Write the password in the text field of WAP2-PSK.

After closing the window your topology will be look like this.

pg. 61
SMI UNIVERSITY Computer Science Department

4. Now after give password you will be write the password on that PC which you want
to access. Double click on PC0.

5. Single click on PC wireless.

pg. 62
SMI UNIVERSITY Computer Science Department

6. Single click on connect.

7. Select by the wireless network name. Here name is default, select and click on
connect.

pg. 63
SMI UNIVERSITY Computer Science Department

8. Write the password in the pre –shared key.

9. After click on connect PCO with access the network.

Conclusion:

After given password to the PCO it can access the network. In the same another user want to
access he should not the password.

pg. 64
SMI UNIVERSITY Computer Science Department

Student’s ID: Laboratory Exercise No: 14 Student’s Name:

Objective:

Configuring the router by making server and using Access point device with LAN.

Required Tools / Equipment:


➢ Cisco Packet Tracer
➢ Router

Procedure:

1. Create a topology like this.

2. Single click on the router and tell the router about network of LAN.

pg. 65
SMI UNIVERSITY Computer Science Department

3. Select fast Ethernet 0/0, give the ip and default gate way.

4. Select fast Ethernet 1/0, give the ip and default gate way.

pg. 66
SMI UNIVERSITY Computer Science Department

5. Click on the server and give the gateway and DNS server.

pg. 67

You might also like