Computer Networks PRACTICAL
Computer Networks PRACTICAL
PRACTICAL-1
AIM: Study of different network devices in detail.
HUB
1. Active Hub: They have a power supply for regenerating, and amplifying the signals. Active hubs are
expensive in costs as compared to passive hubs.
2. Passive Hub: Passive hubs are simply used to connect signals from different network cables as they do
not have any computerised element. They simply connect the wires of different devices in the star
topology.
3. Intelligent Hub: Intelligent hubs as the name suggests are smarter than active and passive hubs. The
intelligent hub comprises a special monitoring unit named a Management Information Base (MIB).
Advantages of Hub:-
1. It provides support for different types of Network Media.
2. It can be used by anyone as it is very cheap.
3. It can easily connect many different media types.
4. The use of a hub does not impact on the network performance.
Disadvantages of Hub:-
1. It has no ability to choose the best path of the network.
2. It does not include mechanisms such as collision detection.
3. It does not operate in full-duplex mode and cannot be divided into the Segment.
4. It cannot reduce the network traffic as it has no mechanism.
5. Furthermore, it is not capable of connecting various network architectures like a ring, token, and 1ethernet,
and more.
A bridge in a computer network is a device used to connect multiple LANs together with a larger Local Area
Network (LAN).
The mechanism of network aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the OSI model’s data link layer and is also
known as a layer of two switches.
Here bridge is used to improve network performance.
Disadvantages of Bridge:
Expensive as compared to hubs and repeaters.
Slow in speed.
Poor performance.
As the traffic received is in bulk or is broadcasted traffic, individual filtering of data is not possible.
During the broadcasting of data, the network has high broadcast traffic and broadcast storms can be formed.
REPEATER
Repeaters are network devices operating at 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.
Advantages of Repeaters :-
Repeaters are simple to install and can easily extend the length or the coverage area of
networks.
They are cost effective.
Repeaters don’t require any processing overhead. The only time they need to be investigated is
in case of degradation of performance.
They can connect signals using different types of cables.
Disadvantages of Repeaters
Repeaters cannot connect dissimilar networks.
They cannot differentiate between actual signal and noise.
They cannot reduce network traffic or congestion.
Most networks have limitations upon the number of repeaters that can be deployed.
SWITCH
Switches are networking devices operating at layer 2 or a data link layer of the OSI model. They connect devices
in a network and use packet switching to send, receive or forward data packets or data frames over the network.
A switch has many ports, to which computers are plugged in.
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 supports unicast, multicast as well as broadcast
communications.
Advantages of Switches :-
They increment the accessible data transfer capacity of the organization.
They help in lessening the outstanding burden on individual host PCs.
They increment the presentation of the organization.
Networks that use switches will have fewer casing impacts. This is because of the way that switches make
impact areas for every association.
Switches can be associated straightforwardly with workstations.
It increases the available bandwidth of the network.
Networks that use switches will have fewer frame collisions
More secure
Disadvantages of Switches :-
They are more costly in contrast with network spans.
Network availability issues are hard to be followed through the organization switch.
Broadcast traffic might be problematic.
Need for Proper Planning
The switch’s mechanical component can wear out with time.
ROUTER
Types of Routers :-
1. Wireless Router :- They provide Wi-Fi connection Wi-Fi devices like laptops, smartphones etc. They can
also provide standard Ethernet routing. For indoor connections, the range is 150 feet while its 300 feet for
outdoor connections.
2. Broadband Routers :- They are used to connect to the Internet through telephone and to use voice over
Internet Protocol (VoIP) technology for providing high-speed Internet access.
3. Core Routers :- They can route data packets within a given network, but cannot route the packets between
the networks.
4. Edge Routers :- They are low-capacity routers placed at the periphery of the networks. They use Border
Gateway Protocol (BGP) for connectivity. There are two types of edge routers, subscriber edge routers and
label edge routers.
5. Brouters :- Brouters are specialised routers that can provide the functionalities of bridges as well. Like a
bridge, brouters help to transfer data between networks. And like a router, they route the data within the
devices of a network.
Disadvantages of Router
Speed –In contrast to repeaters and scaffolds, Routers doesn’t simply peruse 2 layers of information’s.
Cost Routers –Are expensive more than some other systems administration gadgets.
Similarity –There is likewise a similarity issues for the Routers particularly for the 5GHz recurrence.
Unwavering quality –Not all the time switches are dependable. Still some cutting edge gadgets utilize 2.4GHz
range which often gets disengaged.
Dynamic directing methods are utilized by the switches for the correspondence purposes.
Routers just does it tasks utilizing routable conventions. A convention that is routable can give IP delivers to
the gadgets so it very well may be recognized across networks.
GATEWAY
A gateway is a network node that forms a passage between two networks operating with different transmission
protocols.
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.
Types of Gateways
Advantages of Gateway
As mentioned earlier, the main benefit of gateway is the connectivity it provides.
Gateways are known to posses improved security since they allow user authentication
Filtering process is another important capability of a gateway.
When the number of Collision and Broadcast domain increases, the network provider can assure that they
will be able to provide better bandwidth.
Besides filtering, a gateway can also convert data packets according to the destination needs.
Disadvantages of Gateway :-
Implementation-Generally gateways on default are installed on the routers itself.
Configuration-Configuration of devices through a gateway is made even more difficult or impossible. There
must be special system administration for this purpose.
Time Delay-Gateway networks always causes time delay since information must be translated. There is no way
can an instant transfer take place.
Troubleshooting-Computers on a network are with different protocols.
COAXIAL CABLE
Coaxial cables, commonly called coax, are copper cables with metal shielding designed to provide
immunity against noise and greater bandwidth.
Coax can transmit signals over larger distances at a higher speed as compared to twisted pair cables.
1. Hardline coaxial cable: Hardline coaxial cable’s center conductor is made of copper, silver and has a
larger diameter when compared to other coaxial cables.
2. Flexible coaxial cable: The flexible coaxial cables are very flexible and the inner conductor is surrounded
by a flexible polymer.
3. Semi-rigid coaxial cable: Semi-rigid coaxial cable uses a solid copper outer sheath with a dielectric of
Polytetrafluoroethylene.
4. Formable coaxial cable: It is an alternative to semi-rigid cable, instead of a rigid copper outer sheath a
flexible metal sheath is utilized.
5. Twinaxial cable: It has two central conductors in the core and a single outer core and dielectric. these
cables are best for low-frequency digital and video transmission.
6. Rigid coaxial cable: Rigid coaxial cable is made up of two copper tubes supported at cable ends and fixed
intervals across the length of the cable using PTFE supports or disk insulators.
A crossover cable connects two devices of the same type. You can wire the ends of a patch cable in any
way as long as both ends are identical.
Compared to straight-through Ethernet cables, the internal wiring of a crossover cable reverses the
transmit and receive signals.
Crimping tool
(2) Ipconfig :
ipconfig (standing for "Internet Protocol configuration") is a console application program of some
computer operating systems that displays all current TCP/IP network configuration values and refreshes Dynamic
Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings.
(3) Arp : The acronym ARP stands for Address Resolution Protocol which is one of the most important
protocols of the Data link layer in the OSI model. It is responsible to find the hardware address of a host from
a known IP address. There are three basic ARP terms.
Arp_a : The arp -a command is used to display the ARP cache on a computer, including both dynamic and
static entries. This command is similar to the arp command without any options, but it also displays the status of
the entries in the cache.
(4) Netstat :
This command displays the connections active on the computer and the ports the computer is listening to. The
command displays the four parameters: proto, local address, foreign address, and state. The proto column shows
the type of connection, and the local address shows the IP address and the port number of the connection local
machine. The proto column also indicates the foreign address, specifies the IP address and port number of the
connection in the host server, and the state shows whether the connection is established or not.
(5) Netstat_a :
The netstat command is used to show the network connection, routing list, and interface status.
(6) Netstat/? :
The netstat command is a Command Prompt command that displays information about how a computer
communicates with other computers or network devices.
(7) Hostname :
The HOSTNAME command displays the hostname of the system. The hostname command is much easier to use
than going into the system settings to search for it.
(10) Systeminfo :
Displays detailed configuration information about a computer and operating system, including
operating system configuration, security information, product ID, and hardware properties.
(11) Pathping :
The PathPing command is a network utility in Windows NT operating systems that combines the
functionality of ping and tracert to help identify network latency and loss. It sends packets to a target
device and measures the response time and packet loss at each hop along the path. This can help diagnose
network-related issues and identify points of failure or delays in the network path.
(14) getmac :
Returns the media access control (MAC) address and list of network protocols associated with each address
for all network cards in each computer, either locally or across a network. This command is particularly
useful either when you want to enter the MAC address into a network
analyzer, or when you need to know what protocols are currently in use on each network adapter on a
computer.
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.
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.
BUS Topology
Bus Topology is a network type in which every computer and network device is connected to a
single cable. It is bi-directional. It is a multi-point connection and a non-robust topology because
if the backbone fails the topology crashes. In Bus Topology, various MAC (Media Access
Control) protocols are followed by LAN ethernet connections like TDMA, Pure Aloha, CDMA,
Slotted Aloha, etc.
RING TOPOLOGY
In a Ring Topology, it forms a ring connecting devices with exactly two neighboring 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.
TREE TOPOLOGY
This topology is the variation of the Star topology. This topology has a hierarchical flow of
data. In Tree Topology, protocols like DHCP and SAC (Standard Automatic Configuration) are
used.
Static Routing:-
Static routing algorithm is a form of routing which occurs when a router uses a manual configuration
routing entry rather than dynamic entry.
In different cases, static routes are manually configured by a network administrator by adding entries into
the routing table. It is not possible in all cases. Static routes are fixed and do not change if the network is
changed or reconfigured.
Static and dynamic routing is not mutually exclusive. They are usually used on a router to maximise routing
efficiency and to provide backups in the event that dynamic routing information fails to be exchanged.
Step-1:-Add a switch,enddevice and router then make a network.
Advantages:-
Static routing keeps a little load on the CPU of the router and produces no traffic to other routers.
It leaves the network administrator with full control over the routing behavior of the network.
It is easy to configure on small networks.
Disadvantages:-
Human error − Static routes are manually configured by the administrator, so there may be a
chance of mistakes in human entry.
Fault tolerance − Static routing is not fault tolerant.
Administrative distance − static routes may prevent routing protocols from working as intended.
A solution is to manually modify the administrative distance.
Administrative overhead − Static route configuration takes a long time if there are many routers.
The reconfiguration can also be slow and inefficient.
PRACTICAL-7
AIM : Implement the concept of dynamic routing (RIP, OSPF, BGP).
STEP 1: - From Connection section select copper straight through cable and make a connection
between PCs to the Switch. Connect the switches with routers using copper straight through cable and
after that connect the two routers with serial-DCE connection.
STEP 2: - Click on PC0, box will appear. Select Desktop then IP configuration and write IP Address,
next field is subnet mask it will appear automatically based on your IP Address. Then click on default
gateway and write it. This information automatically saved when you close that tab. Repeat this
procedure for other end devices also.
STEP 3: - Double click on the router 2 then go to the config tab, in that select FastEthernet0/0 and
enter the IP Address and Subnet Mask and don’t forget to ON it. Do the same for router 3.
STEP 4: Double click on the router 0 then go to the config tab, in that select serial 2/0 and enter the
IP Address and Subnet Mask and don’t forget to ON it. Do the same for router 1.
Router IPv4 Address Subnet mask
0 10.10.0.2 255.0.0.0
1 10.10.0.3 255.0.0.0
STEP 5: - Double click on the router 0 then go to the config tab, in that select “RIP” then enter
Network address, (192.168.1.0) and (10.0.0.0) click on Add. Do the same for router 1.
STEP 6: - Then transmit the message between (PC0 and PC2) and (Laptop0 and Laptop1). It shows
successful, then it is working properly.
In the main Wireshark window, we'll see a list of available network interfaces. These interfaces could be
Ethernet, Wi-Fi, or any other network device connected to our computer. Choose the interface we
want to capture packets from by clicking on it.
Once we've selected the desired network interface, click the "Start" or "Capture" button ( icon). This
initiates the packet capture process.
Wireshark will begin capturing packets in real-time as they traverse the selected network interface.
We'll see packets being displayed in the main Wireshark window.
To stop the packet capture, click the "Stop" button ( icon in the toolbar. This will halt the capture
process.
After stopping the capture, we can analyse the captured packets by scrolling through the list of captured
packets in the main window.
Click on any packet in the list to view detailed information in the lower pane of the Wireshark window.
We can expand each packet to inspect its headers and payload.
To focus on specific packets or types of traffic, we can apply display filters. For example, we can filter
by protocol (e.g., "http" for HTTP traffic) or by source/destination IP addresses.
Wireshark provides a rich set of tools for protocol analysis, including the ability to follow streams,
detect errors, and inspect header fields (e.g., TCP, UDP, IP).
Header Analysis in Wire-Shark:
1. ICMP Header Analysis:
Type: Indicates the type of ICMP message (e.g., Echo Request, Echo Reply, Destination
Unreachable, Time Exceeded).
Code: Provides additional information related to the ICMP message type.
Checksum: A checksum value used to verify the integrity of the ICMP packet.
Identifier and Sequence Number (for Echo Request/Reply): Used to match Echo
Request and Echo Reply messages.
Data (Payload): Contains additional data or information specific to the ICMP message
type. For example, in an Echo Request (ping) packet, this field might include the data you
sent in the ping request.
2. TCP Header Analysis:
● Source Port (2 bytes): The source port is a 16-bit field that identifies the port
number from which the packet originates. It helps the recipient know which
application or service on the sender's side initiated the TCP packet.
● Destination Port (2 bytes): The destination port is also a 16-bit field and
specifies the port number at the receiving end, indicating which application or
service should process the TCP packet.
Sequence Number (4 bytes): The sequence number field is a 32-bit value used
to establish and maintain the correct order of data packets. It's essential for
reliable data transmission and is used in conjunction with the acknowledgment
number.
● Acknowledgment Number (4 bytes): The acknowledgment number is a 32-bit
value that acknowledges the receipt of data up to a certain point. It indicates the
next expected sequence number the sender should receive.
● Data Offset (4 bits): The data offset field, also known as the header length,
specifies the length of the TCP header in 32-bit words. It is used to determine
where the data section (payload) of the packet begins.
● Reserved (3 bits): These bits are reserved for future use and should be set to zero.
● Source Port (2 bytes): The source port is a 16-bit field that indicates the port
number from which the packet is being sent. It helps the recipient know which
application on the sender's side initiated the UDP packet.
● Destination Port (2 bytes): The destination port is also a 16-bit field and specifies
the port number at the receiving end, indicating which application should process
the UDP packet.
● Length (2 bytes): The length field indicates the total length of the UDP packet,
including the header and the data, in bytes.
● Checksum (2 bytes): The checksum field is used to detect errors in the UDP
packet. It helps ensure data integrity during transmission. Wireshark calculates
and displays the checksum value.
● Data (Payload): The payload section contains the actual data being transmitted.
This could be application-specific data, such as DNS queries, DHCP requests, or
other information relevant to the application that's using UDP for communication.
The length of the payload can vary.