0% found this document useful (0 votes)
2 views

A CN_File

The document is a lab file for the Computer Networks course at G B Pant DSEU, detailing practical exercises for B.Tech students in the CSE department. It includes aims, apparatus required, theoretical background, and conclusions for various practicals such as analyzing network cables, devices, and connecting computers in different types of networks. Each practical is organized with specific dates and signatures, emphasizing hands-on learning in networking concepts.

Uploaded by

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

A CN_File

The document is a lab file for the Computer Networks course at G B Pant DSEU, detailing practical exercises for B.Tech students in the CSE department. It includes aims, apparatus required, theoretical background, and conclusions for various practicals such as analyzing network cables, devices, and connecting computers in different types of networks. Each practical is organized with specific dates and signatures, emphasizing hands-on learning in networking concepts.

Uploaded by

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

G B Pant DSEU Okhla I Campus

(Formerly G B Pant Govt. Engineering College)


Okhla Industrial Estate Phase-III,
New Delhi – 110020

LAB FILE
Department Of Computer Science & Engineering
B .Tech (CSE) 2022-26 – 6TH Sem

COMPUTER NETWORKS BT-CS-ES-601

Submitted By: LAKSHAY Submitted to:

Roll No: Dr Manisha Munjal


41522032
Branch: CSE Assistant Professor
CSE Department

1
2
Table of Content
Sr. No. Name of Practical Date Signature

1. Analyze different types of Network cables and 05.03.25


practically implement the cross-wired cable
and
straight through cable using clamping tool.

2. Analyse Network Devices in Detail. 12.03.25

3. Connect the computers in Local Area Network. 19.03.25

4. Study of basic network command and Network 26.03.25


configuration commands.

5. Configure a Network topology using packet 02.04.25


tracer software.

6. Configure a Network using Distance Vector 09.04.25


Routing protocol.

7. Configure a Network using Link State 16.04.25


Vector Routing protocol.

8. To Perform File Transfer in Client & Server 23.04.25


Using TCP/IP.

3
4
PRACTICAL - 1
Aim : To Analyze different types of Network cables and practically implement
the cross-wired cable and straight through cable using clamping (crimping) tool.

Apparatus Required :
RJ45 Ethernet Cables, RJ45 Connectors, Crimping Tool, Cable Tester, Wire Stripper,
Cisco Packet Tracer Software.

Theory:
Network cables are essential for wired communication between devices in a network.
They come in different types based on speed, distance, and use case. (fig1.1)

Fig 1.1 (Un-Guided Transmission Media Cable)

1. Twisted Pair Cable

● Types: UTP (Unshielded Twisted Pair) & STP (Shielded Twisted Pair)
● Usage: Ethernet networking (LANs)
● Connector : Registered Jack 45
● Categories: Cat3, Cat5, Cat5e, Cat6, Cat6a, Cat7, Cat8
● Speed & Distance:
○ Cat5e: Up to 1 Gbps, 100 meters
○ Cat6: Up to 10 Gbps, 55 meters
○ Cat7: Up to 10 Gbps, 100 meters
● Advantages: Cost-effective, widely used, easy to install

5
● Disadvantages: Prone to interference (UTP), limited distance

2. Coaxial Cable

● Usage: Cable TV, CCTV, broadband internet


● Types: RG6, RG59, RG11
● Connector : BNC (Bayonet Neill-Concelman)
● Speed & Distance: Up to 10 Mbps, 500 meters
● Advantages: Better shielding than twisted pair, long-distance transmission
● Disadvantages: Bulkier, less flexible, outdated for modern networking

3. Fiber Optic Cable

● Usage: High-speed data transmission, long-distance communication


● Types: Single-mode (SMF) & Multi-mode (MMF)
● Connector : SC (Subscriber Channel)
● Speed & Distance:
○ SMF: Up to 100 Gbps, 40+ km
○ MMF: Up to 10 Gbps, 500 meters
● Advantages: Extremely fast, immune to electromagnetic
interference, long-distance transmission
● Disadvantages: Expensive, fragile, complex installation

4. Ethernet Crossover Cable

● Usage: Direct PC-to-PC connection without a switch


● Speed & Distance: Same as standard Ethernet cables
● Advantages: No need for a hub/switch
● Disadvantages: Limited use, mostly replaced by Auto-MDIX technology

Cable Speed Max Interference Cost Use Case


Type Distance Resistance

Twisted 1-10 Gbps 100m Low (UTP), Medium Low LANs, office
Pair (STP) networks

Coaxial 10 Mbps 500m Medium Mediu Cable TV,


m broadband

Fiber Up to 100 40+ km High High Data centers, ISPs


Optic Gbps

Crossover Same as 100m Low Low Direct device


Ethernet connections

6
Wiring Standards for Ethernet Cables:

1. TIA/EIA568A (Standard A): White/Green, Green, White/Orange, Blue,


White/Blue, Orange, White/Brown, Brown

2. TIA/EIA568B (Standard B): White/Orange, Orange, White/Green, Blue,


White/Blue, Green, White/Brown, Brown

Ethernet cables can be classified into 2 main types based on the wiring standard used
on both ends:

1. Straight-Through Cable: Both ends follow the same wiring standard (either
568A568A or 568B568B). Used for connecting different devices, such as a PC to a
Switch or a Router to a Switch.

2. Crossover Cable: One end follows TIA/EIA568A, and the other follows
TIA/EIA568B. Used to connect similar devices, such as PC-to-PC or Switch-to-Switch
connections.

Working :
1. Straight-Through Cable Model:
A. Devices Used: One PC, one switch, one router. (fig1.2)
B. Connections: PC to Switch (straight-through cable), Switch to
Router (straight-through cable).
C. Testing:
I. Assign IP addresses to the devices.
– (Router: IP-192.168.1.1)
– (PC: Default Gateway-192.168.1.1, Subnet-
255.255.255.0, IP-192.168.1.10)
II. Use the “ping 192.168.1.1” command on PC’s command prompt
to test communication.
2. Crossover Cable Model:
A. Devices Used: Two PCs. (fig1.3)
B. Connections: PC0 to PC1 (crossover cable).
C. Testing:
I. Assign IP addresses to both PCs
– (PC0: IP-192.168.1.1 Subnet-255.255.255.0)
– (PC1: IP-192.168.1.2 Subnet-255.255.255.0)
II. Test direct communication using the “ping 192.168.1.2”
command on PC0 Command Prompt
Result
:

7
>>fig1.2

>>fig1.3
Conclusion : Analysed different types of Network cables and practically
implemented the cross-wired cable and straight through cable using clamping tool
successfully.

8
PRACTICAL - 2
Aim : To Analyse Network Devices in Detail.

Apparatus Required :
Hardware: Routers, switch, Wireless access point, Computers, Modem, Hub, Network cables
,etc.
Software: Cisco Packet Tracer (for simulation)

Theory:
Network devices play a crucial role in establishing communication between computers and
other hardware within a network. (fig2.1)

fig2.1 (Networking Devices)

1. Hub
Function:

● Acts as a basic network device that broadcasts data to all connected devices.
● Operates at Layer 1 (Physical Layer) of the OSI model.

9
Types:

1. Active Hub – Uses power to regenerate and amplify signals.


2. Passive Hub – Simply connects devices without amplifying signals.
3. Intelligent Hub – Can monitor traffic and manage network performance.

Advantages:

-- Simple and cost-effective.


-- Works well in small networks.

Disadvantages:

-- Causes network congestion (broadcasts to all ports).


-- No filtering or security mechanisms.

2. Switch
Function:

● Forwards data intelligently to the intended recipient.


● Works at Layer 2 (Data Link Layer) and sometimes Layer 3 (Network Layer)
(L3 switches).
● Uses MAC addresses to send data only to the intended device.

Types:

1. Managed Switch – Allows network control via configuration settings.


2. Unmanaged Switch – Simple plug-and-play device with no customization.
3. Layer 3 Switch – Performs routing functions, like a router.

Advantages:

-- Reduces unnecessary traffic (compared to hubs).


-- Increases network performance.
-- Supports VLANs for better network segmentation.

Disadvantages:

-- More expensive than hubs.


-- Requires configuration in advanced networks.

3. Router
Function:

● Directs data packets between different networks.


● Works at Layer 3 (Network Layer) of the OSI model.
● Uses IP addresses to forward packets to the correct destination.

Types:

10
1. Wired Router – Uses Ethernet cables for connectivity.
2. Wireless Router – Provides Wi-Fi connectivity.
3. Core Router – Used in large enterprise networks for backbone connectivity.
4. Edge Router – Connects an internal network to the external internet.

Advantages:

-- Enables internet connectivity.


-- Provides firewall and NAT (Network Address Translation) features.
-- Supports multiple network interfaces.

Disadvantages:

-- More complex than switches.


-- Can be expensive for high-performance models.

4. Modem (Modulator-Demodulator)
Function:

● Converts digital signals (from a computer) into analog signals (for telephone
lines) and vice versa.
● Used to connect a local network to an ISP (Internet Service Provider).

Types:

1. DSL Modem – Uses telephone lines for the internet.


2. Cable Modem – Uses coaxial cables (used for broadband internet).
3. Fiber Modem – Uses optical fiber for high-speed connectivity.

Advantages:

-- Enables internet access over different mediums.


-- Can work with routers to provide networking capabilities.

Disadvantages:

-- Requires a subscription to an ISP.


-- Performance depends on the network provider.

5. Access Point (AP)


Function:

● Extends Wi-Fi coverage in a network.


● Works as a wireless bridge between wired and wireless devices.

Types:

1. Standalone AP – Manually configured for small networks.


2. Controller-Based AP – Used in enterprises for centralized management.

11
3. Mesh AP – Forms a mesh network for wider coverage.

Advantages:

-- Provides Wi-Fi access for wireless devices.


-- Can be placed anywhere for better coverage.

Disadvantages:

-- Requires a wired connection for backhaul.


-- Performance can drop with more users connected.

6. Gateway
Function:

● Acts as a translator between different network protocols.


● Works at Layer 3 and above (Network, Transport, Application layers).

Examples:

● VoIP Gateway (for voice-over-IP communication).


● Cloud Gateway (connects on-premises networks to cloud services).
● Email Gateway (for spam filtering and security).

Advantages:

-- Enables communication between different network types.


-- Provides security features like firewalls.

Disadvantages:

-- Can introduce latency.


-- Complex setup for advanced configurations.

7. Firewall
Function:

● Monitors and controls incoming and outgoing network traffic.


● Works at Layer 3 (Network Layer) and above.
● Can be hardware-based or software-based.

Types:

1. Packet Filtering Firewall – Checks packet headers for security.


2. Stateful Inspection Firewall – Tracks active connections.
3. Proxy Firewall – Intercepts and inspects network traffic.
4. Next-Gen Firewall (NGFW) – Uses AI and deep packet inspection.

Advantages:

12
-- Protects against unauthorized access.
-- Helps prevent malware and cyberattacks.

Disadvantages:

-- Can slow down traffic if misconfigured.


-- Requires regular updates to handle new threats.

Comparison of Network Devices


OSI Layer Function Key Feature Use Case
Device

Hub Layer 1 Broadcasts data to all devices No filtering Small networks

Switch Layer 2 (or Forwards data to the correct Uses MAC LAN networks
3) device addresses

Router Layer 3 Directs data between Uses IP addresses Internet


networks connectivity

Modem Layer 1/2 Converts digital to analog Connects to ISP Internet access

Access Layer 2 Provides wireless Wi-Fi extension Wireless networks


Point network access

Gateway Layer 3+ Connects different networks Protocol Enterprise


conversion networks

Firewall Layer 3+ Secures network traffic Blocks threats Cybersecurity

Working :
We will create a network model using various network devices studied above (fig2.2).
1. The subnet of all the devices will be same i.e. 255.255.255.0
2. The IP addresses of the 2 routers will be 192.168.1.1 and 192.168.2.1 respectively.
3. The default gateway for the devices will be the same as IP address of the router
network they are connected to.
4. We will use a switch to connect the routers to the modem because there is only one
port available in the modem
5. For all the connections between devices we will use copper straight-through
connection cables.
6. For the laptop we will have to switch It off and attach the wireless adapter and switch
it on for connecting to a wireless network.
7. To test the connection status on any device, we will use the “ping . ._._“ command
in the command prompt. The blank space will be the IP address of the respective
router.
8. To simplify the connections, we can also use a switch between the hub and the 3
servers (not used here)

13
Result :

fig2.2
Conclusion : Analysed Network Devices in Detail successfully.

14
PRACTICAL - 3
Aim : To Connect the computers in Local Area Network, Metropolitan Area Network
and Wide Area Network.

Apparatus Required :

● For LAN:Computers / Laptops, Switch (to connect multiple devices),Router (for


internet access),Ethernet Cables (RJ45),Access Point (for Wi-Fi connectivity,
optional)
● For MAN:Routers & Switches,Fiber Optic Cables or Wireless Links,Modems
(for internet or leased lines),ISP (Internet Service Provider) connectivity
● For WAN:Routers & Modems,Leased Lines / Satellite Links,Fiber Optic Cables
(for high-speed internet),VPN (for secure remote access)

Theory:
A network is a system that connects multiple devices to share data, resources, and
communication. Based on geographical coverage, networks are classified into different Area
Networks: (fig3.1)

fig3.1

1. LAN
A Local Area Network (LAN) is a small network covering a limited area like a home, office,
school, or small business.

Uses of LAN:

-- Office networks
-- Schools, colleges

15
-- Cyber cafés
-- Home networks

2. MAN
A Metropolitan Area Network (MAN) covers a larger geographical area than LAN, such as a
city or campus.

Uses of MAN:

-- Universities connecting multiple campuses


-- Government offices in a city
-- Bank branches in a metropolitan area

3. WAN
A Wide Area Network (WAN) connects multiple MANs and LANs over a large geographical
area, such as a country or the entire world.

Uses of WAN:

-- The Internet (largest WAN)


-- Multinational companies with offices worldwide
-- Cloud services like Google Drive, Amazon AWS

Comparison of LAN, MAN, and WAN


Feature LAN MAN WAN

Coverage Small area (Office, City or large area Worldwide or


Home) country-wide

Speed High (1Gbps – 10Gbps) Medium (100Mbps – Low (10Mbps – 1Gbps)


1Gbps)

Cost Low Moderate Expensive

Devices Switch, Router, Access Routers, Fiber Optic Satellites, Leased Lines
Used Point Cables

Example Office network University network The Internet

Working :
1. Connecting Computers in a LAN

16
● Connect all computers to a network switch using Ethernet cables.
● Connect the switch to a router (if internet access is needed).
● Assign IP addresses manually (static IP) or enable DHCP (Dynamic Host
Configuration Protocol) on the router.
● Enable File & Printer Sharing on all computers.
● Test the connection by pinging other computers using the Command Prompt
(ping 192.168.1.x). (Refer fig3.2)

Fig3.2

2. Connecting Computers in a MAN

● Establish LANs at different locations (e.g., offices in different buildings).


● Connect LANs using fiber optic cables or wireless links (WiMAX, Microwave).
● Use routers to manage traffic between LANs and the internet.
● Set up VLANs (Virtual LANs) for efficient data communication.
● Configure security using firewalls and VPNs. (Refer fig 3.3)

17
fig 3.3

3. Connecting Computers in a WAN

● Connect different MANs and LANs using ISP-provided leased lines, broadband,
or fiber connections.
● Use routers to route data between different locations.
● Implement MPLS (Multiprotocol Label Switching) for efficient data transmission.
● Set up VPNs (Virtual Private Networks) for secure remote connections.
● Monitor network performance using Network Management Tools. (Refer fig3.4)

Fig 3.4

Result :
● LAN is used for small networks like homes and offices.

18
● MAN is used for city-wide networks like government offices or campuses.
● WAN is used for global communication, connecting multiple LANs and MANs over
large distances.

Conclusion : We have connected the computers in Local Area Network,


Metropolitan Area Network and Wide Area Network Successfully.

19
20
PRACTICAL - 4
Aim : To Study the basic network commands and Network configuration commands.

Apparatus Required :
● A computer
● Internet or LAN connection
● Access to Terminal/Command Prompt
● (Optional) Router, Switch, Ethernet cables (if you want to test in a physical
LAN environment).

Theory:
Network commands are tools used to monitor, troubleshoot, and configure network
settings. They help in checking the status of a network, diagnosing problems, and
configuring devices for communication.

# Basic Network Commands


Command Purpose Example

ping Tests the connection to another ping www.google.com


computer or server.

tracert (Windows) / Shows the path packets take to a tracert


traceroute (Linux) destination. www.google.com

ipconfig (Windows) Displays IP address, subnet mask, and ipconfig


gateway.

ifconfig (Linux/macOS) Displays or configures network ifconfig


interfaces.

nslookup Checks DNS (Domain Name System) nslookup


records. www.google.com

netstat Displays network netstat


connections, routing tables,
and statistics.

arp Displays or modifies the ARP cache arp -a


(IP to MAC address mapping).

21
hostname Displays the name of the computer. hostname

pathping (Windows) Combines ping and tracert to find pathping


network issues. www.google.com

# Network Configuration Commands


Command Purpose Example

ipconfig /release Releases the current IP address. ipconfig /release

ipconfig /renew Renews the IP address from DHCP server. ipconfig /renew

netsh Configures and manages network settings (IP, netsh interface ip set
firewall, etc.). address

route Displays and modifies the routing table. route print

ifdown / ifup Brings network interfaces down or up. ifdown eth0, ifup eth0
(Linux)

nmcli (Linux) Command-line tool for NetworkManager for nmcli device status
managing network connections.

iwconfig (Linux) Configures wireless network interfaces. iwconfig wlan0

Working :
( Few Comman Network Commands )

1. Testing Internet Connection to specific website.

C:\Users\MOHD FAIZAN>ping www.google.com


Pinging www.google.com [142.250.207.228] with 32 bytes of
data: Reply from 142.250.207.228: bytes=32 time=17ms TTL=118
Reply from 142.250.207.228: bytes=32 time=9ms TTL=118
Reply from 142.250.207.228: bytes=32 time=6ms TTL=118
Reply from 142.250.207.228: bytes=32 time=8ms TTL=118

Ping statistics for 142.250.207.228:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

22
Approximate round trip times in milli-seconds:
Minimum = 6ms, Maximum = 17ms, Average = 10ms

2. Displaying IP address, subnet mask, and gateway.

C:\Users\MOHD FAIZAN>ipconfig

Windows IP Configuration

Wireless LAN adapter Local Area Connection* 1:

Media State.....................Media disconnected


Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection*

2: Media State.................Media disconnected


Connection-specific DNS Suffix . :

Ethernet adapter Bluetooth Network Connection

3: Media State.................Media disconnected


Connection-specific DNS Suffix . :

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :


Link-local IPv6 Address.........: fe80::3ec3:963f:a8c9:70e4%5
IPv4 Address..................: 192.168.1.55
Subnet Mask...................: 255.255.255.0
Default Gateway................: 192.168.1.1

3. Renewing the IP address from DHCP server

C:\Users\MOHD FAIZAN>ipconfig /renew

Windows IP Configuration

No operation can be performed on Local Area Connection* 1 while it has its media disconnected.
No operation can be performed on Local Area Connection* 2 while it has its media disconnected.

23
No operation can be performed on Bluetooth Network Connection 3 while it has its media
disconnected.

Wireless LAN adapter Local Area Connection* 1:

Media State.....................Media disconnected


Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection*

2: Media State.................Media disconnected


Connection-specific DNS Suffix . :

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :


Link-local IPv6 Address.........: fe80::3ec3:963f:a8c9:70e4%5
IPv4 Address..................: 192.168.1.55
Subnet Mask...................: 255.255.255.0
Default Gateway................: 192.168.1.1

Ethernet adapter Bluetooth Network Connection

3: Media State.................Media disconnected


Connection-specific DNS Suffix . :

4. Finding the route to a website.

C:\Windows\System32>tracert www.microsoft.com

Tracing route to e13678.dscb.akamaiedge.net [23.211.226.110]


over a maximum of 30 hops:

1 5 ms 4 ms 2 ms 192.168.1.1
2 * 7 ms 4 ms 100.63.0.1
3 7 ms * * 43.247.43.17
4 * 12 ms 8 ms 163.53.87.97
5 * * * Request timed out.
6 6 ms 4 ms 4 ms a23-211-226-110.deploy.static.akamaitechno logies.com
[23.211.226.110]

24
Trace complete.

5. Displays and modifies the routing table.

C:\Windows\System32>route print
===========================================================================
Interface List
16...aa e2 91 28 41 b4.....Microsoft Wi-Fi Direct Virtual Adapter
19...aa e2 91 28 51 a4 ......Microsoft Wi-Fi Direct Virtual Adapter #2
5...a8 e2 91 28 61 94.....MediaTek Wi-Fi 6E MT7902 Wireless LAN Card
23...a8 e2 91 28 61 95.....Bluetooth Device (Personal Area Network) #3
1.....................Software Loopback Interface 1
===========================================================================

IPv4 Route Table


===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.55 60
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.55 316
192.168.1.55 255.255.255.255 On-link 192.168.1.55 316
192.168.1.255 255.255.255.255 On-link 192.168.1.55 316
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.55 316
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.55 316
===========================================================================
Persistent Routes:
None

IPv6 Route Table


===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 331 ::1/128 On-link
5 316 fe80::/64 On-link
5 316 fe80::3ec3:963f:a8c9:70e4/128 On-link
1 331 ff00::/8 On-link
5 316 ff00::/8 On-link

25
===========================================================================
Persistent Routes:
None

…..& more…..

Result :
● Basic network commands help to check connectivity and troubleshoot
network issues.

● Configuration commands are used to set up or modify network settings.

● These commands makes us easier to manage both small and large networks.

Conclusion : We have studied the basic network commands and Network


configuration commands Successfully.

26
PRACTICAL - 5
Aim : To Configure a Network topology using packet tracer software.

Apparatus Required :

● Cisco Packet Tracer software


● Computer/Laptop (min. 4GB RAM)
● Basic networking devices (available inside Packet Tracer)
○ PCs (end devices)
○ Switches
○ Routers
○ Access Points (for wireless networks)
○ Cables (Copper Straight-through, Copper Cross-over, Fiber, etc.)

Theory:
Network Topology refers to the physical or logical layout of how computers, cables,
routers, switches, and other devices are connected together in a network.

1. Bus Topology
● A single cable acts as a backbone for the entire network.
● Devices tap into the cable to communicate.
● Advantages: Easy to install, low cost.
● Disadvantages: Cable failure leads to network failure; slow with heavy traffic.

2. Star Topology
● All devices are connected to a central hub or switch.
● Communication passes through the hub.
● Advantages: Easy to add new devices, centralized control.
● Disadvantages: Hub failure can bring down the network.

3. Ring Topology
● Devices are connected in a closed loop.
● Data travels in one direction (or two in dual-ring setups).
● Advantages: Good performance in heavy load.
● Disadvantages: Failure of a single device can break the loop.

4. Mesh Topology
● Every device connects directly to every other device.

27
● Offers multiple paths for data transmission.
● Advantages: Very reliable and robust.
● Disadvantages: Expensive and complex to set up.

5. Tree Topology
● Consists of groups of Star topologies connected to a main bus.
● Hierarchical structure (root node connected to branch nodes).
● Advantages: Scalable and easy to manage.
● Disadvantages: If the backbone cable breaks, sections may fail.

6. Hybrid Topology
● Combines two or more topologies (like Star + Mesh).
● Used in large networks for flexibility and performance.
● Advantages: Customized according to requirements.
● Disadvantages: Expensive and complex design.

Working :
# Basic Steps to Configure a Network Topology:

1. Open Packet Tracer


Launch the Cisco Packet Tracer application.

2. Select Devices
From the bottom menu, drag and drop devices:

3. Connect Devices
Choose the correct cable type:
Straight-through cable for different devices
. Cross-over cable for similar devices .

4. Assign IP Addresses
Click on each PC → go to Desktop → IP Configuration.
Assign an IP address and Subnet mask manually.

5. Configure Router (Optional)


Click on the Router → CLI (Command Line Interface).
Basic commands:
enable
configure terminal
interface gigabitEthernet 0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit

28
6. Test the Network
Use the ping command from one PC to another PC:
Open Command Prompt inside Packet Tracer (on PC).
Type: ping 192.168.1.11
If you get replies, the network is successfully configured!

Configuring Topologies :
A) Bus Topology :

B) Star Topology :

29
C) Ring Topology :

D) Mesh Topology :

30
E) Tree Topology :

F) Hybrid Topology :

31
Result :
● Packet Tracer is a virtual lab for practicing real-world network setups.
● Learned how devices are connected and how data flows in a network.
● Configured various Topologies and their features.

Conclusion : We have Configured a Network topology using packet tracer software


Successfully.

32
PRACTICAL - 6
Aim : To Configure a Network using Distance Vector Routing protocol.

Apparatus Required :

● Cisco Packet Tracer or GNS3 simulation software.


○ Computer/Laptop.
○ Routers (virtual).
○ Switches and PCs (optional, for end-to-end testing).
○ Cabling.

Theory:

Distance Vector Routing is a routing method where routers share information about
the entire network with their neighbors.
Each router tells its neighbors how far (in number of hops) the destination is.
RIP (Routing Information Protocol) is Most common basic Distance Vector Protocol.

→ Key Points About Distance Vector Routing:


● Routers share their entire routing tables with neighbors periodically.
● It uses hop count as the only metric.
● Maximum limit for RIP is 15 hops (beyond that, destination is unreachable).
● Simple but slower than other modern protocols like OSPF.

Working :

# Steps to Configure a Network using RIP (Distance Vector) in Packet Tracer :

1. Set Up the Network


Drag two or more routers.
Connect them with Serial cables or Ethernet cables.
Connect PCs if you want to test communication.

2. Assign IP Addresses
Configure IP addresses on each router's interfaces.
Example on Router1:
enable
configure terminal
interface gig0/0

33
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface gig0/1
ip address 10.0.0.1 255.255.255.252
no shutdown
exit
(Similar configuration on Router2)

3. Enable RIP Routing


On each router:
enable
configure terminal
router rip
version 2
network 192.168.1.0
network 10.0.0.0
exit

4. Verify Configuration
Use these commands:
show ip route → To see the routing table.
show ip protocols → To confirm RIP is running.

5. Test the Network


Use ping from PC1 to PC2.
If Distance Vector Routing is working correctly, the ping will be successful!

Result :

34
#fig 6.1 RIP Distance Routing Algorithm Usage

#fig 6.2 Successfully Packet delivered from one network to another

#Fig 6.3a #Fig 6.3b

Fig 6.3a : Simulation of Packet Deliver from PC1 to PC0

Fig 6.3b : Simulation of Packet Deliver from PC0 to PC1

35
Conclusion : We have Configured a Network using Distance Vector Routing
protocol Successfully.

36
PRACTICAL - 7
Aim : To Configure a Network using Link State Vector Routing protocol.

Apparatus Required :

● Cisco Packet Tracer or GNS3 simulator.


○ Routers (at least 2 or 3).
○ Switches and PCs (optional, for testing).
○ Cables (straight-through and/or cross-over).

Theory:

In Link State routing algorithm, routers build a complete map of the network and calculate
the best path themselves (using algorithms like Dijkstra's algorithm). Also call a OSPF (Open
Shortest Path First).

Link State Routing is different from Distance Vector Routing.


"Instead of trusting my neighbor, I check the entire network and decide the best route myself."

Working :

1. Set Up the Devices


Drag 2 or 3 routers onto the workspace.
Connect them using appropriate cables.
Add PCs if you want to test communication.

Sample layout:
PC1 ---- Router1 ---- Router2-----PC2

2. Assign IP Addresses
Example Addressing:
PC1: 192.168. 1.10/24
Router1 G0/0: 192.168. 1.1/24
Router1 G0/1: 10.0. 0.1/30
Router2 G0/0: 10.0. 0.2/30
Router2 G0/1: 192.168. 2.1/24
PC2: 192.168. 2.10/24

37
3. Configure IP on Routers
Router1 Configuration:
enable
configure terminal
interface gig0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface gig0/1
ip address 10.0.0.1 255.255.255.252
no shutdown
Exit

Router2 Configuration:
enable
configure terminal
interface gig0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
exit
interface gig0/1
ip address 192.168.2.1 255.255.255.0
no shutdown
exit

4. Enable OSPF on Each Router


Router1 OSPF Configuration:
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
exit

Router2 OSPF Configuration:


router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
Exit
router ospf 1
network 10.0.0.0 0.0.0.3 area 0
network 192.168.2.0 0.0.0.255 area 0
exit

Here: 1 is the process ID (can be any number locally).


area 0 is the backbone area of OSPF.

5. Configure PCs

38
Set static IPs on PCs.
Set the Default Gateway of each PC to its router's IP address.

6. Verify the Configuration


Use the following commands:
show ip route → Check if OSPF routes are installed.
show ip ospf neighbor → Check if neighbor relationships are formed.

We will see routes learned through OSPF in Simulation!

# Difference Between OSPF and RIP


Feature RIP (Distance Vector) OSPF (Link State)

Speed Slow (periodic updates) Fast (triggered updates)

Metric Hop Count Cost (Bandwidth)

Scalability Low High

Updates Send full routing table Send only changes

Protocol Type Distance Vector Link State

Result :

#fig 6.1 RIP Distance Routing Algorithm Usage

39
#Fig 7.2 : Simulation of Packet Deliver from PC1 to PC0

#Fig 7.3 : Simulation of Packet Deliver from PC0 to PC1

#fig 7.4 Successfully Packet delivered from one network to another

Conclusion : We have Configured a Network using Link State Vector Routing


protocol Successfully.

40
PRACTICAL - 8
Aim : To Perform File Transfer in Client & Server Using TCP/IP.

Apparatus Required :

● Cisco Packet Tracer (for simulation)


○ Two computers (or two virtual devices)
○ LAN cables and a Switch (optional)

OR

● Real computers with:


○ Command Prompt / Terminal
○ FTP server installed (like FileZilla Server)
○ OR simple Python TCP programs.

Theory:
TCP (Transmission Control Protocol) / IP (Internet protocol) ensures reliable
delivery of data from client to server. It is a set of communication rules (protocols)
that computers follow to talk to each other over a network, like the Internet.
● 👉 Server waits for a connection.
● 👉 Client connects to server and sends/receives files reliably over TCP.

In this experiment, we simulate how files are transferred over a TCP/IP network
"Client requests a file → Server sends it reliably using TCP connection."

TCP/IP Works Steps :


● You send data (example: message, file, webpage request).
● TCP splits the data into smaller parts called packets.
● IP adds a "destination address" to each packet.
● Packets travel through different routers across the network.
● At the destination, TCP checks and reassembles the packets correctly.

Concept Meaning

TCP Ensures reliable connection and delivery

IP Identifies devices across the network

FTP A protocol that uses TCP for file transfer

41
Socket Programming endpoint for TCP communication

Working :

# Ways to Perform TCP/IP File Transfer

A) : Using FTP (File Transfer Protocol)


FTP is based on TCP and used for transferring files.

Steps:
1. Set up FTP Server on one PC:
i. Install FileZilla FTP Server.
ii. Create a user and share a folder.
2. Client PC:
a. Open Command Prompt.
b. Connect to server using:ftp [server IP
address] Example:
ftp 192.168.1.100
3. Login with username and password.
4. Use FTP commands:
ls → list files
get filename → download a file
put filename → upload a file
(This uses TCP Port 21 by default.)

B) : Using Cisco File Tracer Software :

1. Open Packet Tracer


Start Cisco Packet Tracer software.

2. Place Devices
Drag 2 PCs and 1 Switch onto the workspace.

3. Connect Devices
Use Copper Straight-Through cables to connect:
PC1 → Switch → PC2
4. Assign IP Addresses
Example:
PC1 → IP: 192.168.1.1, Subnet Mask: 255.255.255.0
PC2 → IP: 192.168.1.2, Subnet Mask: 255.255.255.0
(Set IP by clicking PC → Desktop → IP Configuration.)

42
5. Enable FTP Server
On PC1:
Go to Desktop → Services → FTP.
Turn FTP Service ON.
Add a user account and file to share.

6. Connect to Server from Client


On PC0:
Open Command Prompt. Type :
ftp 192.168.1.2
Login using the username and password you set.

7. Transfer Files
Use FTP commands:
ls → See files
get filename → Download file
put filename → Upload file

Result :

#Fig 8.1 : Server and Client Sides

43
#Fig 8.2 : Saving a File “hello.txt” in PC1

#Fig 8.3 : Creating Username, Password on FTP server

#Fig 8.4 : Uploading a File “hello.txt” in Server

44
#Fig 8.5 : Logging & Downloading a File “hello.txt” in PC1

#Fig 8.6 : Logging & Downloading a File “hello.txt” in PC0

45
#Fig 8.6 : Checking Directory in PC0

#Fig 8.6 : Checking Directory Files in FTP Server


Conclusion : We have Performed the File Transfer in Client & Server Using TCP/IP
Successfully.

46

You might also like