SR - No List Pages Sign: Lab Manual List of Experiments
SR - No List Pages Sign: Lab Manual List of Experiments
SR - No List Pages Sign: Lab Manual List of Experiments
Lab Manual
List of Experiments
SR.No List Pages Sign
1 Study of different network
devices in detail.
2 Study of different types of
network cables and
practically implement the
cross-wired cable and
straight through cable using
clamping tool.
3 Study of basic network
command and Network
configuration commands.
4 Implement different LAN
topologies using Network
Simulator.
5 Implement the concept of
VLAN using Network
Simulator.
6 Implement the concept of
static routing.
7 Implement the concept of
dynamic routing (RIP, OSPF,
and BGP).
8 Packet capture and header
analysis by wire-shark
(TCP,UDP,IP)
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL: 1
Repeater
Hub
Types of Hub:
Passive Hub
Active Hub
Intelligent Hub
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Bridges
Types of Bridges:
Transparent Bridges
Source Routing Bridges
Router
Gateway
Switch
Types of Switches:
Unmanaged Switch
Managed Switch
LAN Switch
PoE Switch
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL-2
Aim: Study of different types of network cables and practically implement the
cross-wired cable and straight through cable using clamping tool.
PRACTICAL: 3
All commands related to Network configuration which includes how to switch to privilege
mode and normal mode and how to configure router interface and how to save this
configuration to flash memory or permanent memory. This command includes
Ping:
ping(8) sends an ICMP ECHO_REQUEST packet to the specified host. If the host
responds, you get an ICMP packet back. Sound strange? Well, you can “ping” an IP
address to see if a machine is alive. If there is no response, you know something is wrong.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Traceroute:
Tracert is a command which can show you the path a packet of information taken from
your computer to one you specify. It will list all the routers it passes through until it
reaches its destination, or fails to and is discarded. In addition to this, it will tell you how
long each 'hop' from router to router takes.
nslookup:
pathping:
A better version of tracert that gives you statics about packet lost and latency.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL: 4
Network topology refers to how various nodes, devices, and connections on your
network are physically or logically arranged in relation to each other.
Types Of Network Topologies
1) Bus Topology
2) Ring Topology
3) Star Topology
4) Mesh Topology
Bus Topology
In bus topology there is a main cable and all the devices are connected to this main
cable through drop lines.
There is a device called tap that connects the drop line to the main cable.
Since all the data is transmitted over the main cable, there is a limit of drop lines and
the distance a main cable can have.
• Here we have taken 4 switches which are connected through single cable.
• Each of the switches is connected with an end device whose IP addresses
are given.
• To configure the IP addresses of the devices “Click on the device for which
you want to configure the IP address-> Click Config -> FastEthernet0 ->
Provide IP of your choice -> Press Tab for automatically having Subnet
Mask which is: 255.255.255.0 for all the devices available in the topology.
• Provide IP addresses to all the End devices only and then you can send the
data among these devices.
• As we can see in the below image we can send the messages from one
device to another and we can also see the status of the message as
“Successful” here.
• If the messages are not sent due to some reasons it will show “Failed” as the status
of the message.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
1. Ring Topology
• In ring topology each device is connected with the two devices on either
side of it.
• There are two dedicated point to point links a device has with the devices on
the either side of it.
• If a device wants to send data to another device then it sends the data in one
direction, each device in ring topology has a repeater, if the received data is
intended for other device then repeater forwards this data until the intended
device receives it.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
• Easy to install.
• Managing is easier as to add or remove a device from the topology only two links
are required to be changed
• A link failure can fail the entire network as the signal will not travel forward
due to failure.
• Data traffic issues, since all the data is circulating in a ring.
• Here we have took 6 switches and connected them with each other.
• Each of the switches is connected with an end device whose IP addresses
are given.
• To configure the IP addresses of the devices “Click on the device for which
you want to configure the IP address-> Click Config -> FastEthernet0 ->
Provide IP of your choice -> Press Tab for automatically having Subnet
Mask which is: 255.255.255.0 for all the devices available in the topology.
• Provide IP addresses to all the End devices only and then you can send the
data among these devices.
• As we can see in the below image we can send the messages from one
device to another and we can also see the status of the message as
“Successful” here.
• If the messages are not sent due to some reasons it will show “Failed” as the
status of the message.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
2. Star Topology:
• If one device wants to send data to other device, it has to first send the data
to hub and then the hub transmit that data to the designated device.
• Less expensive because each device only need one I/O port and needs to be
connected with hub with one link.
• Easier to install.
• Fewer amounts of cables required because each device needs to be
connected with the hub only.
• Robust, if one link fails, other links will work just fine.
• Easy fault detection because the link can be easily identified.
• If hub goes down everything goes down, none of the devices can work
without hub.
• Hub requires more resources and regular maintenance because it is the
central system of star topology.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
• As we can see in the below image we can send the messages from one
device to another and we can also see the status of the message as
“Successful” here.
• If the messages are not sent due to some reasons it will show “Failed” as the
status of the message.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
3. Mesh Topology
a. In mesh topology each device is connected to every other device on the network
through a dedicated point-to-point link.
b. When we say dedicated it means that the link only carries data for the two
connected devices only.
c. Let’s say we have n devices in the network then each device must be connected
with (n-1) devices of the network.
d. Number of links in a mesh topology of n devices would be n(n-1)/2.
No data traffic issues as there is a dedicated link between two devices which
means the link is only available for those two devices.
Mesh topology is reliable and robust as failure of one link doesn’t affect other
links and the communication between other devices on the network.
Mesh topology is secure because there is a point to point link thus
unauthorized access is not possible.
Fault detection is easy.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Here we have 4 network switches which are connected to each other through
network cables.
Each of the switch is connected all the other switches as well as an end device.
To configure the IP addresses of the devices “Click on the device for which
you want to configure the IP address-> Click Config -> FastEthernet0 ->
Provide IP of your choice -> Press Tab for automatically having Subnet Mask
which is: 255.255.255.0 for all the devices available in the topology.
After configuring the IP addresses we can send messages to other devices
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL – 5
What is VLAN?
Advantages:
1. Take a switch and 4 end devices (PCs), and connect the switch with end
devices using Copper Straight-Through cable. While connecting the cables
you need to select the port through which you want to connect the switch
to the end devices.
As we can see in the above images to connect switch to PC0 we have chosen
‘FastEthernet0/1’ port in the switch and then in PC0 we have selected
‘FastEthernet0’ port. Similarly, connect the entire PC with the switch.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Let us assume that the VLAN 2 is being used by the Sales Department of
the organization and VLAN 3 being used by the HR Department of the
organization.(We are assuming the organization just for better
understanding)
3. .Now, we are going to provide the IP addresses and gateways to the end
devices as shown in the below image.
4. Now, to configure the VLAN click on the switch -> go to CLI and press
“Enter” then write the following commands to configure the VLANs and
provide the names to VLANs.
Commands:
A. en/enable: Logs you into enable mode, which is also known as user
exec mode or privileged mode.
B. confi/configure terminal: Logs you into configuration mode.
C. vlannumber(except 1): Creates a VLAN and enters VLAN
configuration mode for further definitions of specified number of the
VLAN.
D. name vlan_name: Provides the specified name to the VLAN chosen
by the vlan number command. To provide name to VLAN 2 we have
to write name Sales after vlan 2 command. To provide name to
VLAN 3 we have to write name HR after vlan 3 command.
E. exit: Exits from VLAN configuration mode.
5. Now, both the VLANs have been configured. To verify whether the
VLANs have been activated or not we have to write “show vlan”
command. And after pressing Enter we can see both the created VLANs as
shown in the below image.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Here we can see in the above image that both the VLANs (VLAN 2 & VLAN
3) which are “Sales” & “HR” are successfully configured and are active.
6. Now, to make the VLANs work properly we have to assign the devices
among the manually configured host which are “VLAN 2(Sales)” & “VLAN
3(HR)”.
Now we can see in the below image that if we send the message
to the device in the same VLAN then the message is sent
successfully, but if we send the message to the device in the
different VLAN it cannot be sent to successfully.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Now to check whether the message can be sent to the device in another VLAN we
will click the PC from which we have to send the message and then click “Desktop”
and then go to “Command Prompt” and then give command “ping IP address” here
the IP address in the command specifies the destination device’s IP address.
As we can see in the above image if we ping to the device from the another VLAN it
will not give reply as it is in the other VLAN. But if we ping to the device which is in
the same VLAN as the sender is then the message will be successfully sent
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL: 6
Static Routing
Static Routing is the process in which static routes are manually added to the routing table
through the direct configuration.
Where-
ip route is used to create a static route.
destination_network is the network in which you are trying to reach.
subnet_mask is used on the network.
next-hop_address is the ip address of a router’s interface that is a directly connected network.
It will receive the packet from the router and forward it to the remote network.
exit interface is used in place of the next-hop address (if required).
Serial interface (s0/0/0) with an IP address 192.168.10.1, and fast Ethernet interface (f0/0)
with an IP address 10.0.0.1.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PC0
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PC1
PC2
PC3
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Check both Router’s Routing table using the “show ip route” command:
Router0
Router0’s routing table shows the networks that are directly connected to the Router0.
Router1
Router1’s routing table shows the networks that are directly connected to the Router1.
Now, when we ping from PC0 to PC1, we get ping replies in the format, “ip address: bytes
time, and TTL”, because both the PCs (PC0 & PC1) are in the same network.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
When we ping from PC0 to PC2, we get ping replies with a failure message “Destination
host unreachable” because both (PC0 & PC2) are in the different network.
To verify again with the second network address, check ping from PC2 to PC3 and we see the
below screenshot ping replies with ip address, bytes, time, and TTL.”
But, when we ping PC2 from PC0 & PC1, we get ping replies a failure message “Destination
host unreachable” because PCs are on a different network.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Now check Router0’s routing table, we can see some static router entry in the table. To check
routing table use “show iproute”command.
Now to verify static routing ping from PC0 to PC2, ping replies successfully because the
routing table has a static entry of the network 20.0.0.0.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Similarly, check Router1’s routing table, we see some static route entry in the routing table.
To verify static routing, ping from PC2 to PC1, ping replies because now the Router1’s
routing table has a static entry of the network 10.0.0.0.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL: 7
The Barracuda CloudGen Firewall supports three dynamic routing protocols: Open Shortest
Path First (OSPF), Routing Information Protocol (RIP Version 1 and RIP Version 2), and
Border Gateway Protocol (BGP). OSPF and RIP are Interior Gateway Protocols (IGP) and
distribute routing information within an autonomous system, whereas BGP is an Exterior
Gateway Protocol. The routes learned via the dynamic routing protocols are applied to the
kernel routing table. Set the route metric instead of the administrative distance to prioritize
one route over the other.
RIP
The CloudGen Firewall supports RIPv1, RIPv2, and RIPng versions of the RIP
protocol. RIP is a distance-vector protocol. The expression "distance-vector" can be
defined as follows: The vector is the direction to the destination (next hop); the
distance is treated as a metric type. Example: Destination A is a distance of 3 hops
away, and the direction is via router AA. RIP uses hop count as metric. A maximum
of 15 hops are possible; metric 16 means that a network is unreachable. All RIP
routers periodically send routing updates. Every update includes the whole routing
table. The following techniques have been introduced to prevent routing loops:
Split Horizon – When sending updates out a particular interface, the routes
learned from this interface are not included in the update.
Split Horizon with Poison reverse – This method is an extension to Split
Horizon. The router includes learned routes in the update but marks these
routes as unreachable.
Counting to infinity – To recognize unreachable networks on link failures.
Infinity in RIP is defined as 16 hops. Every time a routing update passes a
router, the hop count is increased by 1. When the counter reaches 16, the
network is considered unreachable.
RIPv1 is classful, which means that subnet information cannot be distributed. RIPv2,
on the other hand, is classless. This means the subnet mask is included in the routing
update. The maximum route metric for RIP routes is 255. This means it is not possible
to use RIP routes as fallback routes if other OSPF or BGP route metrics are over 255.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
OSPF
The CloudGen Firewall supports OSPFv2 and OSPFv3 versions of the OSPF
protocol. OSPF is a link state protocol and uses the Dijkstra algorithm to calculate the
shortest path tree. A router's interface is the "link". The "state" of this interface is
summed up by its IP address, subnet mask, interface type, neighbor state, etc. Every
router keeps track of all connected interfaces and states and sends this information
with multicasts to its neighbors. These packets are known as LSAs (Link State
Advertisements). The router builds its link state database with the information
provided by the LSAs. Every time a network change occurs, LSAs containing the new
information are sent, thus triggering every router to update its database. After having
received all LSAs, the router calculates the loop-free topology. LSAs cannot be
filtered within an area because all routers in an area must have the same link state
database. If some information is missing, routing loops can occur.
OSPF is a hierarchical IGP and uses Areas to achieve this. The top-level Area is
known as Backbone Area, and the number of this Area must always be 0 or 0.0.0.0.
All other Areas must be physically connected to this Backbone Area. One very
important aspect of OSPF is that Areas must not be split. (If this cannot be avoided, a
virtual link must be used to expand Area 0 over any other area.) Routers within an
area are known as Area Routers. Routers connected to two or more areas are known
as Area Border Routers (ABR) and routers connected to other autonomous systems
are called Autonomous System Boundary Routers (ASBR). Routing information can
be summarized on ABRs and ASBRs. It is not possible to summarize routing
information within an area.
The metric used by OSPF is cost. Every link has an associated cost value, derived
from the link bandwidth. The metric to a destination is calculated by adding up all
costs. If there are more possible paths to a destination, the route with the lowest cost is
chosen as the best route. To advertise LSAs, the router must live in OSPF
neighborship with other routers. When this neighborship is fully established, the
interfaces begin sending the updates (LSAs). To build an adjacency, hello packets are
continuously exchanged between neighboring routers. This also keeps track of the
existence of the connected OSPF neighbors. To lower the number of updates
exchanged on a broadcast medium (for example, Ethernet), LSAs are only sent to a
so-called Designated Router (DR). This interface advertises the information to all
other routers on the shared medium. Without a DR, an any-to-any neighborship
between all OSPF routers on this segment would be needed. For backup reasons, a
Backup DR (BDR) is elected. Each other router establishes neighborship only with
the DR and BDR.
Areas can be configured as stub areas, where external routes are not advertised by
ABRs to the Area Routers. Instead, a default route is injected to the area. Area 0
cannot be stub.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
BGP
The CloudGen Firewall supports BGP4 and BGP4+ versions of the BGP protocol.
BGP is an Exterior Gateway Protocol (EGP) and is typically used to
connect autonomous systems (AS) of Internet service providers. BGP calculates
routing paths based on several pieces of information, such as AS path, IGP metric,
multi-exit discriminator, communities, local preferences, next hop, weight, and origin.
AS communicate with each other through TCP sessions on port 179. BGP can run
between peers in the same AS as well as peers on the border to other AS. It thus acts
as an IBGP (Interior Border Gateway Protocol) as well as an Exterior Gateway
Protocol (EGP).
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)
PRACTICAL: 8
Header Analysis
TCP Header
UDP Header
Network Layer
Transport Layer
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)