Kanan Labfile MT

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

DEPARTMENT OF COMPUTER SCIENCE AND TECHNOLOGY

MANAV RACHNA UNIVERSITY, FARIDABAD


COMPUTER NETWORKS LAB

SUBJECT CODE: CSH204B - P

SUBMITTED BY:
KANAN ARORA
2K21CSUN04049
B.Tech CSE AIML 6 B

SUBMITTED TO:
Dr. Urmila Pilania
INDEX

S.NO. OBJECTIVE DATE SIGN.

1 To study the basic concepts of Computer 11.01.2024


Networks

2 To study different networking commands 18.01.2024

3 To study different topologies 25.01.2024

4 To study different topologies using switches 08.02.2024

5 To study various types of cables 15.02.2024

6 To study how to send data using ethernet cable 22.02.2024

7 To get the MAC Address using Cisco Packet Tracer 29.02.2024


LAB 1
Objective: To study the basic concepts of Computer Networks

Q1. Difference between MAC address and IP address


Parameters MAC Address IP Address

Full-Form The term MAC address is an The term IP Address is an


acronym for Media Access Control acronym for Internet Protocol
Address. Address.

Number of It is a hexadecimal address of six This address is either an


Bytes bytes. eight-byte or a six-byte one.

Protocol Used You can retrieve a device attached You can retrieve a device
for Retrieval to the MAC address using the ARP attached to the IP address
protocol. using the RARP protocol.

Provider The Manufacturer of NIC Cards An ISO (Internet Service


provides a device with its MAC Provider) provides a device’s
address. IP address.

Use The primary use of a MAC address The IP address, on the other
is to ensure the physical address of hand, defines a computer’s
a given device/ computer. logical address.

Operation The MAC address primarily The IP address primarily


operates on the data link layer. operates on the network layer.

Alteration and This address does not alter or This address gets modified
Changes change with the passing time and depending on the change in
change of environment. environment and time.

Third-Party Any third party can find out a The IP address stays hidden
Access device’s MAC address. from display in front of any
third party.

Q2. Difference between private and public IP address


Key Private IP Address Public IP Address
1. A private IP address, also known A public IP address is the public-
as the local IP address, is the IP facing IP address provided to your
address that your network router network by your internet service
allocates to your device. provider (ISP).
2. These addresses have local These addresses have global scope.
scope. Devices within a network
use this to communicate.
3. A private IP address is usually A public IP address is usually used
used to communicate with any to communicate outside your
other device in your house or office network.
that is connected to your private
network.
4. Private IP Addresses differ in a Public IP Addresses differ in varying
uniform manner. ranges.
5. All data transfers using a private IP The Internet Service
address stay within the network Provider (ISP) controls the data
and are unaffected by external transfers using a public IP address.
factors.
6. A Local Network Provider creates The public IP addresses are
the private IP addresses by the controlled by internet service
use of network operating systems. providers (ISP).
7. Private IP Addresses are free of Public IP Address comes with a cost.
cost.
8. Private IP Address can be found Public IP Address needs to be
by entering "ipconfig" on the searched on search engine like
command prompt. google.
9. Private IP addresses use numeric Public IP addresses use a numeric
code that is not unique and can be code that is unique to each device
reused by any device connected to and cannot be repeated.
a private network.
10. Private IP addresses are secure. Public IP addresses are vulnerable
to attack since they have no security.
12. 192.168.11.20 is an example of a 17.5.7.3 is an example of a public IP
private IP address. address.

Classes of IPv4 Address: There are around 4.3 billion IPv4 addresses and
managing all those addresses without any scheme is next to impossible. Let’s
understand it with a simple example. If you have to find a word from a
language dictionary, how long will it take? Usually, you will take less than 5
minutes to find that word. You are able to do this because words in the
dictionary are organized in alphabetical order. If you have to find out the same
word from a dictionary that doesn’t use any sequence or order to organize the
words, it will take an eternity to find the word. If a dictionary with one billion
words without order can be so disastrous, then you can imagine the pain
behind finding an address from 4.3 billion addresses. For easier management
and assignment IP addresses are organized in numeric order and divided into
the following 5 classes:

Address
IP Class Range Maximum number of networks

Class A 1-126 126 (27-2)

Class B 128-191 16384

Class C 192-223 2097152

Class D 224-239 Reserve for multitasking

Class E 240-254 Reserved for Research and development

Q3. Difference between Unicasting, Multicasting and Broadcasting

Feature Unicast Broadcast Multicast

A communication A communication A communication


where a message where a message where a message
Definition is sent from one is sent from one is sent from one
sender to one sender to all sender to a group
receiver. receivers. of receivers

Data is sent to all


Data is sent to a Data is sent to a
Transmission recipients in a
single recipient group of recipients
network

Uses a unique
Uses a special Uses a special
Addressing destination
broadcast address multicast address
address
Not all devices Not all devices
Guaranteed
Delivery may be interested may be interested
delivery
in the data in the data

Generates the Generates the Generates


Network
least amount of most amount of moderate network
Traffic
network traffic network traffic traffic

More secure Less secure Moderately secure


because data is because data is because data is
Security
sent to a specific sent to all devices sent to a specific
recipient in the network group of devices

Email, file DHCP requests, Video streaming,


Examples
transfer ARP requests online gaming

Destination Single receiver All receivers Grop of receivers

Bandwidth
Moderate High Moderate
usage

Latency Low High Moderate

Q4. What is Network Cabling and different types of networking


cables?
Network cabling is the process of connecting devices to an Internet source. For network
cabling to be effective, one can pay attention to the length of the cable, the shielding, the
cable’s data rate, and where it will be installed.

The data rate (or speed) allows network cables to transfer millions of data per second. This
speed depends on the purpose of a cable (if it is installed in a commercial building or at
home). Network cables can come in extensive lengths and thick shieldings that protect the
cable conductors from EMI or external factors. In commercial buildings, installed network
cables are fire-rated and plenum-rated.

Network cables can be divided into four types: coaxial, shielded twisted pair (STP),
unshielded twisted pair (UTP), or fibre optic.

1. Coaxial Cables
Coaxial cables contain a centre conductor and a metal shield insulated by a plastic layer
placed in between. The metal shield in coaxial cables blocks any elements or interferences
from the outside.
In a coaxial cable, the outer layer, known as sheath, protects the cable from physical
damage. Meanwhile, the metal shield protects the cable from any external interference, and
the insulation between the metal shield and the conductor protects the conductor – the core
of the coaxial cable.

Coaxial cable conductors carry electromagnetic signals and can come either in single-core
or multi-core models. While a single-core coaxial cable has only one central metal, multi-
core cables have many metal wires.

Coaxial cables were used in the earlier days of computer networks.

2. Shielded Twisted Pair Cables


These ethernet cables, also known as STP cables, are widely used for business
installations. They were developed for computer networks and are an excellent choice for
areas with high interference. Shielded twisted pair cables are also used to expand any
distance between cables.

STP cables consist of coloured wires twisted around one another, forming pairs. Usually,
shielded twisted pair cables are composed of four colourful pairs of wires wrapped with
metal shields and a singular plastic sheath.

3. Unshielded Twisted Pair Cables


Unshielded twisted pair cables, or UTP cables, are widely used in industrial computers and
telecommunication companies. The conductors present in UTP cables form a circuit that
stops any EMI. Similarly to STP cables, unshielded twisted pairs are colourful wires wrapped
around each other and then wrapped altogether in a plastic sheath.

When compared to STP cables, UTP cables are more affordable.

4. Fibre Optic Cables


Fibre optic cables are networking cables that contain either a glass or a plastic core,
shielded by a cladding, a buffer and a jacket. These layers protect fibre optic cables from
potential damage and from external interference. This networking cable is the perfect choice
for carrying data around long distances and the standard cable for connecting networks in
different locations.

Fibre optic cables can be single-mode fibre or multi-mode fibre. SMF cables support longer
distances, while MMF cables carry more data.

LAB 2

Objective: To study different networking commands


1. ipconfig: The ipconfig command is a Windows command-line utility that displays the IP address,
subnet mask, and default gateway for all network adapters on the computer. It can also be used to
release and renew the IP address for a network adapter.
2.Nslookup: Nslookup is a command-line tool that allows users to query the Domain Name System
(DNS) to obtain the mapping between a domain name and an IP address, or other DNS records. It is
typically used to troubleshoot DNS-related problems, such as when a website is not loading properly.

3. Hostname: The hostname command is used to display the system's DNS name, and to display or
set its hostname or NIS domain name.

4. Ping: The ping command is a command-line utility that tests whether a networked device is
reachable. It's available on nearly every operating system with network connectivity.

Syntax: ping ip or url

5. Tracert: The traceroute command is a network diagnostic tool that can be used to trace the route
that data packets take from one computer to another. It is a useful tool for troubleshooting network
problems, such as slow connections or lost packets.

6. Netstat: The netstat command is a powerful tool that can be used to display information about
network connections, routing tables, and network interfaces. It is a command-line tool that is
available on most operating systems.

Syntax: netstat [options]


7. ARP: The arp command is a command-line tool that displays and manages the Address Resolution
Protocol (ARP) cache. The ARP cache is a table that stores the mapping of IP addresses to their
corresponding MAC addresses.

8. Systeminfo: The systeminfo command is a built-in utility of the Windows operating system that
displays detailed information about the computer's hardware and software configuration when
executed from the Command Prompt.
LAB 3
Objective: To study different types of topologies
1. Bus Topology

In a bus topology, each device is connected to every other device in the network. Simulation
in Packet Tracer would show packets traveling directly between each pair of devices.
When a device sends a message, it sends it directly to the intended recipient based on the IP
address. Packet Tracer simulates this by displaying the path of the packet from the sender to
the receiver.

There is no need for broadcasting in a bus topology since communication is point-to-point.


2. Star Topology

In a star topology, all devices are connected to a central hub or switch. Simulation in Packet
Tracer would show packets being sent from devices to the central hub or switch, which then
forwards the packets to the appropriate destination.

When a device sends a message, it sends it to the central hub or switch, which then
forwards it to the destination device. Packet Tracer simulates this by displaying the path of
the packet from the sender to the central hub or switch, and then to the receiver.

Hubs typically broadcast messages to all connected devices indiscriminately. However,


switches, which are more common in modern networks, forward messages only to the
intended recipient based on MAC addresses.

3. Ring Topology
In a ring topology, devices are connected in a circular manner, where each device is
connected to the next and the last device is connected back to the first. Simulation in Packet
Tracer would show packets traveling in a circular path around the ring.

When a device sends a message, it sends it to the next device in the ring until it reaches the
destination. Packet Tracer simulates this by displaying the path of the packet as it traverses
the ring.

Like star topology, hubs in a ring topology would broadcast messages to all connected
devices, but switches would forward messages selectively based on MAC addresses.
4. Hub Broadcasting and Acknowledgment
In a hub-based network, when a device sends a message, the hub broadcasts it to all
connected devices indiscriminately.

When a device receives a message, it checks whether the message is intended for it based
on its MAC address. If it is not, it ignores the message.

Acknowledgment in a hub-based network is usually implicit. When a device receives a


message, it does not send back a specific acknowledgment message. Instead, the sender
assumes the message was successfully received if it does not receive any error or timeout
indication.

Hubs do not provide the functionality for acknowledgments like switches do. Switches keep
track of the devices connected to each of their ports and can send acknowledgments
directly to the sender based on this information.

LAB 4
Objective: To study different topologies using switches
What is a switch?
A switch is a networking device used in computer networks to connect multiple devices
within a local area network (LAN). It operates at the data link layer of the OSI model and
forwards data packets to their intended destinations based on their MAC addresses.
Switches provide efficient data transmission by creating dedicated communication channels
between devices, enabling simultaneous data transfer between multiple devices without
interference, thereby enhancing network performance and speed.
1. Mesh topology

Mesh Topology is a network architecture where each node is connected to every other node
in the system, forming a web-like structure. This design offers redundancy and robustness,
as data can be rerouted through alternate paths if one connection fails, enhancing reliability
and fault tolerance. However, it requires a significant amount of cabling and configuration,
making it more complex and costly compared to other topologies like star or bus.

2. Star topology
A Star Topology is a network configuration where all nodes (computers or peripheral
devices) are connected to a central hub or switch. Each node communicates directly
with the central hub, which manages the flow of data in the network. This design
offers simplicity in setup and maintenance, as adding or removing nodes doesn't
disrupt the rest of the network. However, the system's reliability heavily depends on
the central hub, which can become a single point of failure.

3. Ring topology

A Ring Topology is a network configuration where each device is connected to exactly two
other devices, forming a circular pathway or "ring." Data travels in one direction around the
ring until it reaches its destination or encounters a break in the ring. This topology offers
simple installation and uniform data transmission, but a single point of failure can disrupt
the entire network. Additionally, adding or removing devices can be complex compared to
other topologies.
4. Bus topology

A Bus Topology is a network layout where all devices are connected to a single
communication line, known as the "bus." Data transmission occurs along this shared line,
with each device receiving the data and determining whether it is the intended recipient.
Devices are typically connected using connectors or taps, and the bus topology is relatively
simple to set up and maintain. However, a single point of failure in the bus line can disrupt
the entire network.

Complete network:
LAB 5

Objective: To study various types of cables


What is an Ethernet cable?

An Ethernet cable is a network cable used for high-speed wired network connections between two
devices. This network cable is made of four-pair cable, which is consists of twisted pair conductors. It
is used for data transmission at both ends of the cable, which is called RJ45 connector.

The Ethernet cables are categorized as Cat 5, Cat 5e, Cat 6, and UTP cable. Cat 5 cable can support a
10/100 Mbps Ethernet network while Cat 5e and Cat 6 cable to support Ethernet network running at
10/100/1000 Mbps.

1.Steps to Create Straight Through Wire: s


Materials and Tools:

1. Cat5e or Cat6 Ethernet cable (length as per your requirement)

2. RJ45 connectors (2 pieces)

3. Crimping tool

4. Wire stripper

5. Ethernet cable tester (optional, but recommended)

Steps:

1. Gather Materials:

● Ensure you have all the necessary materials and tools mentioned above.

2. Strip the Cable:

● Use the wire stripper to carefully strip about 1.5 inches (3-4 cm) of the outer
insulation from each end of the Ethernet cable.

3. Arrange the Wires:

● You will typically find four twisted pairs of wires inside the cable, each with a
different color. The common color-coding scheme is:

● Pair 1: White with blue stripes (or solid blue) and blue stripes

● Pair 2: White with orange stripes (or solid orange) and orange stripes

● Pair 3: White with green stripes (or solid green) and green stripes

● Pair 4: White with brown stripes (or solid brown) and brown stripes

● Arrange the wires in the following order from left to right: white-blue, blue, white-
orange, orange, white-green, green, white-brown, brown.
4. Trim and Align:

● Trim the excess wires to ensure they are all of equal length. Align the wires neatly.

5. Insert Wires into RJ45 Connector:

● Insert the arranged wires into the RJ45 connector, making sure they reach the end
of the connector. Ensure that the order is maintained.

6. Crimp the Connector:

● Use the crimping tool to crimp the RJ45 connector onto the wires. Apply enough
pressure to ensure a secure connection.

7. Repeat for the Other End:

● Repeat the above steps for the other end of the cable, ensuring that you maintain
the same wiring order.

2.Steps to Create Crossed Wire:


Materials and Tools:

1. Cat5e or Cat6 Ethernet cable (length as per your requirement)

2. RJ45 connectors (2 pieces)

3. Crimping tool

4. Wire stripper

5. Ethernet cable tester (optional, but recommended)

Steps:

1. Gather Materials:

● Ensure you have all the necessary materials and tools mentioned above.

2. Strip the Cable:

● Use the wire stripper to carefully strip about 1.5 inches (3-4 cm) of the outer
insulation from each end of the Ethernet cable.

3. Arrange the Wires:

● The wiring order for a crossover cable differs from a straight-through cable. Arrange
the wires as follows:

● End 1:

● Pair 1: White with green stripes (or solid green) and green stripes
● Pair 2: White with orange stripes (or solid orange) and orange
stripes

● Pair 3: White with blue stripes (or solid blue) and blue stripes

● Pair 4: White with brown stripes (or solid brown) and brown stripes

● End 2:

● Pair 1: White with orange stripes (or solid orange) and orange
stripes

● Pair 2: White with green stripes (or solid green) and green stripes

● Pair 3: White with brown stripes (or solid brown) and brown stripes

● Pair 4: White with blue stripes (or solid blue) and blue stripes

● Ensure the wires are aligned correctly and are of equal length.

4. Trim and Align:

● Trim the excess wires to ensure they are all of equal length. Align the wires neatly.

5. Insert Wires into RJ45 Connector:

● Insert the arranged wires into the RJ45 connector, making sure they reach the end
of the connector. Maintain the correct wiring order for each end.

6. Crimp the Connector:

● Use the crimping tool to crimp the RJ45 connector onto the wires, applying enough
pressure for a secure connection.

7. Repeat for the Other End:

● Repeat the above steps for the other end of the cable, ensuring that you maintain
the same wiring order.

LAB 6
Objective: To study how to send data using ethernet cable
1. Connect the Computers:
Connect the two computers using an Ethernet cable. Ensure both computers have Ethernet
ports or adapters.
Configure Network Settings:
On Laptop 1:
1. Go to Control Panel > Network and Sharing Centre.
2. Click on "Change adapter settings" in the left sidebar.
3. Right-click on the Ethernet adapter and select "Properties."

4. Select "Internet Protocol Version 4 (TCP/IPv4)" and click "Properties."

5. Choose the option to set the IP address manually.


6. Enter the following details:
● IP Address: 192.168.1.1

● Subnet Mask: 255.255.255.0

● Default Gateway: 192.168.0.2


On Laptop 2:
1. Repeat the same steps as above.
2. Set the IP address to:
● IP Address: 192.168.1.2

● Subnet Mask: 255.255.255.0

● Default Gateway: 192.168.0.1

2. Enable Network Discovery and File Sharing:


On both laptops:
1. Go to Control Panel > Network and Sharing Centre.
2. Click on "Change advanced sharing settings" in the left sidebar.
3. Turn on "Network discovery" and "File and printer sharing" under the
"Private" network profile.
4. Turn off "Password protected sharing" to share files without credentials.

3. Share Files:
1. Open File Explorer on both laptops.
2. Navigate to the "Network" section in the sidebar.
3. You should see the other computer listed there. Click on it to access shared
files and folders.
4. You can now freely share files between the two computers without requiring
credentials.

LAB 7

Objective: To get the MAC address using Cisco Packet Tracer


1. Create a topology (STAR)

2. Give IP Addresses to devices


3. Click on Switch Icon > CLI > press enter > Type "en" to enable the Switch > press enter

4. Click on Device Icon > Desktop > Command Prompt > command "ping <IP address>" q
5. Click on Switch Icon > CLI > press enter > Type "show mac-address-table"

You might also like