Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views42 pages

CN Lab File

The document outlines a Computer Network Lab course for B.Tech CSE students, detailing various experiments related to networking concepts, including the OSI model, network topologies, transmission media, and IEEE 802 standards. Each experiment includes theoretical explanations, practical implementations using Cisco Packet Tracer, and comparisons between different networking technologies. The lab work aims to provide hands-on experience and understanding of essential networking principles and practices.

Uploaded by

bino52104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views42 pages

CN Lab File

The document outlines a Computer Network Lab course for B.Tech CSE students, detailing various experiments related to networking concepts, including the OSI model, network topologies, transmission media, and IEEE 802 standards. Each experiment includes theoretical explanations, practical implementations using Cisco Packet Tracer, and comparisons between different networking technologies. The lab work aims to provide hands-on experience and understanding of essential networking principles and practices.

Uploaded by

bino52104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

COMPUTER NETWORK LAB

B.Tech CSE AI - 605 , 6th Semester

Submitted By: Submitted To:


Ayush Kumar Jha Dr. Siddhartha SB/Aqeel Khalique
2022-350-009 [Dept. of Computer Science
BTCSEAI-605 and Engineering]

(Signature)

Submitted in partial fulfillment of the requirement of B.Tech CSE (AI)


Program at Dept. of Computer Science and Engineering
Jamia Hamdard, New Delhi-110062
2025
INDEX
S.No Experiment Name Remarks Signature

1 Mention Layered architecture of OSI model.

2 Mention different topologies of networking.


Also use cisco packet traces to explain each
topology.

3 Mention different types of transmission


media with examples.

4 Mention ieee802 (till 20) standards.

5 Explain TCP/IP model. Also give


comparison of TCP/IP with the OSI model.

6 Using CISCO packet tracer, design and


configure the network for our computer lab
and departmental internet connectivity.

7 Using CISCO packet tracer, design the


network for university. Take suitable
assumptions wherever required.

8 Implement CRC using any programming


language. Input Data and polynomial
generator. Output CRC bits, data with CRC
bits and verify at receiver end.

9 Differentiate between subnet and supernet


with an example diagram drawn using
CISCO packet tracer.

10 Differentiate and explain classless addressing


and classful addressing with a numerical
example. Explain classful addressing with a
numerical example.

11 Differentiate IPv4 and IPv6 with payload


format.

12 Explore Wireshark, give brief characteristics


(features, limitations etc.) and share working
of packet sniffing.

13 Analyze and monitor network traffic of the


computer system using the WireShark or
packet tracer.
Experiment 1
Aim :- Mention Layered architecture of OSI model.

Theory :- The OSI MODEL

The Open Systems Interconnection OSI model is a conceptual framework


developed by the International Organization for Standardization ISO to
standardize network communication processes across different systems. It is
structured into seven distinct layers, where each layer has specific
responsibilities and interacts with the layers above and below it. The OSI model
ensures that hardware and software from different vendors can communicate
effectively without compatibility issues. Each layer performs dedicated
functions such as error handling, addressing, data flow control, and network
routing, thus facilitating seamless data transmission.

Why is the OSI Model Important?

-It provides a universal standard


for networking that helps in
designing and troubleshooting
network architectures.
-It promotes interoper- ability
between different network
hardware and software.
-It aids in understanding and
developing new networking
technologies by providing a
systematic approach.
Devices within a network :-
Networking devices facilitate
communication between
computers and other digital devices. Two fundamental devices in a network are
:-
Router :- A router is a networking device that directs data packets between
different networks. It determines the best route for data to travel from source to
destination using IP addresses. Routers operate at the Network Layer Layer 3
of the OSI model and facilitate internet connectivity by forwarding packets
based on routing tables and protocols like OSPF, BGP, and RIP.

Switch :- A switch is a network device that connects multiple devices within a


Local Area Network LAN. Unlike hubs, switches operate at the Data Link
Layer Layer 2 and make intelligent decisions based on MAC addresses to
efficiently forward data to the intended recipient.

Layers of the OSI model

Layer Layer Name Function


No.

7 Application Provides user interface and application services,


enabling network access for end-users.

6 Presentation Handles data encryption, compression, and format


conversion to ensure compatibility.

5 Session Manages communication sessions between


applications by establishing, maintaining, and
terminating connections.

4 Transport Ensures reliable data transfer, manages flow control,


and handles error correction.

3 Network Performs logical addressing, routing, and path


determination for data transfer across networks.
2 Data Link Manages MAC addressing, error detection, and
framing for data transmission over a physical
medium.

1 Physical Defines hardware specifications, transmission


media, and physical connections for data
communication.

Features of Each Layer :-

Application Layer Layer 7

●​ Directly interacts with end-users and provides networking services such


as web browsing and email.
●​ Supports application protocols such as HTTP, FTP, and SMTP.

Presentation Layer Layer 6


●​ Converts data into a format that can be interpreted by the application
layer (e.g., encoding, encryption, and compression).
●​ Ensures secure communication through encryption mechanisms like
SSL/TLS.

Session Layer Layer 5


●​ Establishes, maintains, and terminates communication sessions between
applications.
●​ Synchronizes data exchange using checkpoints to prevent data loss.

Transport Layer Layer 4


●​ Ensures reliable or unreliable data transmission using protocols like TCP
(reliable) and UDP (unreliable).
●​ Implements error detection and correction, ensuring end-to-end data
integrity.
Network Layer Layer 3

●​ Responsible for logical addressing using IP addresses for data packet


forwarding.
●​ Determines the best path for data transmission through routing
algorithms.

Data Link Layer Layer 2

●​ Handles error detection and correction at the frame level.


●​ Uses MAC Media Access Control) addressing to direct data to the correct
device within a local network.

Physical Layer Layer 1


●​ Defines physical components such as cables, connectors, and
transmission signals.
●​ Converts binary data into electrical, optical, or radio signals for
transmission.

Devices used within each layer of the OSI model


OSI Layer Devices Used

Application End-user devices Computers,


Smartphones)
Presentation Gateways, Firewalls

Session Firewalls, Gateways

Transport Gateways

Network Routers, Layer 3 Switches

Data Link Switches, Bridges

Physical Hubs, Repeaters, Cables


Experiment 2
Aim :- Mention different topologies of networking. Also use cisco packet
traces to explain each topology.

Theory :- NETWORK TOPOLOGIES

A network topology defines the arrangement of cables, devices, and connections in a


computer network. It determines how the data flows between connected devices,
impacting network efficiency, scalability, and fault tolerance.
There are two types of network topologies :-
●​ Physical topology → The actual layout of the devices and the cables within the
network.
●​ Logical topology → The way the data flows within the network.

Types of Network Topologies :-

Bus Topology :-

All devices (nodes) are connected to a single central cable known as the backbone or bus.
The signal sent by a device travels in both directions along the bus and is received by all
devices, but only the intended recipient processes it.
Structure

●​ Single cable runs across the network


●​ All devices are connected via drop lines and taps
●​ Makes use of terminators on both ends of the bus to prevent signal reflection
Working

●​ When a device sends data, it travels along the central cable


●​ Other devices check if the data is addressed to them
●​ Collisions can occur if multiple devices send data at once
Advantages

●​ Cost effective
●​ Easy to install
●​ Suitable for small networks
Disadvantages

●​ Single Point of failure → if the bus fails, the entire network goes offline
●​ Network congestion → Increased traffic leads to collisions and slow performance
●​ Difficult Troubleshooting → Finding the exact failure within the network can be
difficult
●​ Limited Scalability → Adding more devices within the network weakens the signal
and increases load

Mesh Topology :-
In a mesh topology, each device is directly connected to every other device in the
network. This allows multiple paths for data to travel, ensuring reliability and redundancy.

Types of Mesh Topology


1.​ Full Mesh: Every node connects to every other node.
2.​ Partial Mesh: Only some nodes are fully interconnected, reducing cost and
complexity.

Structure
●​ Each device (node) has dedicated point-to-point connections to others.
●​ More connections results in more redundancy but also higher cost.

Working
●​ Data takes the shortest available path between source and destination.
●​ If a connection fails, alternate paths ensure uninterrupted communication.

Advantages

●​ Highly reliable – Multiple connections prevent network failure.


●​ Efficient data routing – Multiple paths optimize data flow.
●​ High security – Direct communication reduces chances of data interception.

Disadvantages

●​ Very expensive – Requires extensive cabling and hardware.


●​ Complex setup – Managing multiple connections is challenging.
●​ Difficult to scale – Adding new devices increases complexity exponentially.

Star Topology :-

In a star topology, all devices are connected to a central hub or switch that manages data
transmission. This is the most commonly used network topology today.
Structure

●​ A hub or switch is at the center.


●​ Devices PCs, printers, etc.) connect individually to the hub.
●​ Data passes through the hub before reaching the destination.

Working

●​ When a device sends data, it goes to the hub/switch.


●​ The hub broadcasts data to all nodes, while a switch sends it only to the intended
recipient.
●​ If a device fails, the network remains operational.

Advantages

●​ Easy to manage & troubleshoot – Faulty devices donʼt affect others.


●​ Scalable – New devices can be added easily.
●​ Fast communication

Disadvantages

●​ Central point of failure – If the hub/switch fails, the entire network stops.
●​ Expensive – Requires a central device and more cabling.
●​ Limited distance – Performance drops as more devices are added.

Example Usage

●​ Office LANs & Wi-Fi networks – Most modern networks use a star topology.
●​ Data centers & corporate networks – Switch-based communication for efficiency

Ring Topology :-
In a ring topology, each device is connected to exactly two other devices, forming a
closed loop. Data travels in a circular fashion, either unidirectional or bidirectional.
Structure
●​ Devices form a closed ring.
●​ Data travels in one direction (unidirectional) or both directions (bidirectional/dual
ring).
●​ Uses Token Passing to control data flow.

Working
●​ A token (a small data packet) circulates in the ring.
●​ A device can only send data when it holds the token, preventing collisions.
●​ After sending data, the token moves to the next device.

Advantages
●​ No collisions – Token passing ensures smooth communication.
●​ Consistent performance – All devices get equal access to the network.
●​ Less cabling than mesh – Uses a single continuous cable.

Disadvantages
●​ Single point of failure – If one device or connection fails, the entire network may
stop.
●​ Difficult to troubleshoot – Finding a fault in a closed ring is complex.
●​ Adding/removing devices disrupts the entire network.

Hybrid Topology :-
A Hybrid Topology is a combination of two or more different network
topologies. It is designed to take advantage of the strengths of multiple
topologies while minimizing their weaknesses. This type of topology is
commonly found in large enterprises, data centers, and complex networks
where a single topology is insufficient to meet all requirements.

Characteristics of Hybrid Topology


1.​ Combination of Topologies – It integrates multiple topologies such as star, ring,
bus, and mesh.
2.​ Scalability – The network can be easily expanded by adding new nodes without
disturbing the entire system.
3.​ Flexibility – The structure can be designed based on network needs, such as
performance, cost, and reliability.
4.​ Fault Tolerance – Since multiple topologies are used, a failure in one part of the
network does not necessarily bring down the entire system.
5.​ Cost Considerations – Hybrid networks can be expensive due to the additional
hardware and configuration complexity.

Examples of Hybrid Topology

●​ Star-Bus Hybrid: Multiple star networks connected via a central bus.


●​ Star-Ring Hybrid: A combination of star and ring topologies where multiple star
networks are connected in a ring structure.
●​ Mesh-Star Hybrid: A network where some devices are fully meshed while others
are connected in a star pattern.
Advantages of Hybrid Topology

●​ Highly Reliable – If one topology fails, the rest of the network can continue
functioning.
●​ Optimized Performance – Can be customized to meet specific needs, optimizing
speed and efficiency.
●​ Scalability – Supports network expansion without affecting existing infrastructure.

Disadvantages of Hybrid Topology


●​ Complex Configuration – Managing multiple topologies requires careful design and
administration.
●​ Higher Cost – Additional networking devices and cabling increase the cost.

Use Cases

●​ Large corporate networks


●​ University campuses
●​ Data centers

Cisco Packet Tracer

1) Implementation of Bus Topology


2) Implementation of Mesh Topology

3) Implementation of Ring Topology

4) Implementation of Hybrid Topology


5) Implementation of Star Topology
Experiment 3
Aim :- Mention different types of transmission media with examples.

Theory :- Types of Transmission Media

Transmission media in computer networks can be classified into two main


categories :-

1. Guided Transmission Media (Wired) :- Guided media use physical


cables to transmit data signals. The main types include:

a) Twisted Pair Cable


●​ Composed of two insulated copper wires twisted together to reduce
electromagnetic interference
●​ Example: Used in telephone networks and Ethernet LANs Cat5, Cat6
cables).

b) Coaxial Cable
●​ Consists of a central conductor, insulating layer, metallic shield, and outer
insulation.
●​ Example: Used in cable TV networks and older Ethernet networks
10BASE2, 10BASE5

c) Optical Fiber Cable


●​ Uses light signals to transmit data, offering high speed and minimal
signal loss.
●​ Example: Used in high-speed internet FTTH - Fiber to the Home),
long-distance communication, and submarine cables.

2. Unguided Transmission Media (Wireless) :- Unguided media


transmits data through air or space without physical cables. The main
types include:

a) Radio Waves
● ​ Used for long-range communication with omnidirectional (in all
directions) propagation.
● ​ Example: AM/FM radio, mobile phones, Wi-Fi 2.4 GHz and 5 GHz
bands)

b) Microwaves
● ​ Require line-of-sight transmission and operate at higher frequencies
than radio waves
● ​ Example: Satellite communication, cellular networks, and
point-to-point communication links.

c) Infrared
●​ Short-range communication that requires direct line-of-sight.
●​ Example: TV remote controls, wireless keyboards, and short-range data
transmission
Comparison Table

Type Speed Distance Example Applications


Coverage
Twisted Pair Moderate Short (up to 100m) Ethernet, telephone lines

Coaxial High Medium (up to Cable TV, LAN networks


Cable 500m)

Optical Fiber Very Long (up to Internet backbone, fiber-optic


High 100km) communication

Radio Waves Moderate Long (up to several Wi-Fi, mobile networks


km)

Microwaves High Medium to long Satellite, cellular


(1100km) communication

Infrared Low Very short (few Remote controls, short-range


meters) devices
Experiment 4
Aim :- Mention ieee802 (till 20) standards.

Theory :- IEEE 802 Standards


The IEEE 802 standards are a set of networking standards developed by the Institute
of Electrical and Electronics Engineers IEEE, specifically by the IEEE 802
LAN/MAN Standards Committee. These standards are essential for local area
networks LANs, metropolitan area networks MANs, and other types of network
communication.

The IEEE 802 standards and their applications have been mentioned below :-
IEEE Name Use Application
Standard

802.1 Internetworking Defines network Used in LANs, VLANs,


& Bridging management, bridging, and network security
and VLANs

802.2 Logical Link Provides error control Used in Ethernet,


Control LLC and flow control for Token
upper layers Ring, and FDDI

802.3 Ethernet Defines wired LAN Most common LAN


standards using standard Fast Ethernet,
CSMA/CD Gigabit Ethernet)

802.4 Token Bus Used in industrial Manufacturing


Obsolete) networks with automation networks
token-passing method (now rarely used)
802.5 Token Ring Uses token-passing for IBMʼs Token Ring
Obsolete) LAN communication networks (replaced by
Ethernet)

802.6 Metropolitan Standard for MANs for cable


Area Network large-scale networks networks and enterprise
across cities connectivity
MAN

802.7 Broadband Provided guidelines for Used in cable networks


Technical broadband networks (no longer in active use)
Advisory

802.8 Fiber-Optic Defined optical fiber Used in fiber-based


Technical LAN/MAN Ethernet (now covered
Advisory technologies in
802.3
802.9 Integrated Combined voice and Used in enterprise
Services LAN data transmission telephony and LANs
(obsolete)

802.10 Interoperable Defined security Used for secure VLANs


LAN Security mechanisms for LANs (now replaced by other
SILS standards)

802.11 Wireless LAN Wireless networking Wi-Fi networks


Wi-Fi for 802.11a/b/g/n/ac/ax)
LANs
802.12 Demand Priority Alternative to Ethernet Used in enterprise
100BaseVG for high-speed LANs networks (now obsolete)

802.13 Reserved No standard defined Not applicable


802.14 Cable Modem Defined data transfer Used in broadband
over cable TV internet (merged into
networks
DOCSIS

802.15 Wireless Short-range wireless Bluetooth, Zigbee, IoT,


Personal Area communication wireless peripherals
Networks
WPAN

802.16 Broadband High-speed wireless Used in WiMAX


Wireless access for MANs broadband (now mostly
replaced by LTE
WiMAX

802.17 Resilient Packet High-speed fiber-optic Used in MANs and fiber


Ring RPR ring-based networks backbone networks

802.18 Radio Provides regulatory Used for spectrum


Regulatory guidelines for wireless management in wireless
standards
Technical networks
Advisory

802.19 Wireless Ensures Used in multi-device


Coexistence interference-free wireless environments

operation of wireless
devices

802.20 Mobile High-speed mobile Used in mobile data


Broadband internet for vehicles networks (competed
Wireless Access with
MBWA LTE
Experiment 5
Aim :- Explain TCP/IP model. Also give comparison of TCP/IP with the
OSI model.

Theory :- TCP/IP MODEL


The TCP/IP model Transmission Control Protocol/Internet Protocol) is a
framework for network communication that serves as the foundation of the
modern internet. It is simpler than the OSI model and consists of four layers,
each responsible for specific network functions.

Layers of the TCP/IP Model

Layer Function Protocols

Application Handles high-level protocols for HTTP, FTP, SMTP


Layer communication between
applications

Transport Ensures reliable or unreliable data TCP (reliable,


Layer transmission between hosts connection-oriented), UDP
(unreliable, connectionless)

Internet Layer Responsible for addressing, routing, IP IPv4, IPv6, ICMP


and packet forwarding

Network Deals with physical transmission of Ethernet, Wi-Fi, PPP


Access Layer data over network hardware

Comparison of the TCP/IP Model and OSI Model


Feature TCP/IP Model OSI Model

Number of 4 7
Layers

Purpose Designed for internet communication Generalized network model for


diverse protocols

Structure Combines multiple OSI layers into More modular with specific
broader categories functions per layer

Application Includes application,presentation, and Has separate Application,


Layer session layers of OSI Presentation, and Session layers

Usage Used in real-world internet networking Mostly theoretical, used as a reference


model

Since the OSI model has 7 layers and the TCP/IP model contains 4 layers that
are achieving similar results, there is merging of 3 layers from OSI into the 4 of
TCP/IP. This can be visualised in the table given below :-

Comparison of layers between OSI and TCP/IP models

OSI Model Layer TCP/IP Model Layer


Application Application

Presentation Merged into Application Layer

Session Merged into Application Layer

Transport Transport

Network Internet

Data Link Network Access

Physical Network Access


Experiment 6
Aim :- Using CISCO packet tracer, design and configure the network for
our computer lab and departmental internet connectivity.

Theory :- CISCO PACKET TRACER


A computer network is a system of interconnected devices that communicate with each other
to share resources such as data, applications, and hardware. In this practical, we utilize Cisco
Packet Tracer, a network simulation tool, to model and simulate the design and configuration
of the network. The process typically involves configuring devices such as routers, switches,
and computers, ensuring they are interconnected and can communicate. A key concept in
network design is the division of the network into various segments, such as the local area
network (LAN) for the computer lab, which is connected to the internet via a router. Proper
configuration of IP addresses, subnetting, routing protocols, and firewall rules is essential to
ensure efficient communication, secure data transfer, and internet connectivity. A
well-structured network design helps optimize performance, enhance security, and improve
overall usability.

Example:

1.​ Network Design:


○​ Computer Lab: 10 computers connected through a switch.
○​ Router Configuration: The router connects the computer lab to the internet,
assigning dynamic IP addresses to each computer via DHCP.
○​ Department Network: A second network is set up for department offices,
with access to both local resources and the internet.​

2.​ Configuration Steps:


○​ Configure the switch to connect the computers using Ethernet cables.
○​ Set up the router with an IP address and configure NAT (Network Address
Translation) to allow internal devices to access the internet.
○​ Enable DHCP on the router to assign IP addresses automatically to devices in
the computer lab.
○​ Set up firewall rules to secure the network.​

Limitations:
1.​ Simulation Environment: While Cisco Packet Tracer is a powerful tool for network
simulation, it cannot replicate the full functionality and performance of real-world
networks.
2.​ Limited Protocols: Some advanced network protocols and configurations may not be
supported in Packet Tracer.
3.​ Lack of Physical Hardware Testing: The actual physical network devices may
behave differently from the simulated devices, and real-world issues like network
interference, hardware malfunctions, and cabling issues are not represented.
4.​ Security Concerns: Although basic firewall configurations can be simulated,
advanced security setups may not be fully replicated in the Packet Tracer
environment.​

Examples:

1.​ Computer Lab Network:


○​ 10 computers connected to a single switch.
○​ A router provides internet access to the lab.
○​ The router is configured to assign IP addresses to each computer
through DHCP.​

2.​ Department Network:


○​ The department has 5 computers connected to a separate switch.
○​ The router is configured with multiple subnets to segment the
network and provide internet access to the department computers.
Experiment 7
Aim :- Using CISCO packet tracer, design the network for university. Take
suitable assumptions wherever required.

Theory :-
A university network typically consists of multiple departments, computer labs,
administrative offices, and various service areas connected to the internet. The network
should be designed with scalability and flexibility in mind to accommodate future growth.
Cisco Packet Tracer is a network simulation tool that allows for the creation and
configuration of networks using virtual routers, switches, and other devices. The design
process involves segmenting the network into logical components such as the
administration network, academic departments, research labs, and computer labs, all of
which must have efficient internet access. The configuration also includes implementing
routing protocols, VLANs (Virtual Local Area Networks) for network segmentation, and
security measures such as firewalls and access control lists (ACLs).
Proper planning of IP addressing, VLANs, and routing ensures that each department and
segment can communicate with others while maintaining network security. This
simulation also helps in understanding the interactions between different network devices
and protocols, improving overall network performance and efficiency.

Example:

1.​ University Network Design:


○​ Departments: Four academic departments (Computer Science, Electronics,
Mechanical, and Civil Engineering) each with its own network.
○​ Administrative Offices: A dedicated network for the administration
department, isolated from the academic departments for security.
○​ Computer Labs: Two computer labs for student access, each connected to the
academic department they serve.
○​ Internet Connectivity: The university is connected to the internet via a single
gateway router.
○​ VLANs and Routing: Different VLANs will be used to separate traffic
between departments, with inter-VLAN routing for communication between
them.​

2.​ Configuration Steps:


○​ Create and configure VLANs for each department (e.g., VLAN 10 for
Computer Science, VLAN 20 for Electronics, etc.).
○​ Set up a Layer 3 switch or router to enable inter-VLAN routing.
○​ Configure DHCP on the router to dynamically assign IP addresses within each
VLAN.
○​ Assign IP addresses for the gateway router and configure NAT for internet
access.
○​ Implement basic security measures such as ACLs to control traffic between
different VLANs.
○​ Connect end devices (computers, printers) to the respective VLANs via
switches.
○​ Use a firewall for internet access control and internal security.​

Limitations:
1.​ Simulation Limits: While Cisco Packet Tracer simulates network designs, it
cannot fully replicate the performance and complexity of real-world networks,
especially when dealing with large-scale deployments.
2.​ Limited Hardware Support: Some advanced network hardware and
configurations may not be fully supported in Cisco Packet Tracer.
3.​ Real-World Discrepancies: The behavior of simulated devices may differ
from actual physical hardware, especially in complex network scenarios.
4.​ Security Limitations: Advanced security mechanisms, such as intrusion
detection systems (IDS) and encryption protocols, are not fully implemented in
Packet Tracer.
Examples:
1.​ University Network Segmentation:
○​ VLAN 10 for Computer Science department with 50 computers and printers.
○​ VLAN 20 for Electronics department with 40 devices.
○​ VLAN 30 for Mechanical department with 30 devices.
○​ VLAN 40 for Civil Engineering department with 30 devices.
○​ VLAN 50 for Administration with 10 computers.
○​ VLAN 99 for internet access, routed through the gateway router.​

2.​ IP Addressing:
○​ VLAN 10: 192.168.10.0/24 (Gateway: 192.168.10.1)
○​ VLAN 20: 192.168.20.0/24 (Gateway: 192.168.20.1)
○​ VLAN 30: 192.168.30.0/24 (Gateway: 192.168.30.1)
○​ VLAN 40: 192.168.40.0/24 (Gateway: 192.168.40.1)
○​ VLAN 50: 192.168.50.0/24 (Gateway: 192.168.50.1)
○​ Router IP (Internet Gateway): 10.0.0.1​

3.​ Routing and Security:


○​ Dynamic Routing: Use a routing protocol like RIP or OSPF for inter-VLAN
communication.
○​ ACL Configuration: Implement ACLs to restrict traffic from the
administration network to academic department networks and vice versa.
○​ Internet Access: Use NAT on the router to allow internal users to access the
internet while keeping internal IP addresses private.
Experiment 8
Aim :- Implement CRC using any programming language. Input Data and
polynomial generator. Output CRC bits, data with CRC bits and verify at
receiver end.

Theory :-
Cyclic Redundancy Check (CRC) is an error-detecting code used to detect accidental changes
to raw data. It is commonly used in digital networks and storage devices to detect errors in
data. CRC is based on polynomial division, where the data is treated as a large polynomial,
and the CRC is the remainder of the division by a fixed polynomial generator. The process of
creating a CRC involves taking the data and dividing it by a predetermined polynomial,
appending the remainder (CRC bits) to the data, and sending it to the receiver. At the
receiver’s end, the data (including CRC bits) is divided by the same polynomial, and if the
remainder is zero, the data is considered error-free. If the remainder is non-zero, an error is
detected.
CRC is commonly used in protocols like Ethernet, CDs, and in various other data integrity
applications due to its efficiency and ease of implementation. Its strength comes from its
ability to detect even small changes in data, making it a reliable method of ensuring data
integrity.

Example:
●​ Data Input: 1101011011
●​ Polynomial Generator: 1101 (a simple 4-bit polynomial)
●​ CRC Calculation: After performing the division, the remainder (CRC bits) will
be appended to the original data.
●​ Data with CRC: 1101011011110 (where 1110 is the CRC bits)​

At the receiver end, the entire data (now including the CRC bits) will be divided by
the same polynomial. If the remainder is zero, the data is considered valid. If the
remainder is non-zero, an error is detected.

Limitations:
1.​ Limited Error Detection: CRC can detect many types of errors but does not
guarantee detection of all errors, particularly in cases where errors occur in
certain patterns that fit the polynomial's characteristics.
2.​ Computational Overhead: For large data sizes or very complex polynomials,
CRC computation can become computationally expensive, requiring more
processing time.
3.​ Susceptibility to Burst Errors: While CRC is good at detecting burst errors,
certain types of burst errors might go undetected if they align with the
generator polynomial's characteristics.​

Examples:

1.​ Example 1:
○​ Data: 10110101
○​ Polynomial: 1101
○​ CRC Bits: 1111
○​ Data with CRC: 101101011111​

2.​ Example 2:
○​ Data: 11110000
○​ Polynomial: 10011
○​ CRC Bits: 101
○​ Data with CRC: 11110000101
Experiment 9
Aim :- Differentiate between subnet and supernet with an example diagram
drawn using CISCO packet tracer.

Theory :-
Subnetting and Supernetting are both techniques used in IP address management to
divide and combine networks based on specific needs.
Subnetting is the process of dividing a larger network into smaller, more manageable
sub-networks, called subnets. This is done by borrowing bits from the host portion of
an IP address and allocating them to the network portion. The primary goal of
subnetting is to create smaller networks that are easier to manage and reduce wastage
of IP addresses within a given network.
Subnetting enhances network efficiency by reducing congestion and improving
security. It is commonly used in situations where a network needs to be divided into
smaller logical segments, such as in large organizations, to manage traffic better and
isolate network traffic.
Supernetting, on the other hand, involves combining multiple smaller networks into a
larger network. Supernetting is used to aggregate several subnets or networks into a
single larger network, effectively reducing the number of entries in routing tables and
improving routing efficiency. It is accomplished by borrowing bits from the network
portion of an IP address and giving them to the host portion, effectively increasing the
size of the network. Supernetting is typically used in scenarios where larger address
blocks are needed for a more efficient use of IP space, especially in cases where many
smaller networks must be combined into a larger one.

Example:

Consider the following:

●​ Original Network (Class C): 192.168.1.0/24​

●​ Subnetting Example:
○​ If we need to divide this network into 4 smaller subnets, we could
borrow 2 bits from the host portion, resulting in 192.168.1.0/26.
○​ Now, we have four subnets: 192.168.1.0/26, 192.168.1.64/26,
192.168.1.128/26, and 192.168.1.192/26.​

●​ Supernetting Example:
○​ If we need to combine two smaller networks (e.g., 192.168.1.0/24 and
192.168.2.0/24) into a single larger network, we could create a
supernet: 192.168.0.0/23. This supernet combines the two original
networks into one.

In Cisco Packet Tracer, we simulate subnetting by configuring routers with subnets


like 192.168.1.0/26 and connecting them. For supernetting, you could combine
networks like 192.168.1.0/24 and 192.168.2.0/24 and assign a supernetted network
to the router, such as 192.168.0.0/23.

Limitations:

1.​ Subnetting Limitations:​

○​ Address Waste: If a subnet is too small, there may be unused IP


addresses that go to waste.
○​ Complexity: In large networks with many subnets, managing the
network and allocating addresses can become complex.
○​ Routing Overhead: More subnets can result in more entries in the
routing table, which could lead to higher processing time.​

2.​ Supernetting Limitations:​

○​ Address Waste: In a supernet, not all addresses are always


utilized, leading to possible waste of IP space.
○​ Reduced Security: Supernetting may reduce security, as it merges
multiple networks into one, increasing the broadcast domain.
○​ Compatibility: Supernetting is only useful when networks are
contiguous, which may not always be the case.​

Example:

1.​ Example 1: Subnetting:


○​ Original Network: 192.168.1.0/24
○​ Subnetted Network: 192.168.1.0/26, 192.168.1.64/26,
192.168.1.128/26, 192.168.1.192/26​

2.​ Example 2: Supernetting:


○​ Network 1: 192.168.1.0/24
○​ Network 2: 192.168.2.0/24
○​ Supernetted Network: 192.168.0.0/23
Experiment 10
Aim :- Differentiate and explain classless addressing and classful addressing
with a numerical example. Explain classful addressing with a numerical
example.

Theory :-

❖​ Classful Addressing

Classful addressing divides the IPv4 address space into 5 fixed classes (A to E), with classes
A, B, and C commonly used for unicast communication.

●​ Class A:
○​ Range: 0.0.0.0 to 127.255.255.255
○​ Default subnet mask: 255.0.0.0
○​ Used for very large networks.​

●​ Class B:
○​ Range: 128.0.0.0 to 191.255.255.255
○​ Default subnet mask: 255.255.0.0
○​ Used for medium-sized networks.​

●​ Class C:
○​ Range: 192.0.0.0 to 223.255.255.255
○​ Default subnet mask: 255.255.255.0
○​ Used for small networks.​

●​ Class D is for multicast, and Class E is reserved.

Example:​
IP: 192.168.1.10​
→ First octet is 192 → belongs to Class C​
→ Default subnet mask = 255.255.255.0​
→ Network ID: 192.168.1.0, Host ID: 10
Limitations:

●​ Fixed number of hosts per class.


●​ Wastes IPs if full range isn't used.​

❖​ Classless Addressing (CIDR - Classless Inter-Domain Routing)

CIDR removes class boundaries. An IP address is followed by a slash notation (e.g., /20) that
indicates how many bits are used for the network.

●​ More flexible and efficient IP allocation.


●​ Enables subnetting and supernetting.​

Example:​
IP: 192.168.0.0/22​
→ 22 bits for network, remaining 10 bits for hosts​
→ Subnet mask: 255.255.252.0​
→ Total addresses: 2^10 = 1024​
→ Usable IPs: 1022 (excluding network & broadcast)

This /22 block includes:

●​ 192.168.0.0 to 192.168.3.255
Experiment 11
Aim :- Differentiate IPv4 and IPv6 with payload format.

Theory :-

Feature IPv4 IPv6

Address Size 32-bit (4 bytes) 128-bit (16 bytes)

Address Format Decimal, e.g., 192.168.1.1 Hexadecimal, e.g., 2001:0db8::1

Header Size 20–60 bytes (variable) Fixed 40 bytes

Header Complexity More complex (includes checksum, options) Simpler, more efficient

Security Optional (IPSec optional) Built-in IPSec support

Fragmentation Done by routers Done only by the source

Broadcast Supported Not supported (uses


multicast/anycast)

Packet Routing Less efficient Faster due to simplified header

QoS Support Limited Improved (Flow Label field)

Payload Format: IPv4 Header


IPv4 Header (20 bytes min):
+--------+--------+--------+--------+
|Version |IHL |Type of Service |
+--------+--------+--------+--------+
|Total Length |
+--------+--------+--------+--------+
|Identification |
+--------+--------+--------+--------+
|Flags | Fragment Offset |
+--------+--------+--------+--------+
|Time to Live | Protocol |
+--------+--------+--------+--------+
|Header Checksum |
+--------+--------+--------+--------+
|Source IP Address |
+--------+--------+--------+--------+
|Destination IP Address |
+--------+--------+--------+--------+
|Options (if any) |
+--------+--------+--------+--------+
| Payload (Data) |

Payload Format: IPv6 Header


IPv6 Header (Fixed 40 bytes):
+--------+--------+--------+--------+
|Version | Traffic Class | Flow Label |
+--------+--------+--------+--------+
|Payload Length | Next Header | Hop Limit |
+--------+--------+--------+--------+
|Source IP Address (128-bit) |
+--------+--------+--------+--------+
|Destination IP Address (128-bit) |
+--------+--------+--------+--------+
| Payload (Data) |
Experiment 12
Aim :- Explore Wireshark, give brief characteristics (features, limitations etc.)
and share working of packet sniffing.

Theory :-
1. Introduction
Wireshark is a powerful, free, and open-source network protocol analyzer used widely by
network administrators, security analysts, developers, and students. It allows users to capture and
interactively browse the traffic running on a computer network in real-time.

2. Features of Wireshark

Wireshark offers a range of features that make it one of the most widely used packet analyzers:

●​ Live Packet Capture: Capture real-time network traffic from various interfaces (Ethernet,
Wi-Fi, etc.).
●​ Deep Protocol Inspection: Supports in-depth analysis of over 1,000 network protocols
including TCP, UDP, HTTP, DNS, and more.
●​ Advanced Filtering: Use capture and display filters to narrow down and analyze specific
network packets.
●​ Multi-Pane View: Offers a structured view with a packet list, detailed protocol layers, and raw
hex data.
●​ Color Coding: Differentiates traffic types using customizable color rules for quick
identification.
●​ Cross-Platform Support: Available on Windows, macOS, and Linux.
●​ Export Options: Save captured packets in .pcap or .pcapng format for further analysis or
sharing.

3. Limitations of Wireshark

While Wireshark is extremely capable, it does have some limitations:

●​ Requires Elevated Permissions: Admin/root access is usually required to capture live traffic.
●​ Cannot Decrypt Encrypted Traffic: SSL/TLS traffic remains unreadable without proper
decryption keys.
●​ Passive Tool: Wireshark is read-only and does not allow traffic injection or modification.
●​ Resource Intensive: Large capture files can slow down system performance.
●​ Security Risk: Capturing sensitive data like passwords in plain text can pose a risk if
mishandled.
4. How Packet Sniffing Works in Wireshark

Packet sniffing is the process of intercepting and logging traffic that flows across a network.
Wireshark performs packet sniffing using the following steps:

1.​ Interface Selection: The user selects a network interface (e.g., Wi-Fi or Ethernet) to monitor.
2.​ Promiscuous Mode (Optional): Enables capturing of all traffic on the network, not just
packets destined for the host machine.
3.​ Live Capture: Wireshark begins capturing packets in real-time and displays them in a
structured format.
4.​ Packet Analysis: The captured packets are dissected into protocol layers (e.g., Ethernet, IP,
TCP).
5.​ Filtering and Inspection: Users apply filters (e.g., http, ip.addr == 192.168.1.1) to isolate
specific traffic.
6.​ Saving Captures: The captured data can be saved, exported, and shared for later inspection.

5. Use Cases of Wireshark

●​ Diagnosing network issues


●​ Analyzing slow applications
●​ Detecting malicious or suspicious network activity
●​ Learning how network protocols function​

6. Conclusion
Wireshark is a vital tool for anyone working with computer networks. Its real-time packet capturing
and deep protocol analysis make it invaluable for troubleshooting, learning, and securing network
communications. However, ethical use and awareness of its limitations are essential to avoid misuse
and maintain privacy.
Experiment 13
Aim :- Analyze and monitor network traffic of the computer system using the
WireShark or packet tracer.

Theory :-

1. Introduction
Network traffic analysis is a critical part of managing and securing computer networks. Tools
like Wireshark and Cisco Packet Tracer are widely used to monitor, capture, and analyze
network traffic. While Wireshark is used for real-time packet capture on live networks,
Packet Tracer is a simulation tool ideal for practicing network setups and behaviors in a
virtual environment.

2. Using Wireshark to Monitor Real Network Traffic


Steps to Analyze Network Traffic:
1.​ Install and Launch Wireshark​
-Download from https://www.wireshark.org.​
-Run the application with administrative privileges.​

2.​ Select a Network Interface​


-Choose the interface (e.g., Wi-Fi, Ethernet) to start capturing live packets.​

3.​ Start Packet Capture​


-Click on the interface to begin live capture.​
-Wireshark will display real-time packet flow, including protocol, source, destination,
length, and more.​

4.​ Apply Filters​


-Use filters to isolate traffic:
■​ http – Show only HTTP packets
■​ ip.addr == 192.168.1.10 – Traffic involving a specific IP
■​ tcp.port == 443 – Encrypted HTTPS traffic​

5.​ Inspect Packets​


-Click on any packet to see protocol layers (Ethernet → IP → TCP →
Application).​
-View detailed header info, flags, and payload.​

6.​ Save and Export​


-Save capture files in .pcap format for later review or sharing.​

3. Using Cisco Packet Tracer for Simulated Analysis


Steps in Packet Tracer :-
1.​ Create a Network Topology​
-Use routers, switches, PCs, and connections to build a simulated network.​

2.​ Configure IPs and Routing​


-Assign IP addresses and set up static or dynamic routing.​

3.​ Generate Traffic​


-Use the "Add Simple PDU" tool or simulate ping/HTTP requests between nodes.​

4.​ Monitor Packet Flow​


-Use the Simulation tab to observe packets moving through the network.​
-Analyze packet encapsulation and decapsulation at each layer.​

5.​ View Protocol Details​


-Click on captured packets to view headers (Layer 2 to Layer 7).​
-Track path, delays, and packet drops in the simulation.​

4. Use Cases
●​ Detect slow or failed connections
●​ Understand routing behavior
●​ Capture malware traffic or unusual patterns
●​ Practice protocol behavior in a virtual lab​

5. Conclusion
Whether analyzing real traffic using Wireshark or practicing scenarios in Packet Tracer, both
tools offer valuable insights into how data flows across networks. Mastery of these tools
enhances one's ability to troubleshoot, secure, and optimize network operations effectively.

You might also like