Lab Manual: Electrical Engineering - IECS UST Bannu
Lab Manual: Electrical Engineering - IECS UST Bannu
Lab Manual: Electrical Engineering - IECS UST Bannu
Department
Labs Title
Lab-01 IP Addressing
Lab-02 Connecting Two PCs using Packet Tracer
Lab-03 Connecting Two LANs Using Switches
Lab-04 Connecting Two LANs Through Routers
Lab-05 Basic VLAN Configuration
Lab-06 DHCP Configuration
Lab-07 DNS Configuration
Lab-08 FTP Server Configuration
Lab-09 SMTP Server Configuration
Lab-10 Configuration of VOIP
Lab-11 Configuration of EIGRP Protocol
Lab-12 Network Simulation using Packet Tracer and router GUI mode
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 1
IP Addressing
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objective:
The purpose of the lab is to introduce the concept of IP addressing and subnet masking.
Classless Addressing
Classless addressing uses a variable number of bits for the network and host portions of the
address. Classless addressing treats the IP address as a 32 bit stream of ones and zeroes, where
the boundary between network and host portions can fall anywhere between bit 0 and bit
31.Classless addressing system is also known as CIDR (Classless Inter-Domain Routing).Classless
addressing is a way to allocate and specify the Internet addresses used in inter-domain routing
more flexibly than with the original system of Internet Protocol (IP) address classes. CIDR
(Classless Internet Domain Routing), defines arbitrarily-sized subnets solely by base address and
number of significant bits in the address. A CIDR address of 192.168.0.0/24 defines a block of
addresses in the range 192.168.0.0 through 192.168.0.255, while 192.168.0.0/20 would define
a network 16 times as large - from 192.168.0.0 through 192.168.15.255.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Subnetting and Subnet Masking
Subnetting
Subnetting an IP network can be done for a variety of reasons, including organization, use of
different physical media (such is Ethernet, FDDI, WAN etc ), preservation of address space, and
security. The most common reason is to control network traffic. In an Ethernet network, all
nodes on a segment see all the packets transmitted by all the other nodes on that segment.
Performance can be adversely affected under heavy traffic loads, due to collisions and the
resulting retransmissions. A router is used to connect IP networks to minimize the amount of
traffic each segment must receive.
Subnet Masking
Applying a subnet mask to an IP address allows someone to identify the network and node
parts of the address. Performance a bitwise logical AND operation between the IP address and
the subnet mask results in the Network Address of Number.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 2
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
CISCO Packet Tracer
TASK 1
First open the CISCO Packet Tracer App from the desktop and then from the menu select
devices>generic devices select PC0 and PC1, now connect both PCs(Physical connection) with copper
cross wire by clicking fast Ethernet, a green dot will be shown which means that both the devices are
logically and physically connected. However in case of red dot, the PCs are not connected both
physically and logically. As shown below:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Assignment of IP Addresses to PC0 and PC1
Now assign IPs to both the PCs. By double clicking on PC0 which we placed and go
to>desktop>Configure IP. Now assign IP in the IP Address bar, as shown below. The same method is for
PC1.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Accessing PC1 from PC0 by Ping Command
Now again close the IP Configuration tab. Then in the desktop>select>Command Prompt. Now ping the
PC1 from PC0 by using ping command and IP assigned to PC1. If PC1 replies it means that the connection
is properly established and data can be transferred or received. The same is the case for PC0 to be
pinged from PC1. As shown below:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Lab 3
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Connecting Two Hosts through Switch and Sending Data
First connect the two PCs (PC0 & PC1) by Copper Straight Through wire along with the switch shown
below.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
After the successful connection, on the right most corner there is a Message icon select it and then
target the Sending device with cursor and then the Destination PC. A Successful status will be obtained
when message is sent successfully from one PC to another.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Lab 4
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Network Topology
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Configuring Router
Now by clicking router and then go to CLI(Command Line Interface) and then press enter then
type no and write the following commands:
Enable
Configure terminal
No shut
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Go to CLI then type the following commands for Switch0
enable
configure terminal
interface vlan1
no shut
exit
ip default-gateway 192.168.10.1
do write
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now close Switch0 and then configure the Switch1. But for switch1 the default gateway is
192.168.20.6
After all these activity check the network connection by selecting Message and send it from one
PC in either network to another PC in another Network.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Lab 5
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objective:
Design a VLAN consisting of 3 switches and 6 PCs as shown below:
Topology
Now clear any existing configuration on the switches and initialize all ports in the shutdown
state by using following commands on all the 3 Switches in CLI.
Commands
Switch>en
Switch#config term
Switch(config)#interface range fa0/1-24
Switch(config-range)#shutdown
Switch(config-if-range)#interface range gi0/1-2
Now use these commands for the next 2 Switches (Switch1 & Switch2)
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
By doing this the Network will look like as shown below:
Now assign IP addresses to all the 6 PCs according table shown below:
Devices IP Addresses
PC0 192.168.2.1
PC1 192.168.2.2
PC2 192.168.2.3
PC3 192.168.2.4
PC4 192.168.2.5
PC5 192.168.2.6
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now configure VLAN on switches by using the below commands:
On Switch0 (hostname S1)
Swich> en
Switch# config t
Switch(config)# hostname S1
S1(config)#vlan 11
S1(config-vlan)#name Teachers
S1(config-vlan)#vlan 22
S1(config-vlan)#name Students
S1(config-vlan)#vlan 33
S1(config-vlan)#name Clerks
S1(config-vlan)#vlan 44
S1(config-vlan)#name Management
S1# ex
S1# ex
Now to show VLAN column entry brief, type
S1# sh vlan br
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Repeat the above commands for the other two switches (Switch1 and Switch2).
Assign Switch ports of VLANs on Switch1 & Switch2 (namely S2 and S3)
For Switch2
S3>en
S3#config t
S3(config)#int range fa0/6-10
S3(config-if-range)#switchport access vlan 33
S3(config-if-range)#int range fa0/11-17
S3(config-if-range)#switchport access vlan 11
S3(config-if-range)#int range fa0/18-24
S3(config-if-range)#switchport access vlan 22
S3(config-if-range)#end
S3#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Assigning IP Address to Switches
Configuring the management IPs on all the 3 Switches
Commands on Switch0 (IP 192.168.4.1)
S1>en
S1#config t
S1(config)#int vlan 44
S1(config-if)#ip add 192.168.4.1 255.255.255.0
S1(config-if)#no shutdown
S1(config-if)#ex
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Configuring trunking and the native VLAN for the trunking ports on all Switches.
Switch0
S1(config)#interface range fa0/1-5
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk native vlan 44
S1(config-if-range)#no shutdown
S1(config-if-range)#end
Switch1
S2(config)# interface range fa0/1-5
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#switchport trunk native vlan 44
S2(config-if-range)#no shutdown
S2(config-if-range)#end
Switch2
S3(config)# interface range fa0/1-5
S3(config-if-range)#switchport mode trunk
S3(config-if-range)#switchport trunk native vlan 44
S3(config-if-range)#no shutdown
S3(config-if-range)#end
After doing this the state of the desired ports will be changed to up.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
When PC6 pinged from PC1
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 6
DHCP Configuration
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objective:
Configuring DHCP, such that all the PCs connected will get a Dynamic IP Address from the DHCP
pool.
Topology
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now exclude IP Addresses in range of 192.168.10.1 upto 192.168.10.10 by using the command
R1(config)#ip dhcp exclude 192.168.10.1 192.168.10.10
R1(config)#ex
So IPs in this range would not be assigned dynamically by the Router to all of the PC in this
Network.
Now type the following commands again
R1(config)#ip dhcp exclude 192.168.10.1 192.168.10.10
R1(config)#ex
Now select PC0 go to Desktop> IP Address and select DHCP, so the PC0 will get IP Address
dynamically from the DHCP pool. Do this for the remaining two PCs (PC1 & PC2).
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 7
DNS Configuration
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Introduction
Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a
directory of domain names and translate them to Internet Protocol (IP) addresses.
This is necessary because, although domain names are easy for people to remember,
computers or machines, access websites based on IP addresses.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now go to>services> DNS
In Name>type>www.ustb.com
In Address>type> 192.168.1.1 > now click > ADD
Now click on PC (192.168.1.5) and assign IP 192.168.1.5 to it. In its DNS section insert the IP
Address of the server known as 192.168.1.1 as shown below:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now ping the server (192.168.1.1) from PC (192.168.1.5)
LAB 8
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
FTP Server Configuration
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objective:
Create and configure FTP server and upload and download files from it.
Network topology:
First set the network according to the below figure:
Assign the desired IPs to all the devices according to the below table
Devices IP Address
PC0 171.16.0.1
PC1 171.16.0.3
PC2 192.168.10.3
Server-PT 192.168.10.1
Router0 fa0/0 171.16.0.2
Router0 fa1/0 192.168.10.2
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now go to Router> Config> FastEthernet0/0 > IP Address> type> 171.16.0.2
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now configure FTP server
In config (Services) select FTP and create user id by using below commands:
Username: abc
Password: 123
Then click Add
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now create text file in either of the PC
By clicking either of the PC in the network, in desktop go to text editor to create the txt file and
save.
Now to check the saved txt file in command prompt type “dir” it will show the directory of that
PC.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Another access to FTP server whose IP is 192.168.10.1 by using the following commands
PC> ftp 192.168.10.1
And access with username: abc & password: 123
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now to check the directory of the server simply type “dir” it will look like as shown below:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Uploading txt file to the Server
Use the below commands:
ftp> put text1.txt
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now to check the directry of server type “dir” so the text1.txt will be updated to it as shown
below:
Use the same commands for uploading files to server on other PCs in the Network.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now to download the file on either of the PC in the Network simply login to ftp server as
mentioned above and use the following commands and then in:
ftp> get text1.txt
As shown:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 9
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objective:
Create a network as shown below.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
PC0 Configuration
IP : 192.168.1.2
PC0 Configuration
IP : 192.168.1.3
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Email/SMTP Configuration on SMTP Server
In SMTP Server go to Services and select EMAIL.
In User Setup
User: Daud
Password: 60
Add other users with their corresponding passwords. Like PC0 & PC1
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Composing Mail on PC0 and sending it to PC1
Then
Now to check the received Email go to PC1 > Mail Browser and click on the Receive button as
shown below:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 10
Configuration of VOIP
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Topology
Draw the below topology in Packet Tracer with 2-Routers, 1-Switch and 3-IP Phones.
One Router is for DHCP and the other is for Communication Management Express (CME) which
is used for managing the phone calls.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now configure DHCP Server first
Name one of the router as the “dhcp” and then configure it by using the below commands.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
In the same way configure the CME router by using the following commands as shown in
below figure.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now Switch Configuration
Configure the switch by assigning switch port access to the user defined vlans.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now Power up the IP Phone by clicking it and go to “Config” menu.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Now check the DHCP router binding
Use the below command:
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Configuring CME for managing Phone Calls over VOIP Phones.
Note: Use the step wise procedure
Step 1
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Step 2
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Step 3
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Step 4
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 11
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Objectives
The objective of this lab is how to configure EIGRP Protocol on Cisco Router
Topology
Result
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Ping PC1 from PC0
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Information about Routing Tables ( show IP route)
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
LAB 12
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Device Interface IP Address Subnet Mask Def. Gateway
Se0/0/0 192.168.88.1 255.255.255.0 N/A
Router-0 Se0/0/1 192.168.77.1 255.255.255.0 N/A
Fa0/0 192.168.3.1 255.255.255.0 N/A
Se0/0/0 192.168.66.1 255.255.255.0 N/A
Router-1 Se0/0/1 192.168.77.2 255.255.255.0 N/A
Fa0/0 192.168.4.1 255.255.255.0 N/A
Se0/0/0 192.168.88.2 255.255.255.0 N/A
Router-2
Se0/0/1 192.168.66.2 255.255.255.0 N/A
PC0 Fa0/1 192.168.3.4 255.255.255.0 192.168.3.1
PC1 Fa0/2 192.168.3.3 255.255.255.0 192.168.3.1
PC2 Fa0/1 192.168.4.2 255.255.255.0 192.168.4.1
PC3 Fa0/2 192.168.4.3 255.255.255.0 192.168.4.1
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Task No.1: How to configure Routers
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Task No.2: How to configure Routing Protocols?
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Task No.3: How to configure PCs?
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS
Task No.4: How to check the connectivity (ping)?
1. Click this to select the simulation mode, where we shall simulate the network
and can see the packets visually.
2. Click on this message box to forward packets from source (3) to destination (4).
3. Click on the device from where you will forward packet to destination.
4. Click on the device which you want to select as a destination and want to
forward packets to.
5. Click on this to forward the packets automatically (works like a play button).
6. This will show the result of the simulation, the type of packets, source and
destination, the output weather it is successful or not or in progress.
DAUD WAZIR
COMPUTER COMMUNICATION NETWORKS