Aarav Computer Networks

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

1

NOIDA INSTITUTE OF ENGINEERING


AND TECHNOLOGY GREATER
NOIDA-201306
(An Autonomous Institute)

COMPUTER SCIENCE & ENGINEERING

Session (2022 – 2023)

LAB FILE
ON
Computer Networks Lab
(ACSE-0652)
(6th Semester)

Submitted To: Submitted By:

Mr. Ashish Mathur Abhishek Yadav


2001330100021

Affiliated to Dr. A.P.J Abdul Kalam Technical University, Uttar Pradesh,


Lucknow Lucknow.
2

INDEX
Sr. No Experiment Page Signature Date
No
1. Introduction to Network Devices (Repeater,
Hub, Bridge, Switch, Router, Gateways, NIC
etc.).
2. To make an UTP cable with RJ-45 connector,
and build and test simple network using UTP
cable (crossover) and a hub based network.
3. Introduction to CISCO Packet Tracer. Design
Bus, Star, Mesh, Ring Topology and check the
connectivity using ping command.
4. Implementation of data link layer framing
method such as bit stuffing in any language like
C++ ,Java or Python.
5. Test the Network connection using ping
command and use of ipconfig, netstat and trcert
command provided by TCP/IP.
6. Implementation of CRC algorithm in any
language like C++ , Java or Python.

7. Implementation of stop and wait protocol in any


language like C++ , Java or Python.

8. Implementation of hamming code (7, 4) code to


limit the noise. We have to code the bit data in
to 7bit data by adding 3 parity bits. Implement
in in any language like C++ , Java or Python.
9. Implementation of Caesar cipher technique &
RSA algorithm in any language like C++ , Java
or Python
10. Write a program in java to find the IP address of
the system

11. Write a program in java to find the IP address of


the any site if name is given.

12. Switch Configuration on CISCO packet tracer


using CLI
3

Lab 1 : Introduction to Network Devices (Repeater, Hub,


Bridge, Switch, Router, Gateways, NIC etc.).

REPEATER:
A repeater operates at the physical layer. Its job is to regenerate the signal over the
same network before the signal becomes too weak or corrupted so as to extend the
length to which the signal can be transmitted over the same network. An important
point to be noted about repeaters is that they do not amplify the signal. When the
signal becomes weak, they copy the signal bit by bit and regenerate it at the original
strength. It is a 2 port device.

HUB:
A hub is basically a multiport repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects
different stations. Hubs cannot filter data, so data packets are sent to all connected
devices. In other words, collision domain of all hosts connected through Hub remains
one. Also, they do not have intelligence to find out best path for data packets which
leads to inefficiencies and wastage.
Types of Hub:
- Active Hub
- Passive Hub

Active Hub :
These are the hubs which have their own power supply and can clean, boost and relay
the signal along with the network. It serves both as a repeater as well as wiring center.
These are used to extend the maximum distance between nodes.
4

Passive Hub:
These are the hubs which collect wiring from nodes and power supply from active
hub. These hubs relay signals onto the network without cleaning and boosting them
and can’t be used to extend the distance between nodes.

BRIDGE:
A bridge operates at data link layer. A bridge is a repeater, with add on the
functionality of filtering content by reading the MAC addresses of source and
destination. It is also used for interconnecting two LANs working on the same
protocol. It has a single input and single output port, thus making it a 2 port device.

Types of Bridges:
- Transparent Bridges
- Source Routing Bridges

Transparent Bridges:
These are the bridge in which the stations are completely unaware of the bridge’s
existence i.e whether or not a bridge is added or deleted from the network,
reconfiguration of the stations is unnecessary. These bridges make use of two
processes i.e bridge forwarding and bridge learning.
Source Routing Bridges:
In these bridges, routing operation is performed by source station and the frame
specifies which route to follow. The hot can discover frame by sending a special frame
called discovery frame, which spreads through the entire network using all possible
paths to destination.
5

SWITCH:
A switch is a multiport bridge with a buffer and a design that can boost its efficiency
(a large number of ports imply less traffic) and performance. A switch is a data link
layer device. The switch can perform error checking before forwarding data, that
makes it very efficient as it does not forward packets that have errors and forward
good packets selectively to correct port only. In other words, switch divides collision
domain of hosts, but broadcast domain remains same.

ROUTERS:
A router is a device like a switch that routes data packets based on their IP addresses.
Router is mainly a Network Layer device. Routers normally connect LANs and
WANs together and have a dynamically updating routing table based on which they
make decisions on routing the data packets. Router divide broadcast domains of hosts
connected through it. A router is connected to two or more data lines from different IP
networks. When a data packet comes in on one of the lines, the router reads the
network address information in the packet header to determine the ultimate
destination. Then, using information in its routing table or routing policy, it directs the
packet to the next network on its journey.
The most familiar type of IP routers are home and small office routers that simply
forward IP packets between the home computers and the Internet. More sophisticated
routers, such as enterprise routers, connect large business or ISP networks up to the
powerful core routers that forward data at high speed along the optical fiber lines of
the Internet backbone.
6

GATEWAY:
A gateway, as the name suggests, is a passage to connect two networks together that
may work upon different networking models. They basically work as the messenger
agents that take data from one system, interpret it, and transfer it to another system.
Gateways are also called protocol converters and can operate at any network layer.
Gateways are generally more complex than switch or router.

NIC:
A network interface card (NIC) is a hardware component without which a
computer cannot be connected over a network. It is a circuit board installed in a
computer that provides a dedicated network connection to the computer. It is also
called network interface.
7

Lab 2: To make an UTP cable with RJ-45 connector, and


build and test simple network using UTP cable (crossover)
and a hub based network.

THEORY –
Physical layer defines the cable or physical medium itself, e.g., thinned, thicket,
unshielded twisted pairs (UTP). It transmits raw bit stream over physical cable,
defines cables, cards, and physical aspects, defines NIC attachments to, hardware,
how cable is attached to NIC, defines techniques to transfer bit stream to cable. All
media are functionally equivalent. The main difference is in convenience and cost of
installation and maintenance. Network Cabling Cable is the medium through which
information usually moves from one network device to another. There are several
types of cable which are commonly used with LANs. In some cases, a network will
utilize only one type of cable, other networks will use a variety of cable types. The
type of cable chosen for a network is related to the network's topology, protocol, and
size. Types of cables used in networks are:
1. Unshielded Twisted Pair (UTP) Cable
2. Shielded Twisted Pair (STP) Cable
3. Coaxial Cable
4. Fiber Optic Cable

Tools Required :
1. RJ - 45
2. UTP Cable
3. Crimping Tool
4. LAN Tester

Ethernet Cable Summary:


Specifications Cable Type Maximum length
10BaseT Unshielded Twisted Pair 100 meters
10Base2 Thin Coaxial 185 meters
10Base5 Thick Coaxial 500 meters
10BaseF Fiber Optic 2000 meters
100BaseT Unshielded Twisted Pair 100 meters
100BaseTX Unshielded Twisted Pair 220 meters
8

Unshielded Twisted Pair Connector-The standard connector for unshielded twisted


pair cabling is an RJ- 45 connector.
Shielded Twisted Pair (STP) Cable -A disadvantage of UTP is that it may be

susceptible to radio and electrical frequency interference. Shielded twisted pair (STP) is
suitable for environments with electrical interference; however, the extra shielding can
make the cables quite bulky. Shielded twisted pair is often used on networks using
Token Ring topology.
Ethernet Cable: color – code Standards
T-568A Straight-Through Ethernet Cable

The T-568A standard is supposed to be used in new network installations. Most off-
the-shelf Ethernet cables are still of the T-568B standard; however, it makes no
functional difference.

T-568B Straight-Through Ethernet Cable


Both the T-568A and the T-568B standard Straight-Through cables are used most
often as patch cords for Ethernet connections. If we require a cable to connect two
Ethernet devices directly together without a hub or when connecting two hubs
9

together, we need to use a Crossover cable instead.

Standard End Crossover End


Pin 1 White/Orange Pin 1 White/Green
Pin 2 Orange Pin 2 Green
Pin 3 White/Green Pin 3 White/Orange
Pin 4 Blue Pin 4
Pin 5 White/Blue Pin 5 White/Blue
Pin 6 Green Pin 6 Orange
Pin 7 White/Brown Pin 7 White/Brown
Pin 8 Brown Pin 8 Brown

Crossover Ethernet cable is to wire one end using the T-568A standard and the other
end using the T- 568B standard. Another way of remembering the color coding is to
simply switch the green set of wires in place with the orange set of wires. Specifically,
switch the solid Green (G) with the solid Orange, and switch the green/white with the
orange/white.

By looking at a T-568A UTP Ethernet straight-thru cable and an Ethernet crossover


cable with a T- 568B end, we see that the TX (transmitter) pins are connected to the
corresponding RX (receiver) pins, plus to plus and minus to minus. You can also see
that both the blue and brown wire pairs on pins 4, 5, 7, and 8 are not used in either
standard. What you may not realize is that, these same pins 4, 5, 7, and 8 are not used
or required in 100BASE-TX as well. So why bother using these wires, well for one
thing its simply easier to make a connection with all the wires grouped together.
10

Otherwise you'll be spending time trying to fit those tiny little wires into each of the
corresponding holes in the RJ-45 connector.
Procedure:
1. Start on one end of cable and strip the cable jacket off using a stripper.
2. Spread, untwist the pairs, and arrange the wires in the order of the
desired cable end. Flatten the end between your thumb and
forefinger. Trim the ends of the wires so they are even with one
another.
3. Hold the RJ-45 plug with the clip facing down.Push the wires firmly into
the plug. Inspect each wire is flat even at the front of the plug. Check the
order of the wires.Check that the jacket is fitted right against the stop of
the plug.Carefully hold the wire and firmly crimp the RJ-45 with the
crimper.
4. Check the color orientation, check that the crimped connection is not
about to come apart, and check to see if the wires are flat against the
front of the plug
Similarly make end 2 according to the color coding for straight through cable or
crossover cable on the basis of requirement.
Connecting PC’s using direct cable UTP –
1. use crossover UTP cable.
2. Insert RJ45 connector to both PC’s NIC card.
3. restart both computers and both of them detect the network after logon.

Connecting PC to hub-
1. use straight through UTP cable.
2. Insert RJ45 connector to computer’s NIC card and other end to HUB.
11

Precautions-
• A straight-thru cable has identical ends.
• A crossover cable has different ends.
• A straight-thru is used as a patch cord in Ethernet connections.
• A crossover is used to connect two Ethernet devices without a hub or for
connecting two hubs.
• No more than 1/2" of the Ethernet cable should be untwisted otherwise it will
be susceptible to crosstalk.
12

Lab 3: Introduction to CISCO Packet Tracer. Design Bus,


Star, Mesh, Ring Topology and check the connectivity
using ping command.

CISCO PACKET TRACER:


Packet Tracer is a cross-platform visual simulation tool designed by Cisco Systems
that allows users to create network topologies and imitate modern computer networks.
The software allows users to simulate the configuration of Cisco routers and switches
using a simulated command line interface. Packet Tracer makes use of a drag and drop
user interface, allowing users to add and remove simulated network devices as they
see fit. The software is mainly focused towards Certified Cisco Network Associate
Academy students as an educational tool for helping them learn fundamental CCNA
concepts.
Packet Tracer can be run on Linux and Microsoft Windows. Similar Android and iOS
apps are also available. Packet Tracer allows users to create simulated network
topologies by dragging and dropping routers, switches and various other types of
network devices. A physical connection between devices is represented by a "cable"
item. Packet Tracer supports an array of simulated Application Layer protocols,
as well as basic routing with RIP, OSPF, EIGRP, BGP, to the extents required
by the current CCNA curriculum. As of version 5.3, Packet Tracer also supports the
Border Gateway Protocol.
In addition to simulating certain aspects of computer networks, Packet Tracer can also
be used for collaboration. As of Packet Tracer 5.0, Packet Tracer supports a multi-user
system that enables multiple users to connect multiple topologies together over a
computer network. Packet Tracer also allows instructors to create activities that
students have to complete. Packet Tracer is often used in educational settings as a
learning aid. Cisco Systems claims that Packet Tracer is useful for network
experimentation.
Packet Tracer allows students to design complex and large networks, which is often
not feasible with physical hardware, due to costs. Packet Tracer is commonly used by
CCNA Academy students, since it is available to them for free. However, due to
functional limitations, it is intended by CISCO to be used only as a learning aid, not a
replacement for Cisco routers and switches. The application itself only has a small
number of features found within the actual hardware running a current Cisco IOS
version. Thus, Packet Tracer is unsuitable for modelling production networks. It has a
limited command set, meaning it is not possible to practice all of the IOS commands
that might be required. Packet Tracer can be useful for understanding abstract
13

networking concepts, such as the Enhanced Interior Gateway Routing Protocol by


animating these elements in a visual form. Packet Tracer is also useful in education by
providing additional components, including an authoring system, network protocol
simulation and improving knowledge an assessment system.

1. Mesh Topology: Mesh topology is a type of networking where all nodes


cooperate to distribute data amongst each other. This topology setup allows for
most transmissions to be distributed even if one of the connections goes down.
It is a topology commonly used for wireless networks.
2. Bus Topology: A bus topology is a topology for a Local Area Network (LAN)
in which all the nodes are connected to a single cable. The cable to which the
nodes connect is called a "backbone". If the backbone is broken, the entire
segment fails.
3. Ring Topology: A ring network is a network topology in which each node
connects to exactly two other nodes, forming a single continuous pathway for
signals through each node a ring. Data travels from node to node, with each
node along the way handling every packet.
14

4. Star Topology: A star topology is a topology for a Local AreaNetwork (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.

You might also like