Computer Network and Security Lab File
Computer Network and Security Lab File
ESSENTIONAL LAB
CAP4005L
School of Engineering
Department of Computer Science and Engineering
Submitted By
Student Name Vishal kumar meena
Enrollment Number 230160307042
Programme Masters in Computer Application
Department Computer Science and Engineering
Session/Semester 2023-2025/First Semester
Submitted To
Faculty Name Mr. Susheel Kumar
INDEX
S. No. Date Aim the Experiment Page No. Signature
Aim - Familiarization with Transmission media and Tools: Coaxial cable, UTP Cable,
Crimping tool, Connectors etc. and preparing straight and cross cables.
Familiarization with transmission media and tools like coaxial cables, UTP (Unshielded Twisted Pair)
cables, crimping tools, connectors, and preparing straight and cross cables is important for anyone
working with computer networks, telecommunications, or audio/video systems. Here's a brief
overview of each component and how to prepare straight and cross cables using UTP cables:
1. Coaxial Cable:
• Coaxial cable is commonly used for cable television and broadband internet connections.
• It consists of a central conductor, an insulating layer, a metallic shield, and an outer insulating
layer.
• Coaxial cables are suitable for high-frequency transmission.
2. UTP Cable (Unshielded Twisted Pair):
• UTP cables are widely used for Ethernet networking (e.g., Cat5e, Cat6, Cat6a, Cat7).
• They consist of twisted pairs of copper wires with no shielding.
• UTP cables come in different categories, with Cat5e and Cat6 being common for general
networking.
3. Crimping Tool:
• A crimping tool is used to attach connectors to the ends of Ethernet cables.
It allows you to secure the cable wires to the connectors, ensuring a proper connection.
4. Connectors:
RJ45 connectors are commonly used for UTP cables in Ethernet networks.
• They have eight pins (or conductors) and are used for both straight-through and crossover
cables.
Preparing a Straight Ethernet Cable (RJ45):
a straight- To create through Ethernet cable, follow these steps:
1.Gather your materials: UTP cable, RJ45 connectors, and a crimping tool.
2.Strip about 1 inch (2.5 cm) of the outer insulation from the UTP cable using a cable stripper.
3.Untwist and straighten the pairs of wires inside the cable.
4.Arrange the wires in the following order (from left to right) for both ends:
1)Orange-White
2)Orange
3)Green-White
4)Blue
5)Blue-White
6)Green
7)Brown-White
8)Brown
1.Insert the wires into the RJ45 connector in the same order and make sure they reach the end of the
connector.
2.Use the crimping tool to crimp the connector onto the cable, ensuring a secure connection.
3.Repeat the process for the other end of the cable, and you've created a straight Ethernet cable.
Preparing a Crossover Ethernet Cable (RJ45):
To create a crossover Ethernet cable, which is used for connecting two similar devices (e.g., two
computers), follow the same steps as above, but swap the wire order for one end. Use the following
order for one end (the other end remains straight-through):
• Orange-White
• Orange
• Green-White
• Blue
• Blue-White
• Green
• Brown-White
• Brown
Creating a crossover cable allows you to connect two devices directly without the need for a hub or
switch.
Make sure to test your cables using a cable tester to ensure they are functioning correctly before
deploying them in your network.
Experiment - 2
Experiment – 3
Aim - Configure a network through routing information protocol using packet tracer
Certainly, I can guide you through configuring a network using the Routing Information Protocol
(RIP) in Packet Tracer. RIP is a simple and widely used routing protocol. Here's a step-by-step guide
to set up a basic network with two routers and RIP routing protocol using Packet Tracer:
Note: Before you start, make sure you have Packet Tracer installed and open it.
1. Create Network Topology:
• Open Packet Tracer.
• Drag and drop two routers (e.g., Cisco 2811) from the device panel onto the
workspace.
• Connect them with a crossover cable (use the copper straight-through cable).
• Add a PC (e.g., a generic laptop) to each router to serve as the host devices.
2. Configure Router Interfaces:
• Double-click on Router1 to open the CLI (Command Line Interface).
• Enter privileged exec mode by typing enable and configure the interfaces:
code
configure terminal
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface Serial0/0/0
ip address 10.0.0.1 255.0.0.0
no shutdown
exit
• Repeat the same steps for Router2, but use IP addresses appropriate for Router2's
interfaces (e.g., 192.168.2.1 and 10.0.0.2).
3. Configure RIP Routing:
• On Router1, enter global configuration mode and configure RIP:
code
configure terminal
router rip
version 2
network 192.168.1.0
network 10.0.0.0
exit
configure terminal router rip version 2 network 192.168.1.0 network 10.0.0.0 exit
• Repeat the same configuration on Router2, but use the network addresses relevant to
Router2.
4. Testing:
• You can test the connectivity between devices by using the ping command on the
PC's command prompt.
Code :
ping 192.168.2.1 // From PC1 to Router2's interface
ping 192.168.1.1 // From PC2 to Router1's interface Router1's interface
If the configuration is done correctly, you should be able to ping between devices within the network.
Experiment – 4
Configuring Open Shortest Path First (OSPF) in Packet Tracer involves setting up a more advanced
routing protocol compared to RIP. OSPF is commonly used in larger networks. Here's how to
configure OSPF on two routers using Packet Tracer:
Note: Make sure you have Packet Tracer installed and open it.
1.Create Network Topology:
Open Packet Tracer.
• Drag and drop two routers (e.g., Cisco 2811) from the device panel onto the work
space.
• Connect them with a crossover cable (use the copper straight-through cable).
• Add a PC (e.g., a generic laptop) to each router to serve as the host devices.
2.Configure Router Interfaces:
• Double-click on Router1 to open the CLI.
• Enter privileged exec mode by typing enable and configure the interfaces:
code
co configure terminal
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface Serial0/0/0
ip address 10.0.0.1 255.0.0.0
no shutdown
exit
Repeat the same steps for Router2 but use IP addresses appropriate for Router2's interfaces
(e.g., 192.168.2.1 and 10.0.0.2).
2.Configure OSPF Routing:
On Router1, enter global configuration mode and configure OSPF:
code
co configure terminal
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 10.0.0.0 0.255.255.255 area 0
exit
Repeat the same configuration on Router2 with appropriate network addresses and area settings.
3. Testing:
You can test the connectivity between devices by using the ping command on the PC's command
prompt.
vbnet code
ping ping 192.168.2.1 // From PC1 to Router2's interface
ping 192.168.1.1 // From PC2 to Router1's interfaceRouter1's interface
If the configuration is done correctly, you should be able to ping between
devices within the network.
Experiment – 5
ARP (Address Resolution Protocol) and RARP (Reverse ARP) are used to map between IP addresses
and MAC (Media Access Control) addresses. Below is a simple C program that simulates ARP and
RARP protocols. This program allows a device to send ARP and RARP requests to find the MAC
address associated with an IP address and vice versa.
#include <stdio.h>
#include <string.h>
int main()
{
// Initialize the ARP table with sample entries
struct ARPEntry arpTable[3];
strcpy(arpTable[0].ipAddress, "192.168.1.1");
strcpy(arpTable[0].macAddress, "00:1A:2B:3C:4D:5E");
strcpy(arpTable[1].ipAddress, "192.168.1.2");
strcpy(arpTable[1].macAddress, "11:22:33:44:55:66");
strcpy(arpTable[2].ipAddress, "192.168.1.3");
strcpy(arpTable[2].macAddress, "AA:BB:CC:DD:EE:FF");