SR - No List Pages Sign: Lab Manual List of Experiments

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

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

Aim: Study different network devices in detail

 Repeater

 Repeaters are network devices operating at the physical layer of the


OSI model that amplify or regenerate an incoming signal before
retransmitting it.
 They are incorporated in networks to expand its coverage area.
They are also known as signal boosters.
 Signals that carry information within a network can travel a fixed
distance before attenuation endangers the integrity of the data.
 A repeater receives a signal and, before it becomes too weak or
corrupted, regenerates the original bit pattern.
 The repeater then sends the refreshed signal.
 A repeater can extend the physical length of a LAN.
 The location of a repeater on a link is vital. A repeater must be
placed so that a signal reaches it before any noise changes the
meaning of any of its bits.
 If the corrupted bit travels much farther, however, accumulated
noise can change its meaning completely.
 At that point, the original voltage is not recoverable, and the error
needs to be corrected.
 A repeater placed on the line before the legibility of the signal
becomes lost can still read the signal well enough to determine the
intended voltages and replicate them in their original form.
 Types of Repeater:
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 According to types of signal:


Analog Repeaters and Digital Repeaters
 According to types of network:
Wired Repeaters and Wireless Repeaters
 According to the domain of LAN:
Local Repeaters and Remote Repeaters

 Hub

 A hub is a physical layer networking device which is used to


connect multiple devicesin a network. They are generally used to
connect computers in a LAN.
 A hub has many ports in it. A computer which intends to be
connected to the networkis plugged in to one of these ports.
 When a data frame arrives at a port, it is broadcast to every other
port, withoutconsidering whether it is destined for a particular
destination or not.

 Types of Hub:
 Passive Hub
 Active Hub
 Intelligent Hub
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Bridges

 A bridge operates in the physical layer as well as in the data link


layer. It can regenerate the signal that it receives and as a data link
layer device, it can check the physical addresses of source and
destination contained in the frame.
 The major difference between the bridge and the repeater is that the
bridge and the repeater is that the bridge has a filtering capability.
 That means it can check the destination address of a frame and
decide if the frame should be forwarded or dropped.
 If the frame is forwarded, then the bridge should specify the port
over which it should be forwarded

 Types of Bridges:
 Transparent Bridges
 Source Routing Bridges

 Router

 Routers are networking devices operating at layer 3 or a network


layer of the OSI model.
 They are responsible for receiving, analysing, and forwarding data
packets among the connected computer networks.
 When a data packet arrives, the router inspects the destination
address, consults its routing tables to decide the optimal route and
then transfers the packet along this route.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 A router is a three-layer device that routes packets based on their


logical addresses (host-to-host addressing).
 A router normally connects LANs and WANs in the Internet and
has a routing table that is used for making decisions about the
route.
 The routing tables are normally dynamic and are updated using
routing protocols. Data is grouped into packets, or blocks of data.
 Each packet has a physical device address as well as logical
network address. The network address allows routers to calculate
the optimal path to a workstation or computer.
 The functioning of a router depends largely upon the routing table
stored in it. The routing table stores the available routes for all
destinations.
 The router consults the routing table to determine the optimal route
through which the data packets can be sent
 A routing table typically contains the following entities –
 IP addresses and subnet mask of the nodes in the network
 IP addresses of the routers in the network
 Interface information among the network devices and
channels
 Routing tables are of two types –
 Static Routing Table –
Here, the routes are fed manually and are not refreshed
automatically. It is suitable for small networks containing 2-
3 routers.
 Dynamic Routing Table –
Here, the router communicates with other routers using
routing protocols to determine the available routes. It is
suited for larger networks having large numbers of routers.
 Types of Router:
 Wireless Router
 Broadband Router
 Core Router
 Edge Router
 Brouters
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Gateway

 A gateway is a network node that forms a passage between two


networks operating with different transmission protocols.
 The most common type of gateways, the network gateway operates
at layer 3, i.e. network layer of the OSI (open systems
interconnection) model.
 However, depending upon the functionality, a gateway can operate
at any of the seven layers of OSI model.
 It acts as the entry – exit point for a network since all traffic that
flows across the networks should pass through the gateway.
 Only the internal traffic between the nodes of a LAN does not pass
through the gateway

 Gateway is located at the boundary of a network and manages all


data that inflows or outflows from that network.
 It forms a passage between two different networks operating with
different transmission protocols.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 A gateway operates as a protocol converter, providing


compatibility between the different protocols used in the two
different networks.
 The feature that differentiates a gateway from other network
devices is that it can operate at any layer of the OSI model.
 It also stores information about the routing paths of the
communicating networks.
 When used in enterprise scenarios, a gateway node may be
supplemented as a proxy server or firewall.
 A gateway is generally implemented as a node with multiple NICs
(network interface cards) connected to different networks.
However, it can also be configured using software
 It uses a packet switching technique to transmit data across the
networks.
 Types of Gateway:
 On the basis of data flow-
Unidirectional Gateways and Bidirectional Gateways
 On the basis of functionality-
Network Gateway
Cloud Storage Gateway
Internet-To-orbit Gateway
IoT Gateway
VoiP Trunk Gateway

 Switch

 A switch is a data link layer networking device which connects


devices in a network and uses packet switching to send and receive
data over the network.
 Like a hub, a switch also has many ports, to which computers are
plugged in.
 However, when a data frame arrives at any port of a network
switch, it examines the destination address and sends the frame to
the corresponding device(s).
 Thus, it supports both unicast and multicast communications.
 We can have a two-layer switch or a three-layer switch.
 A three-layer switch is used at the network layer; it is a kind of
router.
 The two-layer switch performs at the physical and data link layers.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 A two-layer switch is a bridge, a bridge with many ports and a


design that allows better (faster) performance.
 A bridge with a few ports can connect a few LANs together. A
bridge with many ports may be able to allocate a unique port to
each station, with each station on its own independent entity.
 This means no competing traffic (no collision, as we saw in
Ethernet). ➔
 A two-layer switch, as a bridge does, makes a filtering decision
based on the MAC Address of the frame it received.
 However, a two-layer switch can be more sophisticated. It can have
a buffer to hold the frames for processing.
 It can have a switching factor that forwards the frames faster. Some
new two-layer switches, called cut-through switches, have been
designed to forward the frame as soon as they check the MAC
addresses in the header of the frame.

 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.

Apparatus (Components):RJ-45 connector, Clamping Tool, Twisted pair Cable.


Procedure: To do these practical following steps should be done:
1. Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be
very careful at this point, as to not nick or cut into the wires, which are inside. Doing
so could alter the characteristics of your cable, or even worse render is useless. Check
the wires, one more time for nicks or cuts. If there are any, just whack the whole end
off, and start over.
2. Spread the wires apart, but be sure to hold onto the base of the jacket with your other
hand. You do not want the wires to become untwisted down inside the jacket.
Category 5 cable must only have 1/2 of an inch of 'untwisted' wire at the end;
otherwise, it will be 'out of spec'. At this point, you obviously have ALOT more than
1/2 of an inch of un-twisted wire.
3. You have 2 end jacks, which must be installed on your cable. If you are using a pre-
made cable, with one of the ends whacked off, you only have one end to install - the
crossed over end. Below are two diagrams, which show how you need to arrange the
cables for each type of cable end. Decide at this point which end you are making and
examine the associated picture below.

 Diagram shows you how to prepare straight through wired connection


Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Diagram shows you how to prepare Cross wired connection

 Ethernet Cable Tips:

 A straight-thru cable has identical ends.


 A crossover cable has different ends.
 A straight-thru is used as a patch cord in Ethernet connections.
 A crossover is used to connect two Ethernet devices without a hub or for
connecting two hubs.
 A crossover has one end with the orange set of wires switched with the green
set.
 Odd numbered pins are always striped; even numbered pins are always solid
coloured.
 Looking at the RJ-45 with the clip facing away from you, Brown is always on
the right, and pin 1 is on the left.
 No more than 1/2" of the Ethernet cable should be untwisted otherwise it will
be susceptible to crosstalk.
 Do not deform, do not bend, do not stretch, do not staple, do not run parallel
with power cables, and do not run Ethernet cables near noise inducing
components.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

PRACTICAL: 3

Aim: Study of basic network command & Network configuration comm.

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

 Configuring the Router commands


 General Commands to configure network
 Privileged Mode commands of a router
 Router Processes & Statistics
 IP Commands
 Other IP Commands e.g. show ip route etc.

 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:

Displays information from Domain Name System (DNS) name servers.


NOTE: If you write the command as above it shows as default your pc's server name
firstly.

 pathping:

A better version of tracert that gives you statics about packet lost and latency.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

PRACTICAL: 4

Aim: Implement different LAN topologies using Network Simulator.

 What are Network Topologies?

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

There are four 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.

 Advantages of bus topology


Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

• Easy installation, each cable needs to be connected with backbone cable.


• Less cable required than Mesh and star topology.

 Disadvantages of bus topology

• Difficultly in fault detection.


• Not scalable as there is a limit of how many nodes you can connect with
backbone cable.

 Bus Topology using Cisco Packet Tracer:

• 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.

• This structure forms a ring thus it is known as ring topology.

• 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)

• Advantages of Ring Topology

• Easy to install.
• Managing is easier as to add or remove a device from the topology only two links
are required to be changed

• Disadvantages of Ring Topology

• 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.

• Ring Topology using Cisco Packet Tracer:

• 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:

• In star topology each device in the network is connected to a central device


called hub.

• Unlike Mesh topology, star topology doesn’t allow direct communication


between devices; a device must have to communicate through hub.

• 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.

• Advantages of Star topology

• 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.

• Disadvantages of Star topology

• 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)

• Star Topology using Cisco Packet Tracer:

• Here we have a single Hub which will be our central node.


• Now all the end devices are connected with the central hub so if any of the
cable fail occurs it does not affect the whole system.
• 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
connected to the same Hub.

• 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.

 Advantages of Mesh topology

 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)

 Disadvantages of Mesh topology

 Amount of wires required to connected each system is tedious and headache.


 Since each device needs to be connected with other devices, number of I/O
ports required must be huge.
 Scalability issues because a device cannot be connected with large number of
devices with a dedicated point to point link.

 Mesh Topology using Cisco Packet Tracer:

 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

Aim: Implement the concept of VLAN using Network Simulator.

 What is VLAN?

 Virtual LAN (VLAN) is a concept in which we can divide the devices


logically on layer 2 (data link layer). Generally, layer 3 devices divide
broadcast domain but broadcast domain can be divided by switches using the
concept of VLAN.
 A broadcast domain is a network segment in which if a device broadcast a
packet, then all the devices in the same broadcast domain will receive it. The
devices in the same broadcast domain will receive the entire broadcast packet
but it is limited to switches only as routers don’t forward out the broadcast
packet. To forward out the packets to different VLAN (from one VLAN to
another) or broadcast domain, inter VLAN routing is needed. Through VLAN,
different small size sub networks are created which are comparatively easy to
handle.

 Advantages:

 Performance –The network traffic is full of broadcast and multicast. VLAN


reduces the need to send such traffic to unnecessary destinations. e.g.-If the
traffic is intended for 2 users but as 10 devices are present in the same
broadcast domain therefore all will receive the traffic i.e., wastage of
bandwidth but if we make VLANs, then the broadcast or multicast packet will
go to the intended users only.
 Formation of virtual groups – As there are different departments in every
organization namely sales, finance etc., VLANs can be very useful in order to
group the devices logically according to their departments.
 Security – In the same network, sensitive data can be broadcast which can be
accessed by the outsider but by creating VLAN, we can control broadcast
domains, set up firewalls, restrict access. Also, VLANs can be used to inform
the network manager of an intrusion. Hence, VLANs greatly enhance network
security.
 Flexibility – VLAN provide flexibility to add, remove the number of host we
want.
 Cost reduction – VLANs can be used to create broadcast domains which
eliminate the need for expensive routers. By using VLAN, the number of
small size broadcast domain can be increased which are easy to handle as
compared to a bigger broadcast domain.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Steps to Implement a Virtual Local Area Network (VLAN):

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)

2. Now, we are going to configure two VLANs in which we are taking 2 PC


for each VLAN. We have separated 2 PCs for each VLAN which are
numbered as VLAN 2 and VLAN 3. We cannot use VLAN 1 because it
default VLAN used by the switch.

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.

Note: To provide IP address and gateways click on the PC you want


provide IP address to and then click Desktop -> IP Configuration.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

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)”.

 To assign devices among the VLANs we have to write series of


commands which are:

A. confi/configure terminal: Logs you into configuration mode.


B. interface: Enters interface configuration mode for the specified
fast ethernet interface
C. switchport access vlan: Sets the VLAN that the interface belongs
to. It means it assigns the previously specified interface using
interface command to work in the specific VLAN only if the
device from the other VLAN tries to communicate with the
specific interface it will not be successful.

 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

Aim: Implement the concept of static routing.

Static Routing

Static Routing is the process in which static routes are manually added to the routing table
through the direct configuration.

Static routing is configured in the global configuration mode using syntax:

Router(config)#ip route [destination_network][subnet_mask][next-hop_address or exitinterface].

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).

Advantages of Static Routing:

There are the following advantages of static routing:


It is easy to implement.
It is the most secure way of the routing.
No overhead
Bandwidth is not used for sending the routing updates.
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

Disadvantages of Static Routing:

There are the following disadvantages of Static Routing:


It is suitable only for small networks.
Administrator must update all routers.
It does not handle multiple paths to a destination.
It cannot be dynamically updated if the topology changes.

Configure Static Routing in the topology:

 Configure IP addresses to the Routers


 Configure the IP addresses to the Router0’s interfaces:

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)

 Configure the IP addresses to the Router1’s interfaces:

Serial interface (s0/0/0)with an IP address 192.168.10.2, and fast Ethernet interface(f0/0)


with an IP address 20.0.0.1.

 Assign the IP addresses to the PCs.

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)

To provide communication between different networks, we need to configure the static


routing using the following syntax:
ip route [destination_network]
[subnet_mask]
[next-hop_address or exitinterface].

On Router0, configure static route:

On Router1, configure static route:

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

Aim: Implement the concept of dynamic routing (RIP, OSPF, BGP).

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

Aim: Packet capture and header analysis using Wireshark (UDP/TCP/IP)

 Packet Capture using Wireshark

 Observe TCP packets


Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Header Analysis

 TCP Header

 UDP Header

 Data Link Layer


Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

 Network Layer

 Transport Layer
Chavda Urvashi 210280116514 CN (Computer Networks –3150710)

You might also like