Computer Network Practical File
Computer Network Practical File
.
EXPERIMENT-1
OBJECTIVE:
Study of different types of Network cables and Practically implement the cross-wired
cable and straight through cable using clamping tool.
APPARATUS:
PROCEDURE:
1. 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.
1. Coaxial Cables: This cable was invented at late 1880’s, which is used to connect
the television sets to home antennas. This cable is used to transfer the information in
10 mbps. The cable is divided into thinnet and thicknet cables. These cables have a
copper wire inside and insulation is covered on the top of the copper wire to provide
protection to the cable. These cables are very difficult to install and maintain, because
they are too big to carry and replace. The coaxial cable got its name by the word
“coax”. Nowadays coaxial cables are also used for dish TV where the setup box and
the television is connected using the coaxial cable only. Some of the cable names are
Media Bridge 50-feet Coaxial cable, Amazon basics CL2-Rated Coaxial cables, etc.
See Figure 13.2
2. Twisted Pair Cables: It is type of cable with two or more insulated wires twisted
together. It started with a speed of 10 mbps (10BASE-T cable is used). Then the
cable was improved and the speed was higher and went to 100 mbps and the cable
was renamed as 100BASE-TX. Then finally the cable was improved to 10 gbps and
named as 10GBASE-T. This twisted cable has 8 wires which are twisted to ignore
electromagnetic interference. The eight wires cannot be placed in a single unit as
there can be difficulty in space, so it is twisted to make it one wire. There are two
types of twisted pair cables, Unshielded Twisted Pair (UTP) and Shielded Twisted
pair (STP). The UTP is used nowadays as modern cables for Internet and they are
lower in cost and installation and maintenance is easy compared to the coaxial cables.
STP is similar to UTP, but it is covered by an additional jacket to protect the wires
from External interference. See Figure 13.3
3. Fiber Optics: This cable is different from the other two cables. The other two
cables had an insulating material outside and the conducting material like copper
inside. But in this cable it is strands of glass and pulse of light is used to send the
information. They are mainly used in Wide Area Network (WAN). The WAN is a
network that extends to very large distance to connect the computers. One example of
WAN is Internet. These cables are placed in deep underground to avoid any damage
to the cables. The optic cable uses light to transmit the information from one place to
another. There are two types of fiber optic cables available, One is single-mode
(100BaseBx) another one is Multimode (100BaseSX). Single-mode cables are used
for long distance transmission and at a high cost whereas the multimode cables are
used for short distance transmission at a very low cost. The optic cables are easy to
maintain and install. See Figure 13.4
4. USB Cables: The Universal Serial Bus are used to connect keyboard, mouse and
other peripheral devices. But there are some special network devices used to connect
the Internet through the USB called dongles. The dongle is a small peripheral device
which has a compatible of mobile broadband with a slim slot in it and connects the
Internet and acts as a modem to the computer. See Figure 13.5
The latest version of USB is USB 3.0 which has the data transfer rate 4.85 Gbps. But
USB 2.0 has just 480 Mbps.
Micro USB is a miniaturized version of the USB used for connecting mobile devices
such as smart phones, GPS devices and digital cameras.
5. Serial and Parallel cables: Earlier in 1980s to 1990s the Ethernet and the USB
were not developed. Then the Serial and Parallel interface cables were used to
connect the Internet to the system. They were sometime used for PC to PC
networking. Before the USB emerged, the system will have both serial port and
parallel port. The serial port will send 1 bit at one time whereas the parallel port will
send 8 bit at one time. The parallel cables are used to connect to the printer and other
disk drivers. RS232 is one type of serial cable, also known as Null modem cable. See
Figure 13.6
6. Ethernet Cables: Ethernet cable is the most common type of network cable
mainly used for connecting the computers or devices at home or office. This cable
connects wired devices within the local area network (LAN) for sharing the resources
and accessing Internet.
The Crossover Ethernet cable is an example of the Null modem Cables. This cable is
used to join two PCs or two network devices of the same type. This cable is the
sophisticated Ethernet cable used to connect the Internet to the system. This cable
works at a speed of 10 gbps and more. The Ethernet crossover cable is identical on
both the ends. Nowadays Routers are being connected through the crossover cables to
provide wireless network from the local network. See Figure 13.7
Just like the crossover cable, RS-232 cable is also used for interconnecting two
computers without modem. So it is also a null modem cable. A cable interconnecting
two devices directly is known as a null modem cable.
OBJECTIVE:
Study of Network Devices in Detail.
THEORY:
Network Devices
Networking hardware, also referred to as network equipment or computer networking
devices, are electronic devices that allow important network devices on a computer
network to communicate with one another.
Computers, printers, and other electronic devices can connect to a network via network
devices. Many gadgets employ the same and different networks to send data quickly,
safely, or accurately. There are both inter-network and intra-network network devices
available. Specific components, including a network interface card or an RJ45 connection,
were installed on the device, while others, such as a router or switch, are meaning of the
art of the network. Let’s take a deeper look at the meaning of network devices and many
types of network equipment. This issue must be studied to gain a better understanding. So
let’s get started talking about network devices’ meaning.
Hub
The physical layer could be used to operate a repeater. This device’s primary purpose is
to duplicate the signal on a similar network before it becomes weak or broken. The critical
thing to remember about these gadgets is that they don’t boost the signal. They recreate
the signal at its actual power whenever it becomes weak. A repeater is a gadget with two
ports.
Bridge
Network Switch
A switch and a hub generally operate at the same LAN layer, but a switch is more
intelligent than a hub. The hub transmits data, but the switch filters and forwards it. As a
result, this is the most creative data packet handling method. When something is received
from the switch’s interface, a data packet can be filtered and forwarded to the indicated
receiver’s interface. As a result, a switch keeps track of system settings in a content
addressable memory table, including memory. The FIB or the forwarding table are other
names for this table.
Brouter
The Brouter is also known as a bridging router, and its primary function is to combine the
functions of both a router and just a bridge. It can operate at either the network or data link
layer. When it functions as a router, it routes packets across networks, and then when it
functions as a bridge, it filters LAN traffic.
Gateway
A gateway works at the OSI model’s session and transport layers. TCP/IP and other
networking protocols are transformed through gateways. They’re connected to two or
more independent networks, each with its domain name service, routing algorithm,
topology, and network administration, including policy procedures. Gateways execute all of
the functions that routers do. A gateway is a router that also has the capability of
converting traffic. As a result, a protocol converter is used to switch between network
technologies.
Conclusion
A network device, such as a fax machine or printer, is a type of equipment that connects
devices or computers to transfer resources or files. A network consists of two or more
computer systems connected by a telecommunications system to talk and share
resources. Companies would not be able to share resources and enhance efficiency as
effectively if they did not have a network. I hope now you got all the necessary information
about network devices meaning. For better understanding, you must read this topic
thoroughly to know some of the important network devices.
EXPERIMENT-3
OBJECTIVE:
Study of network IP.
THEORY:
IP address is an address having information about how to reach a specific host, especially
outside the LAN. An IP address is a 32 bit unique address having an address space of 2 32.
Generally, there are two notations in which IP address is written, dotted decimal notation
and hexadecimal notation.
Dotted Decimal Notation:
Hexadecimal Notation:
Class C:
IP address belonging to class C are assigned to small-sized networks.
The network ID is 24 bits long.
The host ID is 8 bits long.
The higher order bits of the first octet of IP addresses of class C are always set to
110. The remaining 21 bits are used to determine network ID. The 8 bits of host ID
is used to determine the host in any network. The default sub-net mask for class C
is 255.255.255.x. Class C has a total of:
2^21 = 2097152 network address
2^8 – 2 = 254 host address
IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.
Class D:
IP address belonging to class D are reserved for multi-casting. The higher order bits
of the first octet of IP addresses belonging to class D are always set to 1110. The
remaining bits are for the address that interested hosts recognize.
Class D does not posses any sub-net mask. IP addresses belonging to class D ranges
from 224.0.0.0 – 239.255.255.255.
Class E:
IP addresses belonging to class E are reserved for experimental and research
purposes. IP addresses of class E ranges from 240.0.0.0 – 255.255.255.254. This
class doesn’t have any sub-net mask. The higher order bits of first octet of class E
are always set to 1111.
Hosts that are located on the same physical network are identified by the network
ID, as all host on the same physical network is assigned the same network ID. The
network ID is assigned based on the following rules:
The network ID cannot start with 127 because 127 belongs to class A
address and is reserved for internal loop-back functions.
All bits of network ID set to 1 are reserved for use as an IP broadcast
address and therefore, cannot be used.
All bits of network ID set to 0 are used to denote a specific host on
the local network and are not routed and therefore, aren’t used.
EXPERIMENT-4
OBJECTIVE:
Connect the computers in Local Area Network.
PROCEDURE:
Before you begin: The agent's Technician Group must have Connect On
LAN permission.
Restriction: The Connect On LAN feature is not available for Technician Console for Mac.
1. On the Session Toolbar, click the Computers icon.
2. On the Computers list, click the Connect On LAN tab to see a list of accessible
computers.
3. Filter computers by name or IP address.
Tip: You can search and connect at any time. You do not need to wait for the
entire list of computers to load.
4. Select the computer you want to access and click Connect.
Important: If you do not have Administrator rights, you are prompted to enter
the login credentials of the computer you want to access.
Result: The session appears in the Technician Console in Connecting status.
The applet launches on the remote computer and the session starts. The
customer does not have to grant access to the computer, so you can manage it
without customer interaction.
THEORY:
The LAN is a private network that allows devices on it to connect to each other and share
data. It covers a specific area through at least one router. The exact size of that area may
vary from a house to an office to an entire office building. All devices connected to the LAN
share a network connection.
Fun fact: LANs predate the Internet because the primary function is to connect devices for
data sharing—technically no Internet connection is required.
A household LAN likely needs a single router. Larger networks can expand range through
additional routers and switches to connect as many devices as necessary, even bringing
in a dedicated server. It’s the same functionality across the board, just scaled up as
necessary. Business-grade hardware usually has beefed-up security protocols to better
protect the larger network.
Take an office building, for example. You can send files from your computer to another
device like a printer or fax machine without having to directly connect them.
There are a few expansions on LANs:
Wide area network (WAN): Several LANs connected over a larger area with no
restrictions on how far that area extends.
Metropolitan area network: A group of connected LANs in a single metropolitan
area, like a city.
Campus area network (CAN): A group of connected LANs across a school
campus.
For example, a school administrative building will have its own LAN for that building alone.
A separate classroom building will also have its own LAN. But as part of the CAN, the two
LANs can connect to each other to essentially be on the same network.
A more robust LAN, like what you might find at a corporate office.
There are two ways to connect a device to the LAN: Ethernet and WiFi.
Setting up the LAN is the same as setting up your WiFi at home. You just plug in the
modem and router, name your network (SSID), and set a password. Any wirelessly
connected devices just need the password to connect.
EXPERIMENT-5
OBJECTIVE: Study of basic network command and Network configuration
commands.
1.TRACERT COMMAND:- The tracert command is a Command Prompt command that's
used to show several details about the path that a packet takes from the computer or
device you're on to whatever destination you specify.
Tracert Command Option tracert –d :- This option prevents tracert from resolving IP
addresses hostnames to , often resulting in much faster results
5. Nbtstat Command :- Nbtstat is a utility that displays protocol statistics and current
TCP/IP connections using NBT (NetBIOS over TCP/IP), which helps troubleshoot
NetBIOS name resolution issues. Normally, name resolution is performed when NetBIOS
over TCP/IP is functioning correctly. It does this through a local cache lookup, WINS or
DNS server query or through LMHOSTS or hosts file lookup.
Netstat Command Option
1. nbtstat –c :- Lists NBT’s cache of remote machine names and their IP addresses.
6. IPConfig Command :- IPconfig is a console application designed to run from the
Windows command prompt. This utility allows you to get the IP address information of a
Windows computer . It also allows some control over your network adapters, IP addresses
(DHCP-assigned specifically), even your DNS cache
THEORY : In this experiment we are building and implementing a simple star topology.
A star topology is a topology for a Local Area Network (LAN) in which all nodes are
individually connected to a central connection point, like a hub or a switch. A star takes
more cable than e.g. a bus, but the benefit is that if a cable fails, only one node will be
brought down.
PROCEDURE
Step 1: Open Cisco Packet Tracer. Select Hub from Network Devices and place it on
canvas.
Step 2: Select few PCs or Laptops from End Devices and place them on canvas.
Step 3:- Select Automatic Connections from Connections and connect them as shown
below.
Conclusion:- From this experiment, we have learnt how to make a simple star network topology
and implement the same. Similarly, we can also form any network topology like mesh, ring etc.
using Cisco Packet Tracer.
EXPERIMENT-7
PROCEDURE:
1. Develop a Topology shown in figure given below.
2. Configure all Routers
3. Configure all the nodes
4. Implement RIP protocols in Router to configure Network.
Router0 configuration:
CLI MODE:
Router>enable
Router# configure terminal
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to
up
Router(config-if)#exit
Router(config)#interface Serial2/0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#ip address 10.10.0.2 255.0.0.0
Router(config-if)#%LINK-5-CHANGED: Interface Serial2/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router(config-if)#exit
Router# configure terminal
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
GUI Mode:-
Router1 Configuration:
Router>enable
Router# configure terminal
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to
up
Router(config-if)#exit
Router(config)#interface Serial2/0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
ip address 10.10.0.3 255.0.0.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial2/0
Router(config-if)#
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
PROCEDURE:
1. The Dijkstra algorithm follows four steps to discover what is called the shortest path
tree(routing table) for each router:
2. The algorithm begins to build the tree by identifying its roots. The root router’s trees
the router itself.
3. The algorithm then attaches all nodes that can be reached from the root. The
algorithm compares the tree’s temporary arcs and identifies the arc with the lowest
cumulative cost. This arc and the node to which it connects are now a permanent part
of the shortest path tree.
4. The algorithm examines the database and identifies every node that can be reached
from its chosen node. These nodes and their arcs are added temporarily to the tree.
5. The last two steps are repeated until every node in the network has become a
permanent part of the tree.
ALGORITHM:
1. Create a simulator object
2. Define different colors for different data flows
3. Open a nam trace file and define finish procedure then close the trace file, and execute
nam on trace file.
4. Create n number of nodes using for loop
5. Create duplex links between the nodes
6. Setup UDP Connection between n(0) and n(5)
7. Setup another UDP connection between n(1) and n(5)
8. Apply CBR Traffic over both UDP connections
9. Choose Link state routing protocol to transmit data from sender to receiver.
10. Schedule events and run the program.
PROGRAM:
set ns [new Simulator]
set nr [open thro.tr w]
$ns trace-all $nr
set nf [open thro.nam w]
$ns namtrace-all $nf
proc finish { } {
global ns nr nf
$ns flush-trace
close $nf
close $nr
exec nam thro.nam &
exit 0
}for { set i 0 } { $i < 12} { incr i 1 } {
set n($i) [$ns node]}
for {set i 0} {$i < 8} {incr i} {
$ns duplex-link $n($i) $n([expr $i+1]) 1Mb 10ms DropTail }
$ns duplex-link $n(0) $n(8) 1Mb 10ms DropTail
$ns duplex-link $n(1) $n(10) 1Mb 10ms DropTail
$ns duplex-link $n(0) $n(9) 1Mb 10ms DropTail
$ns duplex-link $n(9) $n(11) 1Mb 10ms DropTail
$ns duplex-link $n(10) $n(11) 1Mb 10ms DropTail
$ns duplex-link $n(11) $n(5) 1Mb 10ms DropTail
set udp0 [new Agent/UDP]
$ns attach-agent $n(0) $udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0
set null0 [new Agent/Null]
$ns attach-agent $n(5) $null0
$ns connect $udp0 $null0
set udp1 [new Agent/UDP]
$ns attach-agent $n(1) $udp1
set cbr1 [new Application/Traffic/CBR]
$cbr1 set packetSize_ 500
$cbr1 set interval_ 0.005
$cbr1 attach-agent $udp1
set null0 [new Agent/Null]
$ns attach-agent $n(5) $null0
$ns connect $udp1 $null0
$ns rtproto LS
$ns rtmodel-at 10.0 down $n(11) $n(5)
$ns rtmodel-at 15.0 down $n(7) $n(6)
$ns rtmodel-at 30.0 up $n(11) $n(5)
$ns rtmodel-at 20.0 up $n(7) $n(6)
$udp0 set fid_ 1
$udp1 set fid_ 2
$ns color 1 Red
$ns color 2 Green
$ns at 1.0 "$cbr0 start"
$ns at 2.0 "$cbr1 start"
$ns at 45 "finish"
$ns run
NAME OF FACULTY: SANJANA SHARMA
SIGNATURE:
DATE: