CN Practical File
CN Practical File
CN Practical File
PRACTICAL FILE
2
Configure and analyze bus, ring, star, mesh, and hybrid network topology with
wired vs wireless networks.
3
Connect the computers in Local Area Network, and Study of basic network
commands and network configuration commands.
4
Study of the following Network Devices in Detail: Repeater, Hub, Switch, Bridge,
Router, Gate way.
5
To evaluate STOP and WAIT protocol and evaluate its performance.
6
To simulate SLIDING WINDOW protocol and evaluate its performance with
variation of window size.
7
Analyze Distance Vector Routing Protocol using Routing Information Protocol to
configure a computer network.
8
Performing an Initial Switch Configuration, and Initial Router Configuration using
packet tracer.
9
Configuring and Troubleshooting a Switched Network using packet tracer.
Experiment : 1
Aim : To Generate an Exponentially distributed random number from a Uniformly distributed
random number.
Theory :
Code :
Output :
Aim : Configure and analyze bus, ring, star, mesh, and hybrid network topology with wired vs
wireless networks.
Theory :
Mesh Topology
In a mesh topology, every device is connected to another device via a particular channel. In
Mesh Topology, the protocols used are AHCP (Ad Hoc Configuration Protocols), DHCP
(Dynamic Host Configuration Protocol), etc.
Suppose, the N number of devices are connected with each other in a mesh topology, the total
number of ports that are required by each device is N-1. In Figure 1, there are 5 devices
connected to each other, hence the total number of ports required by each device is 4. The total
number of ports required=N*(N-1).
Suppose, N number of devices are connected with each other in a mesh topology, then the total
number of dedicated links required to connect them is NC2 i.e. N(N-1)/2.
· Data is reliable because data is transferred among the devices through dedicated
channels or links.
· The cost of cables is high as bulk wiring is required, hence suitable for less number of
devices.
Bus Topology
Alternatively called line topology, bus topology is a network setup where each computer and
network device is connected to a single cable or backbone. Depending on the type of computer
network card, a coaxial cable or an RJ-45 network cable is used to connect them together. The
following sections contain both the advantages and disadvantages of using a bus topology with
your devices.
· It's the easiest network topology for connecting computers or peripherals in a linear
fashion.
· It can be difficult to identify the problems if the whole network goes down.
Star Topology
In star topology, all the devices are connected to a single hub through a cable. This hub is the
central node and all other nodes are connected to the central node. The hub can be passive in
nature i.e., not an intelligent hub such as broadcasting devices, at the same time the hub can be
intelligent known as an active hub. Active hubs have repeaters in them. Coaxial cables or RJ-45
cables are used to connect the computers. In Star Topology, many popular Ethernet LAN
protocols are used as CD (Collision Detection), CSMA (Carrier Sense Multiple Access), etc.
· If N devices are connected to each other in a star topology, then the number of cables
required to connect them is N. So, it is easy to set up.
· Each device requires only 1 port i.e. to connect to the hub, therefore the total number
of ports required is N.
· It is Robust. If one link fails only that link will affect and not other than that.
· If the concentrator (hub) on which the whole topology relies fails, the whole system will
crash down.
· The cost of installation is high. Performance is based on the single concentrator i.e.
hub.
Ring Topology
In this topology, it forms a ring connecting devices with exactly two neighbouring devices.
A number of repeaters are used for Ring topology with a large number of nodes, because if
someone wants to send some data to the last node in the ring topology with 100 nodes, then the
data will have to pass through 99 nodes to reach the 100th node. Hence to prevent data loss
repeaters are used in the network.
The data flows in one direction, i.e.., it is unidirectional, but it can be made bidirectional by
having 2 connections between each Network Node, it is called Dual Ring Topology. In-Ring
Topology, the Token Ring Passing protocol is used by the workstations to transmit the data.
· The failure of a single node in the network can cause the entire network to fail.
· The addition of stations in between or the removal of stations can disturb the whole
topology.
· Less secure.
Hybrid Topology
This topological technology is the combination of all the various types of topologies we have
studied above. It is used when the nodes are free to take any form. It means these can be
individuals such as Ring or Star topology or can be a combination of various types of topologies
seen above.
· The size of the network can be easily expanded by adding new devices.
· The infrastructure cost is very high as a hybrid network requires a lot of cabling and
network devices.
Simulations :
Mesh Topology
Bus Topology
Star Topology
Ring Topology
Hybrid Topology
Result : Bus, ring, star, mesh, hybrid topologies were configured and analyzed.
Experiment : 3
Aim : Connect the computers in Local Area Network, and Study of basic network commands
and network configuration commands.
Simulations :
IP configurations - PC0 - 10.10.10.1 , PC1 - 10.10.10.2 , PC2 - 10.10.10.3
Result : Computers in Local Area Network were connected and study of basic network
command and network configuration commands was carried out.
Experiment : 4
Aim : Study of the following Network Devices in Detail: Repeater, Hub, Switch, Bridge, Router,
Gate way.
Theory :
1. Repeater -
It is a 2-port device that operates in the physical layer. Its job is to regenerate the signal over the
same network before the signal becomes too weak or corrupted so as to extend the length to
which the signal can be transmitted over the same network.
2. Hub -
It is a multiport device which operates in the physical layer of the OSI model. A hub is used to
primarily broadcast data. It cannot filter the data, i.e., it is a non-intelligent device that sends
messages to all the ports.
3. Switch -
It is a multiport device that works in the data link layer. When a data frame arrives at any port of
a network switch, it examines the destination address, performs necessary checks and sends
the frame to the corresponding device. It uses MAC addresses (addresses of medium access
control sublayer) to send data packets to selected destination ports.
4. Bridge -
It is a 2-port device which operates in the data link layer. Bridges are used to connect two
subnetworks. It is a repeater, which adds on the functionality of filtering content by reading the
MAC addresses of the source and destination.
5. Router -
It is a multiport device which operates in the network layer of the OSI model. It connects
different networks together and sends data packets from one network to another. Switches are
also responsible for receiving, analyzing, and forwarding data packets among the connected
computer networks. When a data packet arrives, the router inspects the destination address,
and consults its routing tables to decide the optimal route.
6. Gateway –
Gateway is the connecting point of any network that helps it to connect with different networks.
The gateway monitors and controls all the incoming and outgoing traffic of the network.
Gateways are also known as protocol converters because they help to convert protocols
supported by traffic of the different networks into those that are supported by this network.
Because of that, it makes smooth communication between two different networks.
Simulations :
Repeater
Hub
Switch
Bridge
Router
Gate way
Aim : To evaluate STOP and WAIT protocol and evaluate its performance.
Theory :
Stop and Wait is a reliable transmission flow control protocol. This protocol works only in
Connection Oriented (Point to Point) Transmission. The Source node has a window size of
ONE. After transmission of a frame the transmitting (Source) node waits for an
acknowledgement from the destination node. If the transmitted frame reaches the destination
without error, the destination transmits a positive acknowledgement. If the transmitted frame
reaches the Destination with error, the receiver destination does not transmit an
acknowledgement. If the transmitter receives a positive acknowledgement it transmits the next
frame if any. Else if its acknowledgement receive timer expires, it retransmits the same frame.
1. Start with the window size of 1 from the transmitting (Source) node.
2. After transmission of a frame the transmitting (Source) node waits for a reply
(Acknowledgement) from the receiving (Destination) node.
3. If the transmitted frame reaches the receiver (Destination) without error, the receiver
(Destination) transmits a Positive Acknowledgement.
4. If the transmitted frame reaches the receiver (Destination) with error, the receiver
(Destination) does not transmit acknowledgement.
5. If the transmitter receives a positive acknowledgement it transmits the next frame if any. Else
if the transmission timer expires, it retransmits the same frame again.
6. If the transmitted acknowledgment reaches the Transmitter (Destination) without error, the
Transmitter (Destination) transmits the next frame if any.
7. If the transmitted frame reaches the Transmitter (Destination) with error, the Transmitter
(Destination) transmits the same frame.
8. This concept of the Transmitting (Source) node waiting after transmission for a reply from the
receiver is known as STOP and WAIT.
Code :
Output :
Aim : To simulate SLIDING WINDOW protocol and evaluate its performance with variation of
window size.
Theory :
The problem with this is that there is no limit on the size of the sequence number that can be
required. By placing limits on the number of packets that can be transmitted or received at any
given time, a sliding window protocol allows an unlimited number of packets to be
communicated using fixed-size sequence numbers. The term "window" on the transmitter side
represents the logical boundary of the total number of packets yet to be acknowledged by the
receiver. The receiver informs the transmitter in each acknowledgment packet the current
maximum receiver buffer size (window boundary).
The TCP header uses a 16 bit field to report the received window size to the sender. Therefore,
the largest window that can be used is 216 = 64 kilobytes. In slow-start mode, the transmitter
starts with low packet count and increases the number of packets in each transmission after
receiving acknowledgment packets from the receiver. For every ack packet received, the
window slides by one packet (logically) to transmit one new packet. When the window threshold
is reached, the transmitter sends one packet for one packet received.
In this simulation we have used the Go Back-N sliding window protocol. In Go-Back-N ARQ, N
is the sender's window size. Suppose we say that Go-Back3, which means that the three frames
can be sent at a time before expecting the acknowledgment from the receiver. It uses the
principle of protocol pipelining in which multiple frames can be sent before receiving the
acknowledgment of the first frame. If we have five frames and the concept is Go-Back-3, which
means that the three frames can be sent, i.e., frame no 1, frame no 2, frame no 3 can be sent
before expecting the acknowledgment of frame no 1. In Go-Back-N ARQ, the frames are
numbered sequentially as Go-Back-N ARQ sends the multiple frames at a time that requires the
numbering approach to distinguish the frame from another frame, and these numbers are
known as the sequential numbers. 00:00/07:31. The number of frames that can be sent at a
time totally depends on the size of the sender's window.
So, we can say that 'N' is the number of frames that can be sent at a time before receiving the
acknowledgment from the receiver. If the acknowledgment of a frame is not received within an
agreed-upon time period, then all the frames available in the current window will be
retransmitted.
Code :
Output :
Aim : Analyze Distance Vector Routing Protocol using Routing Information Protocol to configure
a computer network.
Theory :
A distance-vector routing protocol in data networks determines the best route for data packets
based on distance. Distance-vector routing protocols measure the distance by the number of
routers a packet has to pass; one router counts as one hop. Some distance-vector protocols
also take into account network latency and other factors that influence traffic on a given route.
To determine the best route across a network, routers using a distance-vector protocol
exchange information with one another, usually routing tables plus hop counts for destination
networks and possibly other traffic information. Distance-vector routing protocols also require
that a router inform its neighbors of network topology changes periodically.
Topology :
Output :
Aim : Performing an Initial Switch Configuration, and Initial Router Configuration using packet
tracer.
Theory :
Switch: A Switch operates at the data link layer of the OSI model of a network. It uses the MAC
address to forward the data packets. The advantage of using a switch is that it leads to less
network traffic as it transmits using the MAC address and thus leading to less net conjunction.
Router: A Router is a networking device that forwards data packets between computer
networks. It operates in the network layer of the OSI model. It connects different networks
together and sends data packets from one network to another.
Topology :
Output :
Result :
Experiment : 9
Aim : Configuring and Troubleshooting a Switched Network using packet tracer.
Topology :
Switch Configuration :
Result :