CN Practical File
CN Practical File
Requirement:
RJ-45 connector, Clipping Tool, Twisted pair Cable
Theory:
Introduction:
Straight through cables, also known as patch cables, are network cables used to connect different
types of devices. These cables have identical wiring on both ends, meaning each pin on one end of
the cable connects to the corresponding pin on the other end. This type of wiring configuration is
typically used for connecting:
1. Computers to network switches
2. Computers to hubs
3. Network switches to routers
4. Other devices that are different types (e.g., a computer to a printer with a network interface)
Straight through cables are most commonly used in local area networks (LANs) to connect devices
within the same network. They ensure that data is transmitted correctly between devices by aligning
the transmit and receive signals properly. The standard wiring for a straight through cable is usually
based on the T568A or T568B standards.
Procedure:
To do these practical following steps should be done:
1. Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be very careful at
this point, as to not nick or cut into the wires, which are inside. Doing so could alter the
characteristics of your cable, or even worse render is useless. Check the wires, one more time for
nicks or cuts. If there are any, just whack the whole end off, and start over.
2. Spread the wires apart but be sure to hold onto the base of the jacket with your other hand. You do
not want the wires to become untwisted down inside the jacket. Category 5 cable must only have
1/2 of an inch of 'untwisted' wire at the end; otherwise, it will be 'out of spec'. At this point, you
obviously have ALOT more than 1/2 of an inch of un-twisted wire.
3. You have 2 end jacks, which must be installed on your cable. If you are using a pre-made cable,
with one of the ends whacked off, you only have one end to install - the crossed over end. Below
are two diagrams, which show how you need to arrange the cables for each type of cable end.
Decide at this point which end you are making and examine the associated picture below.
Application:
Straight through cables are commonly used in networking to connect different types of devices.
Here are some specific applications:
1. Connecting Computers to Network Switches:
Used to link computers to switches in a local area network (LAN), enabling multiple
devices to communicate within the same network.
2. Connecting Computers to Hubs:
Employed to connect computers to hubs, allowing multiple devices to share a single
network segment.
3. Connecting Network Switches to Routers:
Utilized to connect switches to routers, facilitating the routing of data between different
networks and enabling internet connectivity.
4. Connecting Network Printers to Switches:
Used to connect network printers to switches, allowing multiple computers on the
network to send print jobs to the printer.
5. Connecting Modems to Routers:
Employed to connect modems to routers, enabling internet access for all devices
connected to the router.
6. Connecting Patch Panels to Switches:
Used in structured cabling systems to connect patch panels to switches, providing
organized and efficient cable management in network setups.
7. Connecting Workstations to Wall Outlets:
Employed to connect computers or other devices to network wall outlets, which are
connected to the network infrastructure.
These cables are essential for ensuring proper data transmission and communication between
network devices, maintaining network efficiency and reliability.
Requirement:
RJ-45 connector, Clipping Tool, Twisted pair Cable.
Theory:
Introduction:
A crossover cable is a type of Ethernet cable used to connect two similar devices directly,
without the need for a network switch or hub. Unlike a straight through cable, which has
identical wiring on both ends, a crossover cable has different wiring at each end. Specifically,
the transmit and receive pairs are crossed over, which allows the devices to communicate
directly with each other. This is achieved by wiring one end according to the T568A standard
and the other end according to the T568B standard.
1. Connecting two computers directly: This allows them to communicate and share data
without a switch or router.
2. Connecting two switches or hubs directly: When connecting network infrastructure devices
without using an uplink port.
3. Connecting two similar network devices: Such as connecting two routers, two network
switches, or two hubs.
The key difference in wiring between the T568A and T568B standards lies in the arrangement
of the transmit (Tx) and receive (Rx) pairs, ensuring proper alignment for direct device-to-
device communication.
Procedure:
To do these practical following steps should be done:
5. Temporary Networking:
In situations where a temporary network setup is needed, such as in a testing
environment or during equipment setup, crossover cables provide a quick and efficient
solution for direct device connections.
While modern network devices often have Auto-MDI/MDIX capabilities that allow the use of
either straight through or crossover cables, understanding the applications of crossover cables
remains valuable for specific networking scenarios and legacy equipment.
Requirement
Command Prompt and Packet Tracer.
Theory:
Introduction:
The ping command is a network utility used to test the reachability of a host on an Internet
Protocol (IP) network and to measure the round-trip time for messages sent from the originating
host to a destination computer. It is one of the most basic and widely used diagnostic tools in
networking.
Procedure:
Set up the Packet Tracer Environment
Troubleshooting Tips
10. No Response to Ping:
• Verify that the IP addresses are correctly assigned and within the same subnet.
• Ensure that the crossover cable is properly connected in the simulation.
• Check for any simulation errors or warnings in Packet Tracer.
11. Link Lights:
• In the simulation, ensure that the link lights on the Ethernet ports of both PCs are
green, indicating an active connection.
Result:
By following these steps, you have successfully created a network of two computers using Cisco Packet
Tracer and verified their connectivity using the ping command. This exercise is useful for understanding
basic network configurations and troubleshooting in a simulated environment.
PRACTICAL 4
Implementation of Network Commands and Their Outputs
Objective: EXECUTE THE FOLLOWING NETWORK ORIENTED COMMANDS [WITH ALL THEIR OPTIONS] AND
OBSERVE THEIR OUTPUT:
PING
TRACERT
ROUTE
IPCONFIG
ARP
NETSTAT
NBTSTAT
HOSTNAME
Requirement
Command Prompt and Packet Tracer.
Theory:
Introduction:
In the realm of computer networking, understanding and mastering various commands is
essential for troubleshooting, diagnostics, and maintaining network health. This chapter explores
fundamental network-oriented commands, detailing their options and typical outputs.
1. Ping
Command: ping
Function: Used to test connectivity between two nodes (usually a computer and a server) over
an IP network.
Options:
Output Example:
python
Copy code
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
2.Tracert (Traceroute)
Options:
• -d: Do not resolve addresses to hostnames.
• -h max_hops: Maximum number of hops to search for target.
Output Example:
css
Copy code
Tracing route to google.com [172.217.167.110]
over a maximum of 30 hops:
1 1 ms 1 ms 1 ms 192.168.1.1
2 8 ms 8 ms 7 ms 10.10.10.1
1. 9 ms 9 ms 9 ms 68.85.189.1
3.Route
Command: route
Options:
Output Example:
sql
Copy code
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
Options:
Output Example:
yaml
Copy code
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Command: arp
Function: Displays and modifies the ARP cache, which contains IP-to-MAC address mappings.
Options:
Output Example:
sql
Copy code
Interface: 192.168.1.100 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-1a-2b-3c-4d-5e dynamic
6.Netstat
Command: netstat
listening ports.
Output Example:
Copy code
Active Connections
Proto Local Address Foreign Address State
TCP 192.168.1.100:12345 203.0.113.5:80 ESTABLISHED
7.Nbtstat (Windows)
Command: nbtstat
Function: Displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables
for both local and remote computers, and the NetBIOS name cache.
Options:
• -a: Lists the NetBIOS name table of a remote computer.
Output Example:
sql
Copy code
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
REMOTEHOST <00> UNIQUE Registered
WORKGROUP <00> GROUP Registered
8.Hostname
Command: hostname
Function: Displays the name of the current DNS domain and the names of the computers in the
specified domain.
Output Example:
Copy code
mycomputer.example.com
Result:
Each of these commands plays a crucial role in managing and troubleshooting networks,
providing administrators and users with invaluable insights into network connectivity,
configuration, and diagnostics. Mastery of these tools empowers efficient network management
and ensures smooth operation of interconnected systems.
PRACTICAL 5
Requirement
Theory:
Introduction:
A star topology for a Local Area Network (LAN) is one in which each node is connected to a
central connection point, such as a hub or switch. Whenever a node tries to connect with another
node then the transmission of the message must be happening with the help of the central node.
The best part of star topology is the addition and removal of the node in the network but too
many nodes can cause suffering to the network.
In this article, we will discuss How to Implement Star Topology using Cisco Packet Tracer.
A Cisco packet tracer is a simulation tool that is used for understanding the networks. The best
part of the Cisco packet tracer is its visualization you can see the actual flow of the message and
understand the workflow of the network devices. Implementation of Star Topology using Cisco
Packet Tracer is done using Switch.
Now to check whether the connections are correct or not try to ping any device and the image
below is doing the same.
To do ping one terminal of one device and run the following command:
Command:
ping 192.168.1.4
Result:
In this chapter, we covered the steps to create a star topology network with NNN nodes using
Cisco Packet Tracer and verify their connectivity using the ping command. By following this
guide, you should be able to set up a star network efficiently in a virtual environment and
troubleshoot any connectivity issues that may arise.
Star topology provides a robust and manageable network structure, making it a popular choice
for both small and large networks. With the knowledge gained from this chapter, you can
confidently implement and maintain a star topology network in various environments.
PRACTICAL 6
Objective: CONFIGURATION IMPLEMENTATION OF THE DATA LINK LAYER FRAMING METHOD SUCH AS
CHARACTER STUFFING AND BIT STUFFING
Requirement: Command Prompt and Packet Tracer.
Theory:
Introduction:
The Data Link Layer of the OSI model is responsible for framing, error detection, and flow control in a
network. Two common methods for framing data at this layer are character stuffing and bit stuffing.
These methods ensure that the data sent across the network is properly framed and that special
characters or bit patterns within the data do not interfere with the framing process.
Framing is the process of breaking down data into manageable units (frames) for transmission over a
network. It includes adding header and trailer information to the data.
Character Stuffing
Character stuffing involves inserting special characters into the data to distinguish frame boundaries.
This method is typically used with text data.
• Flag: A special character (e.g., FLAG) used to denote the beginning and end of a frame.
• Escape: A special character (e.g., ESC) used to escape the FLAG character within the data.
The framing method gets around the problem of resynchronization after an error by having each
frame start with the ASCII character sequence DLE STX and the sequence DLE ETX. If the
destination ever losses the track of the frame boundaries all it has to do is look for DLE STX or
DLE ETX characters to figure out. The data link layer on the receiving end removes the DLE
before the data are given to the network layer. This technique is called character stuffing.
Program Algorithm:
Begin
Step 1: Initialize I and j as 0
Step 2: Declare n and pos as integer and a[20],b[50],ch as character
Step 3: read the string a
Step 4: find the length of the string n, i.e n-strlen(a)
Step 5: read the position, pos
Step 6: if pos > n then
Step 7: print invalid position and read again the position, pos
Step 8: endif
Step 9: read the character, ch
Step 10: Initialize the array b, b[0…5] as ’d’, ’l’, ’e’, ’s’, ’t’,’x’ respectively
Step 11: j=6;
Step 12: Repeat step[(13to22) until i<n
Step 13: if i==pos-1 then
Step 14: initialize b array,b[j],b[j+1]…b[j+6] as‘d’, ‘l’, ‘e’ ,’ch, ’d’, ‘l’,‘e’ respectively
Step 15: increment j by 7, i.e j=j+7
Step 16: endif
Step 17: if a[i]==’d’ and a[i+1]==’l’ and a[i+2]==’e’ then
Step 18: initialize array b, b[13…15]=’d’, ‘l’, ‘e’ respectively
Step 19: increment j by 3, i.e j=j+3
Step 20: endif
Step 21: b[j]=a[i]
Step 22: increment I and j;
Step 23: initialize b array,b[j],b[j+1]…b[j+6] as‘d’, ‘l’,‘e’,’e’,‘t’, ‘x’,‘\0’ respectively
Step 24: print frame after stuffing
Step 25: print b
End
PRACTICAL 7
Implementation of Configuring a Router
Theory:
Introduction:
In this chapter, we will explore how to configure a router using Cisco Packet Tracer, a
powerful network simulation tool, and perform basic routing configuration that could be
mirrored in a Linux environment. Packet Tracer allows for the design, configuration, and
troubleshooting of network setups in a virtual environment, making it an ideal tool for
learning and experimentation.
Objectives
1. Understand the basics of router configuration.
2. Use Cisco Packet Tracer to configure a router.
3. Simulate basic network routing using Packet Tracer.
Prerequisites
Before proceeding, ensure you have the following:
1. Add a Router:
• In the device list, select Routers.
• Drag and drop a router (e.g., 1941) into the workspace.
3. Add a Switch:
On Computers
On the Router
plaintext
Copy code
Router> enable
Router# configure terminal
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
Router# copy running-config startup-config
Ensure the GigabitEthernet0/0 interface shows the correct IP address and status as up.
plaintext
Copy code
ping
192.168.1.1
plaintext
Copy code
ping
192.168.1.3
PRACTICAL 8
Implementation of Configuring a Switch
Objective: CONFIGURE SWITCH IN LINUX WITH PACKET TRACER CISCO SIMULATOR.
Requirement
Command Prompt and Packet Tracer.
Theory:
Introduction:
In this chapter, we will explore the process of configuring a switch in a Linux environment
using Cisco's Packet Tracer. Cisco Packet Tracer is a powerful network simulation tool that
allows users to create network topologies and emulate modern computer networks. It is an
essential tool for anyone looking to learn about network design, configuration, and
troubleshooting.
Step 1
Add one Cisco Router, two Cisco Switches, and four PCs to the program’s workspace. Then,
note the port and slot numbers of the Router’s GigabitEthernet interfaces in the workspace.
Step 2
In the Cisco router CLI window, assign an IP address to the GigabitEthernet0/0 interface and
execute the no shutdown command to activate the interface.
Step 3
After configuring the GigabitEthernet0/0 interface, the port will be green. The meaning of this
colour is that the interface is active and working.
Step 4
To assign an IP address to the GigabitEthernet 0/1 interface and activate the port, perform the
following commands:
Step 5
In the following image, you can see that the Router’s GigabitEthernet ports are connected to
the Switches and are active.
Step 6
Now, you need to assign an IP address to the computers that you add to the topology. To do
this, click on the PC to which you will assign an IP, and on the Desktop tab, click IP
Configuration.
Then, it would be best if you addressed the PC according to the IP block of the network on
which the network is. According to the topology above, assign an IP address from block
192.168.1.0/24 as PC0 is connected to the network under the Router’s Gig0/0 interface.
Configure the IP address, subnet mask, and default gateway settings for PC0 as in the
following image.
Step 7
Click Command Prompt on PC0, and then ping the Cisco Router Gig0/0 default gateway
totest the network connection.
Step 8
This time, the TCP/IP settings of PC3 on the 192.168.2.0/24 network are configured as
follows.
Step 9
When you ping the GigabitEthernet0/1 interface (default gateway) via PC3, you can also see
that the operation was successful.
Step 10
Likewise, suppose you ping the Router’s GigabitEthernet0/1 interface via PC0. In that case,
the operation will still be successful because one Router’s main task is to communicate with
each other the different networks connected to it.
Step 11
Step 12
You can examine the MAC addresses of computers when you execute the show arp command
at the Cisco router CLI command prompt.
Result:
By following the steps outlined in this chapter, you should now have a basic understanding of how to
configure a switch in a Linux environment using Cisco Packet Tracer. This knowledge is crucial for
managing and troubleshooting network devices in real-world scenarios.
PRACTICAL 9
Bit Stuffing
Objective: Bit stuffing involves inserting non-information bits into the data to break up
patterns that could be misinterpreted as frame delimiters.
Flag Sequence: A specific sequence of bits (e.g., 01111110) used to denote the beginning and
end of a frame.
Stuffed Bit: A bit inserted to ensure that the flag sequence does not appear within the data.
The new technique allows data frames to contain an arbitrary number of bits and allows
character codes with an arbitrary no of bits per character. Each frame begins and ends
with the special bit pattern, 01111110, called a flag byte. Whenever the sender's data link
layer encounters five consecutive ones in the data, it automatically stuffs a 0 bit into the
outgoing bit stream. This bit stuffing is analogous to character stuffing, in which a DLE is
stuffed into the outgoing character stream before DLE in the data.
Pro
gram Algorithm:
Begin
Step 1: Read frame length n
Step 2: Repeat step (3 to 4) until i<n(: Read values into the input frame (0’s and
1’s) i.e.
Step 3: initialize I i=0;
Step 4: read a[i] and increment i
Step 5: Initialize i=0, j=0,count =0
Step 6: repeat step (7 to 22) until i<n
Step 7: If a[i] == 1 then
Step 8: b[j] = a[i]
Step 9: Repeat step (10 to 18) until (a[k] =1 and k<n and count <5)
Step 10: Initialize k=i+1;
Step 11: Increment j and b[j]= a[k];
Step 12: Increment count ;
Step 13: if count =5 then
Step 14: increment j,
Step 15: b[j] =0
Step 16: end if
Step 17: i=k;
Step 18: increment k
Step 19: else
Step 20: b[j] = a[i]
Step 21: end if
Step 22: increment I and j
Step 23: print the frame after bit stuffing
Step 24: repeat step (25 to 26) until i< j
Step 25: print b[i]
Step 26: increment i
End
Result: