Documente Academic
Documente Profesional
Documente Cultură
Solutions
by
ABDULLAH IMTIAZ
EXPERIMENT 1 – INTRODUCTION TO NETWORK DEVICES
SWITCH ROUTER
A network switch or switching hub is a computer A router is an electronic device that interconnects
networking device that connects network segments. two or more computer networks, and selectively
It routes data at the data link layer (layer 2) of the interchanges packets of data between them. Each
OSI model. Switches that additionally process data data packet contains address information that a
at the network layer (layer 3 and above) are often router can use to determine if the source and
referred to as Layer 3 switches or multilayer destination are on the same network, or different
switches. network. Multiple routers are used in a large
collection of interconnected networks, the routers
exchange information about target system addresses,
so that each router can build up a table showing the
preferred paths between any two systems on the
interconnected networks.
Address Class
131.107.2.89 B
3.3.57.0 A
200.200.5.2 C
191.107.2.10 B
127.0.0.1 A
3 Experiment 3 – Classification of IP
EXPERIMENT4 – ETHEREAL
Exercise 4.1: View packet of size greater than 40 bytes. Show result [4]
ANS :- A very useful mechanism available in Ethereal is packet colorization. You can set-up Ethereal so that
it will colorize packets according to a filter. This allows you to emphasize the packets you are (usually)
interested in .This make software more user friendly.
Exercise 4.3: View packet of size smaller than 89 bytes. Show result: [3]
4 Experiment 3 – Classification of IP
EXPERIMENT 5- BASIC NETWORKING COMMANDS IN MSDOS
1) 172.18.3.1 /24
Subnet mask = 11111111.11111111.11111111.00000000 172.18.0.0
Its subnet mask found to be =255.255.255.0
172.18.1.0
Magic number is = 1 and found in third octet
172.18.2.0
Network Address = 172.18.3.0
172.18.3.0
Broadcast Address = 172.18.3.255
172.18.4.0
First Usable Address = 172.18.3.1
Last Usable Address = 172.18.3.254
1) 192.168.3.55 /28
Subnet mask = 11111111.11111111.11111111.11110000 192.168.3.0
Its subnet mask found to be =255.255.255.240
192.168.3.16
Magic number is = 16 and found in fourth octet
192.168.3.32
Network Address = 192.168.3.48
192.168.3.48
Broadcast Address = 192.168.3.63
192.168.3.64
First Usable Address = 192.168.3.49
Last Usable Address = 192.168.3.62
1) 172.18.3.1 /15
Subnet mask = 172.0.0.0
11111111.11111110.00000000.00000000 172.2.0 .0
Its subnet mask found to be =255.254.0.0 172.4.0 .0
Magic number is = 2 and found in second octet ………….
Network Address = 172.18.0.0 172.18.0.0
Broadcast Address = 172.19.255.255 172.20.0.0
First Usable Address = 172.18.0.1
Last Usable Address = 172.19.255.254
1) 110.8.67.101 /24
Subnet mask = 11111111.11111111.11111111.00000000 110.8.0.0
Its subnet mask found to be =255.255.255.0
110.8.1 .0
Magic number is = 1 and found in third octet
110.8.2 .0
Network Address = 110.8.67.0
………….
Broadcast Address = 110.8.67.255
110.8.67.0
First Usable Address = 110.8.67.1
110.8.68.0
Last Usable Address = 110.8.67.254
EXPERIMENT 9 –PACKET TRACER AND DESIGNING TOPOLOG
Build your own topology as discussed in lab. The topology comprise of two routers and two
switches. Each switch has four PCs. Send packets from PC1 to PC4 using PDU tool. Show the
topology and output here [10]
EXPERIMENT 10 –ROUTER CONFIGURATION
Exercise 11.1) Implement the concept of static routing for the given diagram in LAB 10. [10]
We have given router 1 hostname R1 and router 2 hostname R2
R1(config)#interface e 0
R1(config-if)#ip address 192.168.10.1 255.0.0.0
R1(config-if)#no shutdown //exit
R1(config)#interface s 0
R1(config-if)#ip address 192.168.20.1 255.255.255.0
R1(config-if)#no shutdown //exit
R1(config)#ip route 20.0.0.1 255.0.0.0 20.0.0.2
R2(config)#interface e 0
R2(config-if)#ip address 192.168.30.1 255.0.0.0
R2(config-if)#no shutdown //exit
R2(config)#interface s 0
R2(config-if)#ip address 192.168.20.2 255.255.255.0
R2(config-if)#no shutdown //exit
R2(config)#ip route 20.0.0.2 255.0.0.0 20.0.0.1
EXPERIMENT 12 – DYNAMIC ROUTING
Exercise 12.1. Implement the concept of dynamic routing for the given diagram in LAB 10. [10]
USING RIP
USING IGRP
Exercise 13.1. Implement all the concepts of ACL covered in Lab. [10]
STANDARD ACL
R1(config)#Access-list 2 deny 192.160.3.10 0.0.0.0
R1(config)#Access-list 4 permit 230.10.40.15 0.0.0.0
R1(config-if)#ip Access-group 2 in
R1(config-if)#ip Access-group 5 out
Extended ACL
R1(config)#Access-list 101 deny TCP 190.80.2.1 0.0.0.0 190.4.8.2 0.0.0.0 eq 60
R1(config)#Access-list 102 permit TCP 194.20.30.11 0.0.0.0 230.5.99.1 0.0.0.0 eq 43
R1(config)#Access-list 104 deny TCP 223.5.9.1 0.0.0.0 193.4.55.1 0.0.0.0 eq ftp log
R1(config)#Access-list 101 deny ICMP any
R1(config)#Access-list 102 permit ICMP any
R1(config)#Access-list 103 deny ICMP any
EXPERIMENT 14 – CLIENT AND SERVER SOCKET PROGRAMMING
A socket basically establishes the connecting endpoints between two hosts.The basic operations of
socket programing is as follows:
Connect to remote host.
Send and receive data.
Close a connection.
Bind to a port.
Listen to incoming data.
Accept remote connections on the bounded port.
The last three operations are specific to servers only. They are implemented by the Server-
Socket created by server.
The client program work flow occurs in the following manner:
i. Create a new socket object.
ii. Attempt to connect to the remote host
iii. Once connection has succeeded, the local and remote hosts get hold of the input and
output streams and can work in full duplex mode. The data received and sent can mean
different things, depending on the protocol used .Generally, there is some kind of
agreement established followed by data transmission.
iv. Sockets must be closed at both ends after transmission is completed. Some protocols,
such as HTTP, make sure that the connection is closed upon each request service. FTP, on
the other hands, allows multiple requests to process before closing the connection