Computer Network Lab File
Computer Network Lab File
What is LAN?
Introduction:
The set of computers or devices connected together with the ability to exchange data is known as
computer network. The networking are of two types viz. wired networking and wireless
networking. The LAN is an interconnection of small devices covering shorter distances or area.
It is used in home offices or schools to share common resources such as printers, internet,
memory etc. Moreover it is used for chatting between PC users using LAN based applications.
In basic LAN (Local Area Network), computers are connected by ethernet cables using router or
hub. There are two basic types of LAN viz. wired LAN and Wireless LAN. Wired LAN uses
100BASE-T and 1000BASE-T standards. Wireless LAN uses radio frequency for transmission
and covers larger distances beyond walls and floors and uses IEEE 802.11 standards for
implementation. Based on distance covered, the computer networks are divided into three main
parts viz. LAN, MAN and WAN. Among these types, LAN has lowest coverage upto 2 miles(or
2500 meters) and data rates (10/100/1000 Mbps).
LAN can be formed using just two computers connected together using network card or multiple
computers connected using Hub/Router. There may be file server on the LAN used for sharing of
files and folders among LAN users.
Flow Control may be defined as a set of procedures which are used for restricting the amount of
data, a sender can send to the receiver.
Stop and Wait Protocol is the simplest flow control method. It assumes that the communication
channel is perfect and no error occurs during transmission.
Working-
In this protocol,
As the name suggests, sender sends one data packet to the receiver and then stops and
waits for its acknowledgement from the receiver.
After receiving and processing the data packet, receiver sends an acknowledgement to the
sender.
After receiving the acknowledgement, sender sends the next data packet to the receiver.
1. It is extremely inefficient because-
Sender will keep waiting for the acknowledgement for infinite time.
Receiver will keep waiting for the data packet for infinite time.
Sender will keep waiting for the acknowledgement for infinite time.
Receiver will keep waiting for another data packet for infinite time.
3. Study of Sliding Window Protocol.
Sliding Window Protocol-
The protocol which allows the sender to send multiple frames before needing an
acknowledgement is called as Sliding Window Protocol.
As sender receives the acknowledgement for the sent frames, it slides its window to send
more frames.
The protocol is called so because it involves sliding of sender’s window on receiving
acknowledgements.
Maximum number of frames that sender can send without acknowledgement = Sender
window size
Now, let us find what should be the optimal window size of the sender to get the maximum
efficiency.
We know,
4. Study of IEEE 802.3, 802.4, 802.5.
802.2 Logical Link Control
The technical definition for 802.2 is "the standard for the upper Data Link Layer sublayer also
known as the Logical Link Control layer. It is used with the 802.3, 802.4, and 802.5 standards
(lower DL sublayers)."
802.2 "specifies the general interface between the network layer (IP, IPX, etc) and the data link
layer (Ethernet, Token Ring, etc).
Basically, think of the 802.2 as the "translator" for the Data Link Layer. 802.2 is concerned with
managing traffic over the physical network. It is responsible for flow and error control. The Data
Link Layer wants to send some data over the network, 802.2 Logical Link Control helps make
this possible. It also helps by identifying the line protocol, like NetBIOS, or Netware.
The LLC acts like a software bus allowing multiple higher layer protocols to access one or more
lower layer networks. For example, if you have a server with multiple network interface cards,
the LLC will forward packers from those upper layer protocols to the appropriate network
interface. This allows the upper layer protocols to not need specific knowledge of the lower layer
networks in use.
802.3 Ethernet
Now that we have an overview of the OSI model, we can continue on these topics. I hope you
have a clearer picture of the network model and where things fit on it.
5. Study of FDDI:-
Fiber Distributed Data Interface (FDDI) is a standard for data transmission in a local area
network. It uses optical fiber as its standard underlying physical medium, although it was also
later specified to use copper cable, in which case it may be called CDDI (Copper Distributed
Data Interface), standardized as TP-PMD (Twisted-Pair Physical Medium-Dependent), also
referred to as TP-DDI (Twisted-Pair Distributed Data Interface).
FDDI provides a 100 Mbit/s optical standard for data transmission in local area network that can
extend in range up to 200 kilometers (120 mi). Although FDDI logical topology is a ring-based
token network, it did not use the IEEE 802.5 token ring protocol as its basis; instead, its protocol
was derived from the IEEE 802.4 token bus timed token protocol. In addition to covering large
geographical areas, FDDI local area networks can support thousands of users. FDDI offers both a
Dual-Attached Station (DAS), counter-rotating token ring topology and a Single-Attached
Station (SAS), token bus passing ring topology.
FDDI, as a product of American National Standards Institute X3T9.5 (now X3T12), conforms to
the Open Systems Interconnection (OSI) model of functional layering using other protocols. The
standards process started in the mid 1980s. FDDI-II, a version of FDDI described in 1989, added
circuit-switched service capability to the network so that it could also handle voice and video
signals. Work started to connect FDDI networks to synchronous optical networking (SONET)
technology.
A FDDI network contains two rings, one as a secondary backup in case the primary ring fails.
The primary ring offers up to 100 Mbit/s capacity. When a network has no requirement for the
secondary ring to do backup, it can also carry data, extending capacity to 200 Mbit/s. The single
ring can extend the maximum distance; a dual ring can extend 100 km (62 mi). FDDI had a
6. Study of various Network Topologies.
Network Topology is the schematic description of a network arrangement, connecting various
nodes(sender and receiver) through lines of connection.
BUS Topology
Bus topology is a network type in which every computer and network device is connected to
single cable. When it has exactly two endpoints, then it is called Linear Bus topology.
1. It is cost effective.
2. Cable required is least compared to other network topology.
3. Used in small networks.
4. It is easy to understand.
5. Easy to expand joining two cables together.
It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first. Exactly two neighbours for each device.
1. A number of repeaters are used for Ring topology with large number of nodes, because if
someone wants to send some data to the last node in the ring topology with 100 nodes,
then the data will have to pass through 99 nodes to reach the 100th node. Hence to
prevent data loss repeaters are used in the network.
2. The transmission is unidirectional, but it can be made bidirectional by having 2
connections between each Network Node, it is called Dual Ring Topology.
3. In Dual Ring Topology, two ring networks are formed, and data flow is in opposite
direction in them. Also, if one ring fails, the second ring can act as a backup, to keep the
network up.
4. Data is transferred in a sequential manner that is bit by bit. Data transmitted, has to pass
through each node of the network, till the destination node.
1. Transmitting network is not affected by high traffic or by adding more nodes, as only the
nodes having tokens can transmit data.
2. Cheap to install and expand
In this type of topology all the computers are connected to a single hub through a cable. This hub
is the central node and all others nodes are connected to the central node.
It is a point-to-point connection to other nodes or devices. All the network nodes are connected
to each other. Mesh has n(n-1)/2 physical channels to link n devices.
There are two techniques to transmit data over the Mesh topology, they are :
1. Routing
2. Flooding
In routing, the nodes have a routing logic, as per the network requirements. Like routing logic to
direct the data to reach the destination using the shortest distance. Or, routing logic which has
information about the broken links, and it avoids those node etc. We can even have routing logic,
to re-configure the failed nodes.
In flooding, the same data is transmitted to all the network nodes, hence no routing logic is
required. The network is robust, and the its very unlikely to lose the data. But it leads to
unwanted load over the network.
1. Partial Mesh Topology : In this topology some of the systems are connected in the same
fashion as mesh topology but some devices are only connected to two or three devices.
2. Full Mesh Topology : Each and every nodes or devices are connected to each other.
TREE Topology
It has a root node and all other nodes are connected to it forming a hierarchy. It is also called
hierarchical topology. It should at least have three levels to the hierarchy.
1. Heavily cabled.
2. Costly.
3. If more nodes are added maintenance is difficult.
4. Central hub fails, network fails.
HYBRID Topology
It is two different types of topologies which is a mixture of two or more topologies. For example
if in an office in one department ring topology is used and in another star topology is used,
connecting these topologies will result in Hybrid Topology (ring topology and star topology).
1. Complex in design.
2. Costly.
7. Study of various parameters of home LAN network.
To set up a LAN, you will need:
If you want your LAN to connect to the internet, you'll also need:
A broadband connection
A router
A modem (if there isn't one built in to your router)
Brand new network switch or router? The first thing you need to do is set it up. Do this by
connecting it to a computer via an ethernet cable.
On a Windows PC: Using a network switch or router for the first time should bring up the 'Set
up a network' wizard - an easy and simple way of getting things set up automatically. If it doesn't
appear, or if you've already used this router, go to the Network and Sharing Centre (in the control
panel or under the settings) and select 'Set up a new connection or network'. You'll then be taken
through the steps.
On a Mac: Go to System Preferences, then Network, Built-In Ethernet, Advanced. This is where
you'll find all the settings you need to set up a new network.
If you want devices connected to your network wirelessly - the best choice for smartphones,
tablets, streaming sticks, and so on - you'll need to set up Wi-Fi (of course, if you only want
computers to connect to the LAN via ethernet cable, go ahead and skip this step). Your router or
network switch's manual will tell you how to enable Wi-Fi on it, so follow those instructions.
But remember to make sure your Wi-Fi is as secure as it can be.
Your router or network switch will provide you with a default SSID (the name of your network),
Wi-Fi password, and login info. To keep things secure, it's best to change all of these. Log on to
your router using the router login info - depending on your router and your provider, you'll either
need to do this via a web browser on your computer, or by going through the network settings as
above.
Change the SSID to a custom name to differentiate it from your neighbours' networks
Change the Wi-Fi password to something unique, preferably including lower case letters,
upper case letters, numbers, and symbols
Change the router login password to something unique too - different from the Wi-Fi
password, of course
Pick the most advanced security tech - currently WPA2.
You may need to restart your computer to see the changes take effect.
The idea of a LAN is to connect different devices to each other - but if you want it to have
internet access too, now's when you need to set it up.
If you already have a working router and broadband connection, you should just be able to
plug in and go.
If you're setting up a new router and/or internet connection, on the other hand, you'll need to
follow the instructions given to you by your broadband provider or router manufacturer.
Either way, you'll need to plug your router and modem into your home's main phone line, using
the router's WAN port.
Whether you're connecting your gadgets to the LAN via Wi-Fi or ethernet cable, the time has
come to get it all hooked up. This includes other computers, laptops, smartphones tablets, TV set
top boxes, games consoles, streaming sticks - anything that might need to get online
To connect via Wi-Fi, turn on Wi-Fi on your device, and select your home network from the list.
It should be pretty recognisable, because you changed the SSID to a custom name, right? You'll
then be prompted to enter your new secure password.
Connecting with an ethernet cable is far simpler - just plug one end into your network switch or
router and the other into your device.
Other things you may want to connect include printers, scanners, speakers, and storage devices.
By connecting them directly to the router - again, either by ethernet cable or Wi-Fi - you'll be
able to access them from any device on your network.
In fact, some things can connect to each other automatically simply by being part of the same
Wi-Fi network. This includes the Chromecast or anything with Apple's AirPlay, for instance.
To add a network printer, go to 'Devices and printers', click 'Add a printer', then follow the on-
screen instructions.
One of the beauties of a LAN is that you can share resources across it, such as devices, files, and
media. With Windows PCs, this is super easy to set up by creating a 'Homegroup'.
Go to Control Panel, then Network and Internet, then Homegroup, and select 'Create a
homegroup'. Windows will take you through the homegroup setup wizard and give you a
password that other devices will need in order to connect to it. This is also where you can
establish individual user accounts on your new LAN.
8. Study of Routers, Bridges, Switches and Gateways.
Network Devices (Bridge, Switch, Router and Gateways)
1. Switch – A switch is a multi port bridge with a buffer and a design that can boost
its efficiency(large number of ports imply less traffic) and performance. Switch is
data link layer device. 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.
2. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add on
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 :- 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 makes use of two processes i.e. bridge
forwarding and bridge learning.
3. 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
4. broadcast domains of hosts connected through it.
Router
Refinement: supply the nodes with an alternate next node for each destination Routing Strategies
(cont)
Flooding
At each node, an incoming packet is retx on all outgoing link except for the link on which it
arrived
Properties
At least one copy of the packet to arrive at the destination will have a minimum-hop route
Random Routing
Assign a probability to each outgoing link and to select the link based on that probability
Adaptive Routing
Routing decisions that are made change as conditions on the network change
Failure
Congestion
10. Study of IOS of routers.
Router IOS (Internetwork operating System) is the operating system by which the router can be
accessed and configured. But this operating system is different from operating system that we
have in our desktop.
OS is a command line operating system to configure routers. Router IOS is designed, coded,
and binds to work with the routing protocols, so we can use IOS to configure the routing
protocols. Router IOS stores as.bin file in the flash memory of the router. We have to remember
the commands to configure the router for specific actions
1. Console access – this type of access is usually used to configure newly acquired devices.
These devices usually don’t have an IP address configured, and therefore can not be accessed
through the network. Most of the Cisco devices have a physical console port. This port can be
connected to a computer using a rollover cable, a special type of cable with pins on one end
reversed on the other end of the cable. The rollover cable is a serial cable, which means that you
can’t just plug it in an Ethernet port on your computer. You will need an adapter that converts an
interface on your computer (usually a 9-pin serial interface) into RJ-45.
2. Telnet access – this type of access used to be a common way to access network devices.
Telnet is an terminal emulation program that enables you to access IOS through the network and
configure the device remotely. The device that is being configured needs to have an Telnet server
installed and an IP address configured.
Telnet uses a well known TCP port 23. One of the biggest disadvantages of this protocol is that
is sends all data as clear-text, which includes the passwords! This is the reason why this type of
access is usually not used anymore. Instead, SSH is usually used.
3. SSH access – like Telnet, this access type enables you to configure devices remotely, but it
adds an extra layer of security by encrypting all communications using public-key cryptography.
SSH uses well known TCP port 22.
IOS modes
IOS has many different modes. There are three main modes any many submodes. We will
describe the three main modes and one submode.
user EXEC mode – the default mode for the IOS CLI. This is the mode that a user is
placed in after accessing the IOS. Only basic commands (like ping or telnet) are available
in this mode.
privileged EXEC Mode – this mode is accessed by typing the enable command from the
user EXEC mode. This mode can be password protected. In this mode a user can view
and change a device’s configuration.
global configuration mode – this mode can be accessed by typing the configure terminal
command from the privileged EXEC mode. It is used to change the device’s
configuration.
A global configuration mode can have many submodes. For example, when a user wants to
configure an interface, he will have to enter the interface submode by entering the interface
INTERFACE_TYPE INTERFACE_NUMBER command (e.g. interface FastEthernet 0/1 ) from
the global configuration mode. This submode can have many commands that are specific for the
interface.
11. Establishment and configuration of LAN:-
1. Count the number of computers you need to hardwire. When setting up a LAN, you'll need
to know how many computers will be connecting to the network via Ethernet. This will
determine the number of ports you'll need.
If you have four or less computers that you need to hardwire, you'll just need a router. If
you have more than four, you'll likely need to get a switch to extend the number of ports
available on your router.
2. Decide if you want to create a wireless network. If you want to allow devices to connect
wirelessly, you'll need a router that can broadcast a wireless network. Most routers you'll find at
the store or online have wireless capabilities.
Network switches do not allow wireless devices to connect, and can only be used for
hardwired LANs or to extend the number of ports available to the router.
3. Determine if you want all network devices to have internet access. If you want all of the
connected devices to have access to the internet, you'll need a router to handle the connections. If
you don't need the devices to have a network connection, you can just use a network switch.
4. Measure the distances for all hardwired devices. This isn't much of an issue in most homes,
but network cables cannot run longer than 100m (328 ft). If you have to run cable farther than
this, you'll need switches in between.
5. Consider your future needs. If you're filling all of the ports on your hardware, consider
future-proofing to allow for more devices in the future.
6.Gather your network hardware. To create a LAN, you'll need a router or switch, which will
act as the hub of your network. These devices route information to the correct computers.
A router will automatically handle assigning IP addresses to each device on the network,
and is necessary if you intend to share your internet connection with all the connected
devices. It is highly recommended that you build your network with a router, even if
you're not sharing an internet connection.
A network switch is like a simpler version of a router. It will allow connected devices to
talk to each other, but will not automatically assign IP addresses and will not share an
internet connection. Switches are best used to expand the number of LAN ports available
on the network, as they can be connected to the router.
12. Color coding standard of CAT 5,6,7 and crimping of cable in
RJ-45.
ETHERNET CABLE: COLOR-CODE STANDARDS
Category 5 Cable
Category 5 (CAT5) cable is a multi-pair (usually 4 pair) high performance cable that consists of
twisted pair conductors, used mainly for data transmission. Basic CAT5 cable was designed for
characteristics of up to 100 MHz. CAT5 cable is typically used for Ethernet networks running at
10 or 100 Mbps.
Category 6 Cable
Category 6 (CAT6) cable provides higher performance than CAT5e and features more stringent
specifications for crosstalk and system noise.
The quality of the data transmission depends upon the performance of the components of the
channel. To transmit according to CAT6 specifications, jacks, patch cables, patch panels, cross-
connects, and cabling must all meet CAT6 standards. The CAT6 components are tested
individually, and they are also tested together for performance. In addition, the standard calls for
generic system performance so that CAT6 components from any vendor can be used in the
channel.
All CAT6 components must be backward compatible with CAT5e, CAT5, and CAT3. If
different category components are used with CAT6 components, then the channel will achieve
the transmission performance of the lower category. For instance, if CAT6 cable is used with
CAT5e jacks, the channel will perform at a CAT5e level.
Category 7 Cable
13. Study of Basic networking commands like ping, ipconfig, etc.
Study of Basic networking commands like ping,ipconfig,etc.
1. Ping Command
The ping command is one of the most often used networking utilities for detecting devices on a
network and for troubleshooting network problems.
When you ping a device you send that device a short message, which it then sends back (the
echo).
Example
2. ipconfig Command
Another indispensable and frequently used utility that is used for finding network information
about your local machine like IP addresses, DNS addresses etc
3. Hostname Command
A very simple command that displays the host name of your machine. This is much quicker than
going to the control panel>system route.
4. getmac Command
Another very simple command that shows the MAC address of your network interfaces
5. arp Command
This is used for showing the address resolution cache. This command must be used with a
command line switch arp -a is the most common.
6. NSlookup
Used for checking DNS record entries. See Using NSlookup for more details
7. Nbtstat
Diagnostic tool for troubleshooting netBIOS problems. See This technet article.
8 Net Command
9. Netstat Command
Used for displaying information about tcp and udp connections and ports. See tcp and udp ports
and sockets and how to use the netstat command
View a list of running tasks using the tasklist command and kill them by name or processor ID
using the taskKill command- See this tutorial.