Computer Networks practical
Computer Networks practical
Practical File
Practical No 1
Aim: Using, linux-terminal or Windows-cmd, execute following networking
commands and note the output: ping, traceroute, netstat, arp, ipconfig, getmac,
hostname, NSLookUp, pathping, systemInfo
Theory:
1) ping: ping is a computer network administration software utility used to test the
reachability of a host on an Internet Protocol network. It is available for virtually all
operatingsystemsthathavenetworkingcapability,includingmostembeddednetwork
administration software
2) traceroute: The traceroute command(tracert) is a utility designed for displaying the time
it takes for a packet of information to travel between a host system and the final
destination system. This command returns a list of the hops that the data packets take
along their path along their way to the destination
3) netstat:The netstat provides statistics about all active connections so you that we can find
out which computers or networks a PC is connected to
Some of the netstat commands commonly used are
i) netstat-in command
This netstat function shows the state of all configured interfaces.
iii) netstat-s
The netstat-s command shows statistics for each protocol(while the netstat -p
command shows the statistics for the specified protocol).
iv) netstat-r
Another option relevant to performance is the display of the discovered Path
Maximum Transmission Unit (PMTU).
4) arp: The ARP(Address Resolution Protocol) commands are used to view, display, or
modify the details/information in an ARP table/cache.
Some of the common arp commands are as follows
i) arp-a: This command is used to display the ARP table for a particular IPaddress.
It also shows all the entries of the ARP cache or table.
ii) arp-g: Same as the arp-a command.
iii) arp -d: This command is used to delete an entry from the ARP table for a
particular interface. To delete an entry, write arp –d command along with the
IP address in a command prompt to be deleted.
iv) arp -s: This command is used to add the static entry in the ARP table, which
resolvestheInetAddr(IPaddress)totheEtherAddr(physicaladdress).Toadda static
entry in an ARP table, we write arp –s command along with the IP address and
MAC address of the device in a command prompt.
5) ipconfig: ipconfig (Internet Protocol CONFIGuration) is used to display and manage the
IP address assigned to the machine. In Windows, typing ipconfig without any
parameters displays the computer's currently assigned IP, subnet mask and default
gateway addresses.
6) getmac: getmac is a Windows command used to display the Media Access Control
(MAC) addresses for each network adapter in the computer.
9) Pathping: This command sends multiple echo Request messages to each router between
a source and destination, over a period of time, and then computes results based on the
packets returned from each router. It can be used to find the routers or links having
network problems.
10) SystemInfo: This command is use to display detailed configuration information about a
computer and its operating system, including operating system configuration, security
information, product ID, and hardware properties
Click on the link or scan the QR-code for the video demonstration of the practical :
https://youtu.be/CeMNBxW5LsM
Practical No 2
Aim: Using Packet Tracer, create a basic network of two computers using
appropriate network wire through Static IP address allocation and verify
connectivity
Theory:
We use the following network to verify the connectivity using Cisco packet tracer
Gateway
In order to check the connectivity we send a ping command from PC0 to PC1 as follows
Result:
Click on the link or scan the QR-code for the video demonstration of the
practical:
https://youtu.be/yYYqDgM1XqQ
Practical No 3
Aim: Using Packet Tracer, create a basic network of one server and two computers
using appropriate network wire. Use Dynamic IP address allocation and show
connectivity
Theory:
Result:
Click on the link or scan the QR-code for the video demonstration of the practical:
https://youtu.be/Jnj8c_15AiE
Practical No 4
Aim: Using Packet Tracer, create a basic network of one server and two computers
and two mobile / movable devices using appropriate network wire. And verify the
connectivity
Theory:
Setting up a wireless network provides a lot of advantages and benefits for you and
your small business.
1) It is easier to set up compared to setting up a wired network.
2) It is more convenient to access.
3) It is less complicated to add new users in the network.
4) It gives users more flexibility to stay online even when moving from one
area in the office to another.
5) Guest users can have Internet access by just using a password.
6) Wireless network protection can be set up even if the network is visible to
the public by configuring maximum wireless security.
7) Segmentation of users, such as guests and employees, is possible by creating
Virtual Local Area Networks (VLANs) to protect your network resources
and assets.
There are different purposes of setting up a wireless network using a WAP.
Configure PC0:
Configure PC1:
Configure Smartphone0:
Configure Laptop0:
Similarly the ping message can be checked for all the devices
Result:
Click on the link below or scan the QR-code for the video demonstration
https://youtu.be/zvBKvkY8-nA
Practical No 5
Aim: Using Packet Tracer to create a network with three routers with RIPv1 and
each router associated network will have minimum three PC and show the
connectivity
Theory:
RIP is one of the dynamic routing protocols and the first distance-vector routing
protocol that uses the hop count as a routing metric. A lower hop count is
preferred.
Each router between the source and destination network is counted as one hop. RIP
prevents routing loops by imposing a maximum number of hops on the path
between source and destination.
In RIP, Every 30 seconds, each router broadcasts its entire routing table to its
nearest neighbors.
Pros:
1. The RIP protocol is ideal for small networks since it is simple to learn and
configure.
2. RIP routing is guaranteed to work with nearly all routers.
3. When the network topology changes, RIP does not require an update.
Cons:
1. RIP does not support variable length subnet masks
2. RIP transmits updates every 30 seconds, which cause traffic and consumes
bandwidth.
3. RIP hop counts are restricted to 15, hence any router beyond that distance is
deemed infinity and becomes unreachable.
4. The rate of convergence is slow in RIP compared to other routing protocols.
When a link fails, finding alternate network paths takes a long time.
5. RIP does not support multiple paths on the same route, which may result in
extra routing loops.
Configuring PC0:
Configuring PC1:
Configuring PC2:
Configuring PC3:
Configuring PC4:
Configuring PC5:
Configuring PC6:
Configuring PC7:
Configuring PC8:
Result:
Hence the RIPv1 has been studied and verified through the given network
Practical No 6
Aim: Using Packet Tracer to create a network with three routers with RIPv2 and
each router associated network will have minimum three PC and show the
connectivity
Theory:
Advantages of RIPv2
1) It’s a standardized protocol.
2) It’s VLSM compliant.
3) Provides fast convergence.
4) It sends triggered updates when the network changes.
5) Works with snapshot routing – making it ideal for dial networks.
Disadvantage of RIPv2
1) Max hop count of 15, due to the ‘count-to-infinity’ vulnerability.
2) No concept of neighbors.
3) Exchanges entire table with all neighbors every 30 seconds (except in the
case of a triggered update).
Configuring PC0:
Configuring PC1:
Configuring PC2:
Configuring PC3:
Configuring PC4:
Configuring PC5:
Configuring PC6:
Configuring PC7:
Configuring PC8:
i) Interface G0/0
i) Interface G0/0
i) Interface G0/0
Result:
Hence the RIPv2 has been studied and verified through the given network
Practical No 7
Aim: Using Packet Tracer, create a network with three routers with OSPF and
each router associated network will have minimum three PC and show
Connectivity
Theory:
Open shortest path first (OSPF) is a link-state routing protocol that is used to find
the best path between the source and the destination router using its own shortest
path first (SPF) algorithm. A link-state routing protocol is a protocol that uses the
concept of triggered updates, i.e., if there is a change observed in the learned
routing table then the updates are triggered only, not like the distance-vector
routing protocol where the routing table is exchanged at a period of time.
Open shortest path first (OSPF) is developed by Internet Engineering Task Force
(IETF) as one of the Interior Gateway Protocol (IGP), i.e., the protocol which aims
at moving the packet within a large autonomous system or routing domain.
OSPF advantages –
There are some disadvantages of OSPF like, it requires an extra CPU process to
run the SPF algorithm, requiring more RAM to store adjacency topology, and
being more complex to set up and hard to troubleshoot.
Configuring PC0:
Configuring PC1:
Configuring PC2:
Configuring PC3:
Configuring PC4:
Configuring PC5:
Configuring PC6:
Configuring PC7:
Configuring PC8:
i) Interface G0/0
i) Interface G0/0
i) Interface G0/0
Result:
Hence the OSPF has been studied and verified through the given network
Practical No 8
Aim: Using Packet Tracer, create a network with three routers with BGP and each
router associated network will have minimum three PC and show Connectivity
Theory:
Border Gateway Protocol (BGP) is used to Exchange routing information for the
internet and is the protocol used between ISP which are different Autonoumous
Systems (AS).
The protocol can connect together any internetwork of autonomous system using
an arbitrary topology. The only requirement is that each AS have at least one router
that is able to run BGP and that is router connect to at least one other AS’s BGP
router.
BGP’s main function is to exchange network reach-ability information with other
BGP systems.
Configuring PC0:
Configuring PC1:
Configuring PC2:
Configuring PC3:
Configuring PC4:
Configuring PC5:
Configuring PC6:
Configuring PC7:
Configuring PC8:
i) Interface G0/0
i) Interface G0/0
i) Interface G0/0
Result:
Hence the BGP has been studied and verified through the given network
Practical No 9
Aim: Using Packet Tracer, create a wireless network of multiple PCs using
appropriate access point
Theory:
A Wireless Access Point (WAP) is a networking device that allows connecting the devices with
the wired network. A Wireless Access Point (WAP) is used to create the WLAN (Wireless Local
Area Network), it is commonly used in large offices and buildings which have expanded
businesses.
A wireless AP connects the wired networks to the wireless client. It eases access to the network
for mobile users which increases productivity and reduces the infrastructure cost.
We use the following topology for the present case (5PCs and an Access Point)
2) PC1 :
3) PC2 :
4) PC3 :
5) PC4 :
Host IP address
PC0 10.0.0.1
PC1 10.0.0.2
PC2 10.0.0.3
PC3 10.0.0.4
PC4 10.0.0.5
We verify the connectivity by sending ping message from any PC to any other PC
For the video demonstration of the given practical click on the following link:
https://youtu.be/c91hCh01DCA
Practical No 10
Aim: Using Wire-shark to capture and analyze Packets
Theory:
Wireshark is popular and powerful network protocol analyzer software. It is primarily used for:
1. Network Troubleshooting: Wireshark allows you to capture and inspect network traffic in real-time or from
previously captured packet data. This is invaluable for diagnosing and resolving network problems, such as
connectivity issues, slow network performance, and packet loss. You can identify where packets are being dropped or
delayed and pinpoint the source of network issues.
2. Security Analysis: Wireshark can be used to detect and investigate security breaches and malicious activity on a
network. By examining network traffic, security professionals can identify suspicious or unauthorized activities, such
as intrusion attempts, malware infections, and data exfiltration. It's an essential tool for network security monitoring.
3. Network Protocol Analysis: Wireshark supports a wide range of network protocols, and it allows you to analyze
and decode packets to understand how different devices and applications communicate over the network. This is
helpful for developers, network administrators, and security analysts who need to understand the behavior of network
protocols and applications.
4. Network Performance Optimization: By analyzing network traffic patterns, Wireshark can help optimize network
performance. You can identify bandwidth hogs, inefficient network configurations, and bottlenecks in the network
infrastructure. This information can be used to fine-tune network settings and improve overall performance.
5. Educational and Training Purposes: Wireshark is often used in educational settings and for training purposes to
teach networking concepts and packet analysis techniques. It provides a hands-on way to learn about network
protocols and their interactions.
6. Compliance and Auditing: Some organizations use Wireshark for compliance and auditing purposes. It helps ensure
that network traffic conforms to security policies and regulatory requirements. Organizations can use Wireshark to
monitor and record network activities for auditing and legal purposes.
7. Software Development: Developers use Wireshark to debug network-related issues in their applications. It can help
identify problems with network communication and assist in troubleshooting.
8. Packet Capture and Analysis: Wireshark allows you to capture packets from various network interfaces and save
them for later analysis. You can filter and search through the captured data to extract specific information and gain
insights into network behaviour.
9. Prototyping and Testing: Wireshark can be used to test and validate network configurations and prototypes before
they are deployed in a production environment. It helps ensure that new network setups work as expected and meet
performance criteria.
Wireshark's user-friendly interface, extensive protocol support, and robust filtering capabilities make it a
valuable toolfor anyone involved in networking, security, or network-related development tasks. However,
it's important to note that using Wireshark to capture and analyze network traffic may have legal and privacy
considerations, so it should be used responsibly and in compliance with applicable laws and policies.
Install Wireshark:
In order to demonstrate the packet capture and analysis, we install Wireshark by visiting the website
www.wireshark.org/download
And download the software according to our OS
Analysis:
Before doing the analysis of the packets, we must first know the UDP, TCP and IP packet format
IP packet format:
Using Wire-Shark:
We use Wireshark to do the analysis of the packet, we get the following interface when we start
Wireshark
The above interfaces are shown, as in our case the internet connection is available on the Ethernet
interface, we double click on this interface and get the following
When we double click on the above TCP packet (packet 24) in the above case we get
When we click on Transmission Control Protocol (TCP), we get the information about the TCP
segment and we cananalyse the segment
IP packet analysis:
When we click on Internet Protocol Version 4, we get the information about the IPv4 packet and
we can analyse it
We can easily analyse the packet and get the information about
the IP packetSource IP address: 207.246.93.86
Destination IP address:
192.168.2.247 Header
Length: 20 bytes
Total Length: 1480
Other fields are also seen
For the video demonstration of the practical click on the link below or scan the QR-code
https://youtu.be/pT93ag0zSXQ