Computer Networks Lab Manual
Computer Networks Lab Manual
Computer Networks Lab Manual
B.S (CS)
Semester:
Spring 2023
]Course Coordinator:
Lab Instructor
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)
Course Supervisor:
Signature: Signature:
SMI UNIVERSITY Computer Science Department
Objective:
To learn how to make a crossover cable and straight through cable connector.
Procedure:
Making of Straight cable:
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
Connector 1 Connector 2
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
Objective:
To learn how to establish connection and communication between two PCs.
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
Objective:
To learn and understand the concept of IP address and subnet mask.
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
IP address Formula: 2n
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
• 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
Objective:
To learn how to access operating system of a 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.
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.
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:
pg. 8
SMI UNIVERSITY Computer Science Department
To UP ports logically:
CS(config-if)#no shutdown
CS(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
pg. 9
SMI UNIVERSITY Computer Science Department
CS>enable
Password: <type SMIU>
Password: <type COMPUTERSCIENCE>
CS#
CS>enable
Password: <you have to type only encrypted form password now if set before>
CS#
CS>enable
CS# ------ You will have to enter Privilege mode password here if set before
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
Objective:
To learn how to configure operating system of a switch.
Theory:
Procedure:
To Assign password to console mode in Switch:
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
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
pg. 11
SMI UNIVERSITY Computer Science Department
If it Replies then:
C:\>telnet 192.168.1.2
Trying 192.168.1.2 ...Open
Password: <1234>
On telnet:
Switch>show mac-address-table
Mac Address Table
-------------------------------------------
On CLI:
Switch>show mac-address-table
Mac Address Table
-------------------------------------------
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 security:
Switch(config-if)# Switchport port-security
This command directs Switch to give access only to the specified device which is defined by
Mac Address.
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)
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
Theory:
Router works on 3rd layer which is named as “Network Layer”.
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.
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?
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
- 1 console port
Procedure:
To see Details of interface:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface ?
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
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
Router>enable
Router#copy running-config startup
Destination filename [startup-config]?
Building configuration...
[OK]
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>
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>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
Objective:
To learn how to configure a router.
Theory:
How to get detail of interface:
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#
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
pg. 18
SMI UNIVERSITY Computer Science Department
Connect two routers; each using serial port 2/0 as shown in fig.
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
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).
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
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).
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
pg. 21
SMI UNIVERSITY Computer Science Department
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
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#
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
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).
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
Router(config-if)#exit
Router(config)#do show running-config
Building configuration...
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)#
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
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
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
Objective:
To learn how to create static routing between two networks.
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.
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-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
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-if)#
%LINK-5-CHANGED: 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
[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
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]
R-1>enable
R-1#show ip route
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)#
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
pg. 33
SMI UNIVERSITY Computer Science Department
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.
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
C:\>ping 192.168.2.2
pg. 34
SMI UNIVERSITY Computer Science Department
C:\>ping 192.168.1.2
pg. 35
SMI UNIVERSITY Computer Science Department
Objective:
To learn how to create static route using more than two Hop.
Theory:
Procedure:
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.
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-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
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-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
R-1(config-if)#exit
R-1(config)#
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
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
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
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)#
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
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
C:\>Ping 10.10.1.2
Reply from 10.10.1.2: bytes=32 time=2ms TTL=254 [**PC0 is connected with 10.10.1.2]
C:\>ping 192.168.1.1
pg. 41
SMI UNIVERSITY Computer Science Department
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
C:\>ping 20.20.1.2
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
C:\>ping 192.168.3.2
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
C:\>ping 20.20.1.2
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
C:\>ping 192.168.3.2
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
pg. 43
SMI UNIVERSITY Computer Science Department
Objective:
To learn how to create dynamic routing using R.I.P.
Theory:
Procedure:
pg. 44
SMI UNIVERSITY Computer Science Department
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)#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.
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)#
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)#
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)#
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)#
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
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)#
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)#
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)#
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)#
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
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)#
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)#
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)#
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
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).
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
Objective:
Procedure:
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)#
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.
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.
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
pg. 56
SMI UNIVERSITY Computer Science Department
Objective:
Connect LAN with wireless router.
Procedure:
pg. 57
SMI UNIVERSITY Computer Science Department
4. Drag and drop the Ethernet card and insert wireless card.
pg. 58
SMI UNIVERSITY Computer Science Department
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
Objective:
Procedure:
pg. 60
SMI UNIVERSITY Computer Science Department
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.
pg. 62
SMI UNIVERSITY Computer Science Department
7. Select by the wireless network name. Here name is default, select and click on
connect.
pg. 63
SMI UNIVERSITY Computer Science Department
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
Objective:
Configuring the router by making server and using Access point device with LAN.
Procedure:
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