Computer Networks Lab Assignment 1
By Harsh Singh Negi, MCA 1 (Section B)
AIM: To create a network in CISCO PACKET TRACKER to study the working of a HUB and a SWITCH
THEORY: Hubs are simple devices with an input Ethernet port that connects to a router and multiple
output ports for devices to connect to. When it receives data, it transmits it to all connected devices,
leaving the intended device to recognize the data.
A network switch is a hardware connection device that is smarter than a hub. Once a switch knows the
routes and ports, it reads data packet headers to determine which device it is supposed to transmit
information to via its unique MAC address.
NETWORK DESIGN:
DEVICES USED: Hub, PCs, Switch, Copper Straight-through cable, Copper crossover cable
HUB NETWORK:
Harsh Singh Negi
SETTINGS:
DEVICE NAME IP ADDRESS SUBNET MASK
PC1 192.168.10.1 255.255.255.0
PC2 192.168.10.2 255.255.255.0
PC3 192.168.10.3 255.255.255.0
PC4 192.168.10.4 255.255.255.0
Harsh Singh Negi, MCA 1 (Section b)
Connectivity is checked by using the PING command.
Cisco Packet Tracer PC Command Line 1.0
C:\>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Reply from 192.168.10.1: bytes=32 time=3ms TTL=128
Reply from 192.168.10.1: bytes-32 time<1ms ITL-128
Reply from 192.168.10.1: bytes=32 time<1ms TTL=128
Roply from 192.168.10.1: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.10.1:
Packets: Sont = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 3ms, Average = 0ms
C:\>
SIMULATION: A document is initiated by PC1 addressed to PC4. This document is sent to the hub which
in turn transmits this data to every other PC in the network. PC4 accepts the document while others
reject it. This acknowledgement is sent to the hub addressed to PC1 which again transmits it to every
other PC in the network. PC1 accepts this acknowledgement while the others reject it.
Harsh Singh Negi
2
Harsh Singh Negi, MCA 1 (Section b)
Harsh Singh Negi
Harsh Singh Negi
3
Harsh Singh Negi, MCA 1 (Section b)
Harsh Singh Negi
Harsh Singh Negi
4
Harsh Singh Negi, MCA 1 (Section b)
SWITCH NETWORK:
Harsh Singh Negi
SETTINGS:
DEVICE NAME IP ADDRESS SUBNET MASK
PC1 192.168.10.1 255.255.255.0
PC2 192.168.10.2 255.255.255.0
PC3 192.168.10.3 255.255.255.0
PC4 192.168.10.4 255.255.255.0
Connectivity is checked by using the PING command.
Cisco Packet Tracer PC Command Line 1.0
C:\>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Reply from 192.168.10.1: bytes=32 time=3ms TTL=128
Reply from 192.168.10.1: bytes-32 time<1ms ITL-128
Reply from 192.168.10.1: bytes=32 time<1ms TTL=128
Roply from 192.168.10.1: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.10.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 3ms, Average = 0ms
C:\>
5
Harsh Singh Negi, MCA 1 (Section b)
SIMULATION: A document is initiated by PC1 addressed to PC4. This document is sent to the switch
which in turn transmits this data to PC4 in the network. PC4 accepts the document and sends an
acknowledgement to the switch addressed to PC1 which again transmits it PC1 in the network. PC1
accepts this acknowledgement.
Harsh Singh Negi
Harsh Singh Negi
6
Harsh Singh Negi, MCA 1 (Section b)
Harsh Singh Negi
Harsh Singh Negi
7
Harsh Singh Negi, MCA 1 (Section b)
COMPARISON BETWEEN HUB AND SWITCH:
Switch Hub
Switches function on layer 2 of the OSI framework. Hubs function on layer 1 of the OSI framework.
Switches record MAC addresses in a table to learn Hubs are less intelligent devices and always send
which devices to transmit information to. all information to all connected devices
Switches can operate at full duplex or half duplex, Hubs operate at half duplex, making them slower
using all available bandwidth, creating faster and and forcing devices to share bandwidth equally.
more efficient networks.
Switches send information using data packets. Hubs send information using bits.
HUB and SWITCH together in one NETWORK
Harsh Singh Negi