CN Practical File
CN Practical File
CN Practical File
Computer Networks
PRACTICAL FILE
SUBMITTEDTO:SUBMITTEDBY:
Mr. Alok Gupta Name:-
AP, CSE Roll no:-
VCE, ROHTAK
INDEX
S.NO CO PROGRAM/EXPERIMENT
1 1 To study the different components of a data communication network, such as sender, receiver,
protocol, and channel.
2 2 To study the characteristics and differences between different types of transmission media, including
twisted-pair, coaxial, and fiber-optic cables.
3 3 Use knowledge of interconnection of cables to create a LAN using cross-wire and straight-wire cables
for data communication in LAN.
4 4 Analyze the results of basic network commands and network configuration commands to troubleshoot
connectivity issues and improve network performance.
5 5 Evaluate the strengths and weaknesses of different network simulation tools like Packet Tracer, NS-2,
and LAN Training System and determine which tool is best suited for a given scenario.
6 6 Design and implement a star topology using the Packet Tracer simulation tool, selecting appropriate
cables and connectors for the devices.
7 6 Implement a point-to-point& star topology using the Packet Tracer simulation tool, configuring the
devices and ensuring connectivity between them.
8 6 Implement a mesh & ring topology using the Packet Tracer simulation tool, selecting appropriate
devices, cables, and connectors and configuring them to ensure proper connectivity.
9 6 Implement a bus& tree topology using the Packet Tracer simulation tool, selecting appropriate
devices, cables, and connectors and configuring them to ensure proper connectivity.
10 6 Create and simulate routing using the Packet Tracer 5.0 tool, selecting appropriate routing protocols
and configuring routers to ensure proper connectivity between networks.
Program No: 1
Aim: To study the different components of a data communication
network, such as sender, receiver, protocol, and channel.
Computer Networks:-
Computer Network is collection of interconnected collection of autonomous computers.
Two Computers are said to be interconnected if they are able to exchange or information or
resources through a medium.
The term Autonomous means independent i.e.no computer can forcibly start or stop the other
computers.
Two computers can be connected by medium but without protocols data communication is not
possible.
⚫ Afile
⚫ Afolder
⚫ Aprinter
⚫ A diskdrive
Sending device is computer or any other device that sends the data or information through medium
whereas receiving device receives the data or information manipulates it and uses it as required.
Minimum two computers are required to establish a network.Oneact as sending device & other act
as receiving device or vice-versa. Mode of transmission depends on theprotocol used.
Hardware Components:
Software Components:
Network Models:
Peer-to-Peer Network
A Peer-to-Peer Network is a network where the computers acts as both workstations and servers.
These networks are good for small, simple, and inexpensive networks. In a strict Peer-to-Peer
Networking setup, every computer is an equal, a peer in the network. Each resources can have
resources that are shared with any other machine. There is no assigned role of any particular
device, and each of the devices usually runs similar software. Any device can and will send
requests to any other.
Peer-to-Peer Network
Client Server Network
In this design a, small number of computers are designated as centralized servers and given task of
providing serviceas to a larger number of users machine calledClients.
Server Computer is a core component of the network, providing a link to the resources necessary
to perform any task. The link it provides could be to a resource existing on the server itself or a
resource on client computer. Client computers normally requests and receive information over the
network client. Client computers also depends primarily on the central server for processing
activities.
A local area network (LAN) is a computer network covering a small geographic area, like a home,
office, or group of buildings. LANs connect computers and peripheral devices in a limited physical
area, such as a business, office,laboratory or college campus by means of permanent links (wires)
that transmit data rapidly. A LAN consists of two or more personal computer, printers and high
capacitydisk storage device called file servers, which enable each computer on the network to
access a common offiles.
⚫ Wide Area Network (WAN) is a computer network that covers a broad area (i.e., any
network whose communications links cross metropolitan, regional, or national boundaries).
Or, less formally, a network that uses routers and public communications links
⚫ WANs are used to connect LANs and other types of networks together, so that users and
computers in one location can communicate with users and computers in otherlocations
Metropolitan Area Network (MAN):
o A metropolitan area network (MAN) is a network that interconnects users with computer
resources in a geographic area or region larger than that coveredby even a large local area
network (LAN) but smaller than the area covered by a wide area network (WAN). The term
is applied to the interconnection of networks in a city into a single larger network (which
may then also offer efficient connection to awide area network).Itis also used to mean the
interconnection of several local area networks by bridging them with backbone lines. The
latter usage is also sometimes referred to as a campusnetwork.
➢ DataSharing
➢ HardwareSharing
➢ Internet Access
➢ Internet AccessSharing
➢ Entertainment
Network Devices:
Repeater –
Connecting device that operates only in the physicallayer:
Connects only segments of the same LAN segments must run the same protocol
Has nofiltering capability every frame received will be regenerated (not amplified) and
forwarded
Location of a repeater is crucial –repeater must be placed so that a signal reaches it before noise
changes the meaning of any of its bits
Passive hubs: simply send signal to all connected hosts, without amplifying it
Active hubs: are connected to electric power source, and are used to refresh the signal sent to all
ports
Bridge-
1. Connecting device thatoperates in both physical & data linklayer.
3. As a data link layer device, bridge checks physical / MAC addresses (both source and
destination) inframes.
4. If frame sent in LAN 1 is destined for a device on LAN 2 –receive and forward the frame;
otherwise ignore theframe.
Anetworkinterfacecardprovidesthecomputerwithadedicated,full-timeconnectiontoa
network.Personalcomputersandworkstationsonalocalareanetwork(LAN)typicallycontaina
networkinterfacecardspecificallydesignedfortheLANtransmissiontechnology.
Some NIC cards work with wiredconnections while others are wireless. Most NICs support either wired
Ethernet or Wi-Fiw ireless standards. Ethernet NICs plug into the system bus of the PC and include jacks
for network cables, while Wi-Fi NICs contain built-in transmitters / receivers(transceivers).
In new computers, many NICs are now pre-installed by the manufacturer. All NICs feature a speed rating
such as 11 Mbps, 54 Mbps or 100 Mbps that suggest the general performance ofthe unit.
Program No:2
Advantages
Disadvantages
1. STP wire is that it is physically larger and more expensive than twisted pairwire.
2. STP is more difficult to connect to a terminatingblock.
Coaxial cable
Coaxial cable is the kind of copper cable used by cable TVcompanies between the community
antenna and user homes and businesses. Coaxial cable is sometimes usedbytelephone companies
from their central office to the tele phone poles near users. It is alsowidely installed for use in
business and corporation Ethernetand other types of local areanetwork.
Coaxial cable is called "coaxial" because it includes one physical channel
that carries the signal surrounded (after a layer of insulation) by another
concentric physical channel, both running along the same axis.The outer
channel serves as a ground. Many of these cables or pairs of coaxial tubes can be placed in a
singleouter sheathing and, with repeaters, can carry information for a greatdistance.
Coaxial cable was invented in 1929 and first used commercially in 1941. AT&T established its first
cross-continental coaxial transmission system in 1940. Depending on the carrier technology used
and other factors, twisted paircopper wire and optical fiberare alternatives to coaxialcable.
Advantages
1. Coaxial cable can support greater cable lengths between network devices than twisted pair
cable.
2. Thick coaxial cable has an extra protective plastic cover that help keepmoisture
away.
Disadvantages
1. Thick coaxial is that it does not bend easily and is difficult to install.
Fiber Optics
An optical fiber is a flexible, transparent fiber made of high quality extruded glass (silica) or plastic,
slightly thickerthan a human hair. It can function as a waveguide, or “ light pipe” ,[1]totransmit
light between the two ends of the fiber.[2]The field of applied scienceand engineering
concerned with the design and application of optical fibers is known as fiber optics.
Optical fibers are widely used in fiber-optic communications, which permits transmission over
longer distances and at higher bandwidths (data rates) than other forms of communication. Fibers
are used instead of metal wires because signals travel along them with less loss and are also immune
to electromagnetic interference .Fibers are also used for illumination, and are wrapped in bundles
so that they may be used to carry images, thus allowing viewing in confined spaces. Specially
designed fibers are used for a variety of other applications, including sensors and fiber lasers.
Optical fibers typically include a transparent core surrounded by transparent cladding material with
a lower index of refraction. Light is kept in the core by total internal reflection. This causes the fiber
to act as a waveguide. Fibers that support manypropagation paths or transverse modes are called
multi-mode fibers (MMF), while those that only support a single mode are called single-mode
fibers (SMF). Multi-mode fibers generally have a wider core diameter, and are used for short-
distance communication links and for applications where high power must be transmitted. Single-
mode fibers are used for most communication links longer than 1,000meters.
Advantages
1. One single mode fiber can replace a metal of time larger andheavier.
2. Multi-mode optical cable has a larger diameter and can be used to carry signal
over shortdistance.
Disadvantages
1. Fiber optic versus metal cable is that it is difficult to make connections to
fiber opticcable.
2. The optical fiber must be highly polished to allow light to pass with littleloss.
CONNECTORS
Anelectrical connectoris anelectro-mechanicaldevice for joining electricalcircuitsas an
interfaceusing a mechanical assembly. Connectors consist of plugs (male-ended) and jacks
(female-ended). The connection may be temporary, as for portable equipment, require a tool for
assembly and removal, or serve as a permanent electrical joint between two wires or devices.[1]An
adapter can be used to effectively bring together dissimilarconnectors.
There are hundreds of types of electrical connectors. Connectors may join two lengthsof
flexible copper wireor cable, or connect a wire or cable or optical interface to an electrical
terminal.
In computing, an electrical connector can also be known as a physical interface (compare
Physical Layerin OSI modelof networking). Cable glands, known as cable connectors in the US,
connect wires to devices mechanically rather than electrically and are distinct from quick-
disconnects performing thelatter.
A BNC male connector has a pin that connects to the primary conducting wire and then is locked in
place with an outer ring that turns into locked position.Different sources offer different meanings
for the letters BNC. However, our most knowledgeable source indicates that the B stands for a
bayonet-type connection (as in the way a bayonet attaches to a rifle) and the NC for the inventors
of the connector, Neil andConcleman.
BNCs differ from many connectors because of their snap-lock architecture, which keeps the plug
firmly in itssocket.
BNC CONNECTOR
APPLICATIONS
1. The BNC was originally designed for military use and has gained wide acceptance in video and
RF applications to 2GHz.
2. The BNC connector is used for signal connections suchas:
• analogandserial digital interfacevideosignals
• amateur radioantennas
• aerospace electronics(avionics)
• test equipment.
SC stands for subscriber connector and is a standard-duplex fiber-optic connector with a square
molded plastic body and push-pull locking features. SC connectors are typically used in data
communication, CATV, and telephony environments.
SCCONNECTOR STCONNECTOR
ST stands for straight tip, a high-performance fiber-optic connector with round ceramic ferrules
and bayonet locking features. STconnectors are more common thanSC connectors. You can
generally use SC and ST connectors with either single-mode or multimode fiber-optic cabling.
Coupling receptacles for these connectors come in either panel-mount or free-handing designs. For
narrow space installations, you can get 90-degree boot versions instead of straight versions. SC and
ST connectors come in both simplex and duplexform.
•
RJ-45 CONNECTOR FOR TWISTED PAIR CABLE
RJ45 is a standard type of connector for network cables. RJ45 connectors are most commonly
seen with Ethernetcables and networks.
RJ45 connectors feature eight pins to which the wire strands of a cable interface electrically.
Standard RJ-45 pin outs define the arrangement of the individual wires needed when attaching
connectors to a cable.
Several other kinds of connectors closely resemble RJ45 and can be easily confused for each other.
The RJ-11 connectors used with telephone cables, for example, are only slightly smaller (narrower)
than RJ-45 connectors.
The standard designs for these connector sand their wiring are named RJ11, RJ14, RJ21, RJ35,
RJ45, RJ48, etc. Many of these interface standards are commonly used in North America, though
some interfaces are used world-wide. It is common to find a dash (hyphen) between the RJ and the
number, but the actual standard has no dash or hyphen.
WORKING STEPS
1 Start by stripping of about 2 inches of plastic jacket of the end of the cable. Be very careful at this point
asto not cut into the wires which are inside. Check the wires one or more time for the cuts, if there are any cut
just short the whole process fromstarting.
2 Spreadthewiresapartbutbesuretohold ontothebaseofthejacketwithyour otherhandyoudon’ t want the wires
become untwisted down inside the jacket. Category 5 cable must only have half inch of untwisted wire at the
end. Otherwiseit will be out ofspace.
3 You have two end jacks which must be installed on cables. If you are using premade cable with one of the
endis removed you have only one end toinstall.
Below diagram to show how to arrange the cable for each type of cable end .Beside at this point which end
you are making and examine the associated picturebelow.
Program No:3
Step2.Rightclickon‘
MyNetworkplacesiconslocatedonthedesktopandinthepopupmenu
clickonproperties.YoucanalsofinditthroughtheMyComputerwindow.Alternatively,click
‘
Startfromthetaskbar andrightclickon‘
MyNetworkplacesoptionfromthepopupmenu.In
themenuthatappearsselect‘
Properties
Step3InthenewWindowthatappears,undertheLANorHigh-Speedinternet,righton‘
Local
AreaConnectionandselectpropertiesinthepopupmenuthatappears.
Step 4.Inthe local area connection dialog box that appears under the connection box, scroll
down and select ‘
Internet Protocol (TCP/IP) and click on ‘
Properties.
Step5.ToconfigureyourPC,youcanoptforobtainingtheconfigurationsettingsautomatically
ormanually.Toobtain thesettingsautomatically, select‘
ObtainanIP AddressAutomatically’
.
However,tousethisoption,youwillneedtohaveaDHCPserverthatwillfunctioninallocating and
managing IP address to ensure that there are no conflicts. To configure your PC to the network
manually, follow the procedures listedbelow:
• Clicktheoption‘
UsethefollowingIPAddress’
.EntertheIPaddresstouse.Itisimportantthat youconsult
your network administrator on the IP to use so as to avoid conflicts occurring in the network,
i.e. a situation where two PCs have similar IP addresses. Thereafter, enter theSubnet
MaskandDefaultgateway.#*Thesubnetmaskisusedtoidentifythenetworklevelyouarein while
the default gateway identifies the routerconnection.
• Thereafter, enter the Preferred DNS server and Alternate DNS serveraddress.
• Clickacceptthechangesor‘
cancelexitthesetup.
Step 3. A sharing panel will appear with the option to share with any users on the computer or your
home group. You can also choose to share with "Everyone", which means the files will be accessible
on your local network (basically just in your home) to anyone even if they don't have a password.
This is convenient but not secure. If you want to choose this option, you can find it by click on the
drop downmenu towards the top of the panel.
Step 4. After making your selection, click Share.
After you've clicked Share, Windows will take a moment to set up your new shared folder and it'll
be accessible from other computers on your local network. To access it, simply look for your
computer's name in the Network section on your other computer. When you choose it, you'll have
a new option to connect to thisfolder.
Step 1. Go to My Computer.
Step 5. Enter the name of computer whose shared folder you want to access.
Step 6. Now you can access the shared folder.
Program No:4
Aim:- Analyze the results of basic network commands and network
configuration commands to troubleshoot connectivity issues and improve
network performance.
hostname–ddisplaysthedomainnamethemachinebelongsto
hostname–fdisplaysthefullyqualifiedhostanddomainname
hostname–idisplaystheIPaddressforthecurrentmachine.
2. Ping :- The pingcommandis aCommand Prompt commandused to test the ability of the
source computer to reach a specified destination computer. The ping command is usually
used as a simple way verify that a computer can communicate over the network with another
computer or networkdevice.
Various ping commands
ping [-t] [-a] [-n count] [-l size] [-f] [-r count] [-w timeout]
-t = Using this option will ping the target until you force it to stop using Ctrl-C.
-a = This ping command option will resolve, if possible, the hostnameof an IP addresstarget.
-n count = This option sets the number of ICMP Echo Request messages to send. If you execute
the ping command without this option, four requests will be sent.
-l size = Use this option to set the size, in bytes, of the echo request packet from 32 to 65,527.
The ping command will send a 32 byte echo request if you don't use the -l option.
-f = Use this ping command option to prevent ICMP Echo Requests from being fragmented by
routers between you and the target. The -f option is most often used to troubleshoot Path
Maximum Transmission Unit (PMTU)issues.
-r count = Use this ping command option to specify the number of hopsbetween the your
computer and the target computer or device that you'd like to be recorded and displayed. The
maximum value for count is 9 so use the tracert commandinstead if you're interested in viewing
all hops between two devices.
-w timeout = Specifying a timeout value when executing the ping command adjusts the amount
of time, in milliseconds, that ping waits for each reply. If you don't use the -w option, the default
timeout value is used which is 4000, or 4 seconds.
3. Netstat :- Most useful and very versatile for finding connection to and from the host. You
can find out all the multicast groups (network) subscribed by this host by issuing "netstat -
g"
Netstat-nap|greyportwilldisplayprocessidofapplicationwhichisusingthatport
netstat -a or netstat –all will display all connections including TCP and UDP
netstat--Tcpornetstat–twilldisplayonlyTCP connection
Netstat--udpornetstat–uwilldisplayonlyUDP connection
Netstat -g will display all multicast network subscribed by this host.
4. Nslookup:-If you know the IP address it will display hostname. To find all the IP addresses
for a given domain name, the commandslookup is used. You must have a connection to the
internet for this utility to beuseful.
E.g.nslookup blogger.com
For the purposes of this Web page, the local machine refers to the machine you are
initially logged into, the one on which you type the ftp command. The remote machine is
the other one, the one that is the argument of the ftp command.
ftp machinename
where machine name is the full machine name of the remote machine, e.g.,
purcell.cs.colostate.edu. If the name of the machine is unknown, you may type
ftp machinenumber
7. GetMac:-DOS command used to show both local and remote MAC addresses. When run
with no parameters (i.e.Get \Mac) it displays MAC addresses for the local system. When run
with the /s parameter (e.g. Get Mac /s \\foo) it displays MAC addresses for the remote
computer. When the /v parameter is used, it also displays the associated connection name and
network adaptername.
8. Netsh:-MS-DOS command that enables users to change network settings such as changing
their network device from a dynamic address to a static address or changing the IP address.
Netsh
Enter the netsh command.
netsh dump
Dump all the network information as a script to the screen. Can also be sent to a file by doing
netsh dump >file.txt . This script can then be executed using the exec command.
9. Arp:-Displays, adds, and removesarpinformation from networkdevices.
User : Specifies the user about which you want information. If you omit the Userparameter,
finger displays information about all users on the specifiedcomputer.
@host : Specifies the remote computer running the Finger service where you are looking
for user information. You can specify a computer name or IPaddress.
11. NET:-The netcommandis aCommand Prompt commandthat can be used to manage almost
every aspect of a network and its settings including managing network shares, network print
jobs, network users, and muchmore.
Net Command Syntax:
net [accounts | computer | con-fig | continue | file | group | help | helpmsg | localgroup | name| pause | print | send |
session | share | start | statistics | stop | time | use | user | view]
Net Commands:
Net Accounts:-The net accounts command is used to set password and logon requirements for users. Net
Computer:-The net computer command is used to add or remove a computer from a domain.
Net Con-fig:-Use the net con-fig command to show information about the configuration of the Server or
Workstation service.
Net File:-Net file is used to show a list of open files on a server. The command can also be used to close a
shared file and remove a file lock.
Net Group:-The net group command is used to add, delete, and manage global groups on servers. Net
Help:-The net help command is used to get detailed help on each of the net subset commands. Net
13. Nbtstat:-MS-DOS utility that displays protocol statistics and current TCP/IP connections
usingNBT(NetBIOSoverTCP/IP), which allow the user to troubleshoot NetBIOS name
resolution issues. Normally, name resolution is done when NetBIOS over TCP/IP is
functioning correctly. It does this through local cachelookup.
14. Route:-Command to manually configure the routes in the routingtable.
Aim: Evaluate the strengths and weaknesses of different network simulation tools like Packet Tracer, NS-
2, and LAN Training System and determine which tool is best suited for a given scenario.
NS (from network simulator) is a name for series of discrete event network simulators, specifically
ns-1 ,ns-2 and ns-3. All of them are discrete-event network simulator, primarily used in
research[4]and teaching. ns-3 is free software, publicly available under the GNU GPLv2 license for
research, development, anduse.
The goal of the ns-3 project is to create an open simulation environment for networking research
that will be preferred inside the research community:
• It should be aligned with the simulation needs of modern networkingresearch.
• It should encourage community contribution, peer review, andvalidation of the software.
NS Tool
Ns2 simulation tool :-
In 1996-97, ns version 2 (ns-2) was initiated based on a refactoring by Steve McCanne. Use of
Tclwas replaced by MIT's Object Tcl(OTcl), an object-orienteddialect of Tcl. The core of ns-2 is
also written in C++, but the C++ simulation objects are linked to shadow objects in OTcland
variables can be linked between both language realms. Simulation scripts are written in the
OTcllanguage, an extension of the Tcl scriptinglanguage.
Presently, ns-2 consists of over 300,000 lines ofsource code, and there is probably a
comparable amount of contributed code that is not integrated directly into the main distribution
(many forksof ns-2 exist, both maintained and unmaintained). It runs on GNU/Linux, FreeBSD,
Solaris, Mac OS Xand Windows versions that support Cygwin. It is licensed for use under version
2of the GNU General PublicLicense.
Packet Tracer :-
Cisco Packet Tracer is a network simulation program that allows students to experiment with
network behaviorandask what ifquestio ns. As anintegralpartof theNetworkingAcademy
comprehensive learning experience, Packet Tracer provides simulation, visualization, authoring,
assessment, and collaboration capabilities and facilitates the teaching and learning of complex
technology concepts.
Choosing Devices and Connections:
We will begin building our network topology by selecting devices and the media in which to connect
them. Several types of devices and network connections can be used. For thislab we will keep it
simple by using End Devices, Switches, Hubs, and Connections. We can select various devices
available in the packettracer.
Hubs Switches
Connections
EndDevices WanEmulation
CustomMadeDevices MultiuserConnection
Aim: Design and implement a star topology using the Packet Tracer simulation
tool, selecting appropriate cables and connectors for the devices.
Destination
Aim: Implement a point-to-point& star topology using the Packet Tracer simulation
tool, configuring the devices and ensuring connectivity between them.
Steps to follow to create Point-to-Point topology:-
Aim: Implement a mesh & ring topology using the Packet Tracer simulation tool,
selecting appropriate devices, cables, and connectors and configuring them to
ensure proper connectivity.
Destination
Aim: Implement a bus& tree topology using the Packet Tracer simulation tool,
selecting appropriate devices, cables, and connectors and configuring them to
ensure proper connectivity.
Destination
Acknowledgement
1. Select4computers,2switches,2routersanddragthemoncomputerscreen.
2. UsecopperstraightwiretoconnecttheroutersandPCswithswitchesandcopper-crosswireto
connect therouters.
3. AssigndifferentIPaddressesoalthePCs.
4. SelectaMessageandsenditfromPC0toPC1.
Butherewearenotabletosendthemessagebetweenthecomputersconnectedtodifferent
routers.SoweneedtoperformRouting.
In routing ,we write commands for each routers. The commands are used to make the
connections uplink connected with routers .
For Router0:-
--- System Configuration Dialog ---
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(con-
fig)#interface fa0/0
Router(con-fig-if)#interface fa0/1
Router(con-fig-if)#no shutdown
Router(con-fig-if)#exit
Router(config)#
For Router1:-
--- System Configuration Dialog ---
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(con-
fig)#interface fa0/0
Router(con-fig-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fa0/1
Router(config-if)#no shutdown
Router(con-fig-if)#exit
Router(con-fig)#
After Routing :
Destination
Acknowledgement
Now we are able to sendthe message from PC0 to PC2.