0% found this document useful (0 votes)
28 views37 pages

Computer Network Lab Manual Lnctu

The document outlines a series of experiments focused on networking concepts, including the study of LAN types, network topologies, framing methods, and IP addressing schemes. It details various LAN types such as client-server, peer-to-peer, and wireless LANs, as well as standard topologies like star, bus, and ring. Additionally, it provides practical programming exercises for implementing framing methods and configuring IP addresses for network devices using Cisco Packet Tracer.

Uploaded by

SHUBHAM YADAV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views37 pages

Computer Network Lab Manual Lnctu

The document outlines a series of experiments focused on networking concepts, including the study of LAN types, network topologies, framing methods, and IP addressing schemes. It details various LAN types such as client-server, peer-to-peer, and wireless LANs, as well as standard topologies like star, bus, and ring. Additionally, it provides practical programming exercises for implementing framing methods and configuring IP addresses for network devices using Cisco Packet Tracer.

Uploaded by

SHUBHAM YADAV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 37

1.

Study of Different Type of LAN& Network Equipment’s CO1


2. CO1
Study and Verification of standard Network topologies i.e. Star,
Bus, Ring etc
3. CO2
Write a program to Implement various types of framing methods

4. CO2
Implementing an IP Addressing Scheme

5. CO3
Configuring and Troubleshooting a Switched Network

6. CO3
Performing an Initial Switch Configuration

7. CO4
To construct a Wireless LAN and make the PC’s communicate
wirelessly
8. CO4
Study of basic network command and Network configuration
commands.
9. CO5
Study of Application layer protocols-DNS, HTTP, HTTPS, FTP
and TelNet
10. CO5
. Study & Simulation of MAC Protocols like Aloha, CSMA,
CSMA/CD and CSMA/CA using Standard Network Simulators
Experiment No. 1
Aim : Study of Different Type of LAN & Network Equipment’s

Apparatus Required: No software or hardware needed

Theory:

A local area network (LAN) is a connected environment spanning one or more


buildings – typically in a one-kilometer radius – that links computing devices within
close proximity of each other by using ethernet and Wi-Fi technology. LAN is among
the most foundational components of the global networked landscape, both at
consumer and enterprise levels.

Types of Local Area Network (LAN)

1. Client-server LAN In a client-server LAN environment, a single server connects


to multiple devices known as clients. Client devices cannot interact with each
other and a centralized machine handles activities like network traffic
management, network access control, etc. This LAN type may be faster in small
perimeters, but in a large perimeter, it places too much pressure on the central
server.
2. Peer to peer (P2P) LANIn a P2P LAN, there is no centralized server, and all
connected devices have access to each other, regardless of whether they are
servers or clients. The advantage of a P2P LAN is that devices can freely
exchange data with one another, making it easier to stream media, send files, and
perform similar data exchange activities. On the downside, they tend to be less
powerful than client-server LANs.
3. Token ring LAN Based on the architecture design, you can classify LANs into a
token ring or token bus categories. In the former, all devices are arranged in a ring
when they are connected. A token is assigned to every connected device based on
its requirements. It was introduced by IBM in 1984 for use in corporate
environments when ethernet technology was still in the early stages of
development.
4. Token bus LAN In a token bus LAN, connected nodes are arranged in a tree-like
topology, and tokens are transferred either left or right. Typically, it provides
better bandwidth capacities than a token ring LAN environment.
5. Wired LAN Wired LAN is probably the most common LAN type in use today. It
uses electronic waves to transfer data across optical fiber (or cable variants)
instead of tokens. Wired LAN is extremely reliable and can be very fast,
depending on the performance of the central server. However, it can hinder
portability and flexibility, particularly in environments with no fixed number of
devices.
6. Wireless LAN Wireless LAN is commonly used in home environments to
connect computing devices, wearables, smart appliances, etc. but there is a
massive enterprise market for wireless LAN as well, growing by 10.3% year over
year as per IDC. This type of LAN uses radiofrequency for data transfers, which
can make it susceptible to security risks.
7. Cloud-managed LAN Cloud-managed LAN is a specific type of wireless
LAN where a centralized cloud platform is used to manage network provisioning,
policy enforcement, access control, and other aspects of network performance and
security.

Network Equipment’s

1. Repeater: Functioning at Physical Layer. A repeater is an electronic device


that receives a signal and retransmits it at a higher level and/or higher power, or onto
the other side of an obstruction, so that the signal can cover longer distances.
Repeaters have two ports, so cannot be used to connect for more than two devices.

2. Hub: An Ethernet hub, active hub, network hub, repeater hub, hub or
concentrator is a device for connecting multiple twisted pair or fiber optic Ethernet
devices together and making them act as a single network segment. Hubs work at the
physical layer of the OSI model. The device is a form of multiport repeater. Repeater
hubs also participate in collision detection, forwarding a jam signal to all ports if it
detects a collision.

3. Switch: A network switch or switching hub is a computer networking device


that connects network segments. The term commonly refers to a network bridge that
processes and routes data at the data link layer of the OSI model. Switch that
additionally process data at the network layer are often referred to as layer 3
switches or multilayer switches.
4. Bridge: A network bridge connects multiple network segments at the data link
layer of the OSI model. In Ethernet networks, the term bridge formally means a
device that behaves according to the IEEE 802.1 D standards. A bridge and switch
are very much alike; a switch being a bridge with numerous ports. Switch of layer 2
switch is often used interchangeably with bridge. Bridges can analyze incoming data
packets to determine if the bridge is able to send the given packet to another segment
of the network.

5. Router: A router is an electronic device that interconnects two or more


computer networks, and selectively interchanges packets of data between them. Each
data packet contains address information that a router can use to determine if the
source and destination are on the same network, or if the data packet must be
transferred from one network to another. Where multiple routers are used in a large
collection of interconnected networks, the routers exchange information about target
system addresses, so that each router can build up a table showing the preferred
paths between any two systems on the interconnected networks.

6. Gate way: In a communications network, a network node equipped for


interfacing with another network that uses different protocols.
A gateway may contain devices such as protocol translators, impedance matching
devices, rate converters, fault isolators, or signal translators as necessary to provide
system interoperability. It also requires the establishment of mutually acceptable
administrative procedures between both networks.
A protocol translation/mapping gateway interconnects networks with different
network protocol technologies by performing the required protocol conversions.
Experiment No. 2
Aim : Study and Verification of standard Network topologies i.e. Star, Bus, Ring etc

Apparatus Required: Windows pc


CISCO Packet Tracer Software ( Student Version)
8 port switch
Cat-5 LAN cable
Theory:
 Bus Topology: In case of Bus topology, all devices share single communication line or
cable.Bus topology may have problem while multiple hosts sending data at the same
time. Therefore, Bus topology either uses CSMA/CD technology or recognizes one host
as Bus Master to solve the issue. It is one of the simple forms of networking where a
failure of a device does not affect the other devices. But failure of the shared
communication line can make all other devices stop functioning.
 Star Topology:In the star network topology, a central device connects to all other nodes
through a central hub. Switched local area networks based on Ethernet switches and most
wired home and office networks have a physical star topology.
 Ring Topology: In the ring network topology, the nodes are connected in a closed-
loop configuration. Some rings pass data in one direction only, while others are capable
of transmission in both directions. These bidirectional ring networks are more resilient
than bus networks since traffic can reach a node by moving in either direction. Metro
networks based on Synchronous Optical Network technology are the primary example of
ring networks.
 Mesh Topology: The mesh network topology links nodes with connections so that
multiple paths between at least some points of the network are available. A network is
considered to be fully meshed if all nodes are directly connected to all other nodes
and partially meshed if only some nodes have multiple connections to others. Meshing
multiple paths increases resiliency but also increases cost. However, more space is
needed for dedicated links.
 Tree Topology: The tree network topology consists of one root node, and all other nodes
are connected in a hierarchy. The topology itself is connected in a star configuration.
Many larger Ethernet switch networks, including data center networks, are configured as
trees.
Procedure:
Star Topology:

1. Click on the PC symbol and drag drop the 4 PCs.


2. Click on the network devices and select switches and drag and drop the switch.
3. Click on the connection and select the Copper Straight –Through cable.
4. Click on any one PC then select the desktop menu then go to the IP Configuration.
5. Provide the IP address to all the PCs.
6. Select the message symbol and then select source and destination.
7. It can be seen that message is transfer from one PC to another PC successfully.

Screenshot of Star Topology:

Bus Topology:
1. Click on the PC symbol and drag drop the 4 PCs.
2. Click on the network devices and select hubs and drag and drop the 4 hubs.
3. Connect the entire hub with copper cross – over wire, and then connect the PCs with
hub by Copper Straight –Through cable respectively.
4. Click on any one PC then select the desktop menu then go to the IP Configuration.
5. Provide the IP address to all the PCs.
6. Select the message symbol and then select source and destination.
7. It can be seen that message is transfer from one PC to another PC successfully.

Screenshot of Bus Topology:

Ring Topology:

1. Click on the PC symbol and drag drop the 4 PCs.


2. Click on the network devices and select switches and drag and drop the 4 switches.
3. Connect the entire switches with copper cross – over wire, and then connect the PCs
with switch by Copper Straight –Through cable respectively.
4. Click on any one PC then select the desktop menu then go to the IP Configuration.
5. Provide the IP address to all the PCs.
6. Select the message symbol and then select source and destination.
7. It can be seen that message is transfer from one PC to another PC successfully.
Screenshot of Ring Topology:

Result: I have performed the different types of topologies like Star, Bus, Ring successfully
on Cisco Packet Tracer.
Experiment No. 3
Aim : Write a program to implement various types of framing methods

Apparatus Required: Windows pc , C++/ JAVA/ Python

Theory:

Program for Character Stuffing

#include<stdio.h> b[j+1]='l';
#include<string.h> b[j+2]='e';
#include<process.h> b[j+3]=ch;
void main() b[j+4]='d';
{ b[j+5]='l';
int i=0,j=0,n,pos; b[j+6]='e';
char a[20],b[50],ch; j=j+7;
printf("Enter string\n"); }
scanf("%s",&a); if(a[i]=='d' && a[i+1]=='l' &&
n=strlen(a); a[i+2]=='e')
printf("Enter position\n"); {
scanf("%d",&pos); b[j]='d';
if(pos>n) b[j+1]='l';
{ b[j+2]='e';
printf("invalid position, Enter j=j+3;
again :"); }
scanf("%d",&pos);} b[j]=a[i];
printf("Enter the character\n"); i++;
ch=getche(); j++;
b[0]='d'; }
b[1]='l'; b[j]='d';
b[2]='e'; b[j+1]='l';
b[3]='s'; b[j+2]='e';
b[4]='t'; b[j+3]='e';
b[5]='x'; b[j+4]='t';
j=6; b[j+5]='x';
while(i<n) b[j+6]='\0';
{ printf("\nframe after stuffing:\n");
if(i==pos-1) printf("%s",b);
{ }
b[j]='d';
Program for Bit Stuffing

Security and Error detection are the most prominent features that are to be provided by any
application which transfers data from one end to the other end. One of such a mechanism in
tracking errors which may add up to the original data during transfer is known as Stuffing. It
is of two types namely Bit Stuffing and the other Character Stuffing. Coming to the Bit
Stuffing, 01111110 is appended within the original data while transfer of it. The following
program describes how it is stuffed at the sender end and de-stuffed at the reciever end.

#include<stdio.h> b[j]=a[k];
#include<string.h> count++;
void main() if(count==5)
{ {
int a[20],b[30],i,j,k,count,n; j++;
printf("Enter frame length:"); b[j]=0;
scanf("%d",&n); }
printf("Enter input frame (0's & i=k;
1's only):"); }}
for(i=0;i<n;i++) else
scanf("%d",&a[i]); {
i=0; count=1; j=0; b[j]=a[i];
while(i<n) }
{ i++;
if(a[i]==1) j++;
{ }
b[j]=a[i]; printf("After stuffing the frame
for(k=i+1;a[k]==1 && k<n && is:");
count<5;k++) for(i=0;i<j;i++)
{ printf("%d",b[i]);
j++; }
Experiment No. 4
Aim : Implementing an IP Addressing Scheme

Apparatus Required: Windows pc


CISCO Packet Tracer Software ( Student Version)
8 port switch
Router
Cat-5 LAN cable

Theory:
Background / Preparation
In this activity, you will subnet the private address space 192.168.1.0/24 to provide enough
host addresses for the two LANs attached to the router. You will then assign valid host
addresses to the appropriate devices and interfaces. Finally, you will test connectivity to
verify your IP address implementation.
Step 1: Subnet an address space based on the host requirements.
a. You are given the private address space 192.168.1.0/24. Subnet this address space based on
the following requirements:
LAN-A needs enough addresses for 50 hosts.
LAN-B needs enough addresses for 40 hosts.
Step 2: Configure the new switch with the required options.
Step 2: Assign host addresses to devices
What is the subnet address for subnet 0? ______________________________
What is the subnet address for subnet 1? ______________________________
Assign subnet 0 to LAN-A, and assign subnet 1 to LAN-B.
What is the first address in subnet 0? ______________________________
This address is assigned the FastEthernet0/0 interface on Customer Router.
What is the first address in subnet 1? ______________________________
This address is assigned the FastEthernet0/1 interface on Customer Router.
What is the last address in subnet 0? ______________________________
This address is assigned to HostA.
What is the last address in subnet 1? ______________________________
This address is assigned to HostB.
What is the default gateway for HostA? ______________________________
What is the default gateway for HostB? ______________________________
Step 3: Configure devices with IP addressing.
Configure HostA and HostB with IP addressing, including the subnet mask and default
gateway.
a. Click HostA. On the Desktop tab, choose IP Configuration. Enter the correct addressing
for HostA
according to your answers in Step 1 and Step 2.
b. Click HostB. On the Desktop tab, choose IP Configuration. Enter the correct addressing
for HostB
according to your answers in Step 1 and Step 2.
c. Check results. On the Assessment Items tab, your configurations for HostA and HostB
should have
green checkmarks. If not, read the provided feedback for a hint on how to correct the
problem.
Note: If you cannot see all the feedback, place your mouse pointer over the right side of the
Activity Results window. When the cursor turns into a double-headed arrow, click and drag
to resize thewindow until you can see all the feedback text.
Configure the LAN interfaces on Customer Router with IP addresses and a subnet mask.
a. Click Customer Router. Click the Config tab.
b. On the left side under Interface, click FastEthernet0/0. Enter the IP address and subnet
mask, and then set the Port Status to On.
c. On the left side under Interface, click FastEthernet0/1. Enter the IP address and subnet
mask, and then set the Port Status to On.
d. Notice in the Equivalent IOS Commands window that your actions produced actual
commands. You can scroll through the command window. In the next chapter, you will learn
how to enter these commands directly into the router instead of using the Config tab. For a
better view of the commands, you can increase the size of the window. To resize the window,
place your mouse pointer over the bottom border of the window. When the cursor turns into a
doubleheadedarrow, click and drag.
Check results. On the Assessment Items tab, your configurations for Customer Router should
have green
checkmarks. If not, read the provided feedback for a hint on how to correct the problem.
Step 4: Verify the addressing configuration.
a. Test connectivity between HostA, HostB, ISP Workstation, and ISP Server. You can use
the Add Simple PDU tool to create pings between the devices. You can also click HostA or
HostB, then the Desktop tab, and then Command Prompt. Use the ping command to test
connectivity to other devices. To obtain the IP address of another device, place your mouse
pointer over the device.
b. Check results. On the Connectivity Tests tab, the status of each test should be successful.
Reflection
a. How many subnets are still available for future expansion?
b. What would be the two subnet addresses if the host requirement was 80 hosts per LAN?
c. Challenge: Create your own Packet Tracer network using the same topology, but
implement an addressing scheme based on 80 hosts per LAN. Have another student or your
instructor check your work.
Topology Diagram
Experiment No. 5
Aim : Configuring and Troubleshooting a Switched Network

Background / Preparation
In this activity, you will configure these settings on the customer Cisco Catalyst 2960 switch:
 Host name
 Console password
 vty password
 Privileged EXEC mode password
 Privileged EXEC mode secret
 IP address on VLAN1 interface
 Default gateway
Note: Not all commands are graded by Packet Tracer.
Step 1: Configure the switch host name.
a. From the Customer PC, use a console cable and terminal emulation software to
connect to the console of the customer Cisco Catalyst 2960 switch.
b. Set the host name on the switch to CustomerSwitchusing these commands.
Switch>enable
Switch#configure terminal
Switch(config)#hostname CustomerSwitch
Step 2: Configure the privileged mode password and secret.
a. From global configuration mode, configure the password as cisco.
CustomerSwitch(config)#enable password cisco
b. From global configuration mode, configure the secret as cisco123.
CustomerSwitch(config)#enable secret cisco123
Step 3: Configure the console password.
a. From global configuration mode, switch to configuration mode to configure the
console line. CustomerSwitch(config)#line console 0
b. From line configuration mode, set the password to cisco and require the password to
be entered at
login.
CustomerSwitch(config-line)#password cisco
CustomerSwitch(config-line)#login
CustomerSwitch(config-line)#exit
Step 4: Configure the vty password.
a. From global configuration mode, switch to the configuration mode for the vty lines 0
through 15. CustomerSwitch(config)#line vty 0 15
b. From line configuration mode, set the password to cisco and require the password to
be entered at
login.
CustomerSwitch(config-line)#password cisco
CustomerSwitch(config-line)#login
CustomerSwitch(config-line)#exit
Step 5: Configure an IP address on interface VLAN1.
From global configuration mode, switch to interface configuration mode for VLAN1,
and assign the IP address
192.168.1.5 with the subnet mask of 255.255.255.0.
CustomerSwitch(config)#interface vlan 1
CustomerSwitch(config-if)#ip address 192.168.1.5 255.255.255.0
CustomerSwitch(config-if)#no shutdown
CustomerSwitch(config-if)#exit
Step 6: Configure the default gateway.
a. From global configuration mode, assign the default gateway to 192.168.1.1.
CustomerSwitch(config)#ip default-gateway 192.168.1.1
b. Click the Check Results button at the bottom of this instruction window to check your
work.
Step 7: Verify the configuration.
The Customer Switch should now be able to ping the ISP Server at 209.165.201.10. The
first one or two pings may fail while ARP converges.
CustomerSwitch(config)#end
CustomerSwitch#ping 209.165.201.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.201.10, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 181/189/197 ms
CustomerSwitch#
Reflection
a. What is the significance of assigning the IP address to the VLAN1 interface instead of
any of the Fast Ethernet interfaces?
b. What command is necessary to enforce password authentication on the console and
vty lines?
c. How many gigabit ports are available on the Cisco Catalyst 2960 switch that you
used in the activity?
Topology Diagram
Experiment No. 6
Aim : Performing an Initial Switch Configuration

Background / Preparation
In this activity, you will configure these settings on the customer Cisco Catalyst 2960 switch:
 Host name
 Console password
 IP address on VLAN1 interface
 Default gateway

Background / Scenario
In this activity, you will perform basic switch configuration tasks. You will secure access
to the command-line interface (CLI) and console ports using encrypted and plain text
passwords. You will also learn how to configure messages for users logging into the
switch. These message banners are also used to warn unauthorized users that access is
prohibited.
Note: In Packet Tracer, the Catalyst 2960 switch uses IOS version 12.2 by default. If
required, the IOS version can be updated from a file server in the Packet Tracer topology.
The switch can then be configured to boot to IOS version 15.0, if that version is required.

Instructions

Part 1: Verify the Default Switch Configuration

Step 1: Enter privileged EXEC mode.


You can access all switch commands from privileged EXEC mode. However, because
many of the privileged commands configure operating parameters, privileged access
should be password-protected to prevent unauthorized use.
The privileged EXEC command set includes the commands available in user EXEC
mode, many additional commands, and the configure command through which access to
the configuration modes is gained.
a. Click S1 and then the CLI tab. Press Enter.
b. Enter privileged EXEC mode by entering the enable command:Window for S1
Switch>enable
Switch#
Notice that the prompt changed to reflect privileged EXEC mode.

Step 2: Examine the current switch configuration.


Enter the show running-config command.
Switch# show running-config
Answer the following questions:
How many Fast Ethernet interfaces does the switch have?

24

How many Gigabit Ethernet interfaces does the switch have?

What is the range of values shown for the vty lines?

0-15

Which command will display the current contents of non-volatile random-access


memory (NVRAM)?

Show startup-configuration

Why does the switch respond with “startup-config is not present?”

It displays this message because the configuration file was not saved to NVRAM. Currently it is
only located in RAM.

Part 2: Create a Basic Switch Configuration

Step 1: Assign a name to a switch.


To configure parameters on a switch, you may be required to move between various
configuration modes. Notice how the prompt changes as you navigate through the switch.
Switch# configure terminal
Switch(config)# hostname S1
S1(config)# exit
S1#

Step 2: Secure access to the console line.


To secure access to the console line, access config-line mode and set the console
password to letmein.
S1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)# line console 0
S1(config-line)#password letmein
S1(config-line)#login
S1(config-line)#exit
S1(config)# exit
%SYS-5-CONFIG_I: Configured from console by console
S1#
Question:
Why is the login command required?
In order for the password checking process to work, it requires both the login and password
commands

Step 3: Verify that console access is secured.


Exit privileged mode to verify that the console port password is in effect.
S1# exit
Switch con0 is now available
Press RETURN to get started.
User Access Verification
Password:
S1>
Note: If the switch did not prompt you for a password, then you did notconfigure
the login parameter in Step 2.

Step 4: Secure privileged mode access.


Set the enable password to c1$c0. This password protects access to privileged mode.
Note:The 0 in c1$c0 is a zero, not a capital O. This password will not grade as correct
until after you encrypt it in Step 8.
S1>enable
S1# configure terminal
S1(config)# enable password c1$c0
S1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
S1#

Step 5: Verify that privileged mode access is secure.


a. Enter the exit command again to log out of the switch.
b. Press <Enter> and you will now be asked for a password:
User Access Verification
Password:
c. The first password is the console password you configured for line con 0. Enter this
password to return to user EXECmode.
d. Enter the command to access privileged mode.
e. Enter the second password you configured to protect privileged EXEC mode.
f. Verify your configuration by examining the contents of the running-configuration
file:
S1#show running-config
Notice that the console and enable passwords are both in plain text. This could pose a
security risk if someone is looking over your shoulder or obtains access to config files
stored in a backup location.

Step 6: Configure an encrypted password to secure access to privileged mode.


The enable password should be replaced with the newer encrypted secret password using
the enable secret command. Set the enable secret password to itsasecret.
S1# config t
S1(config)# enable secret itsasecret
S1(config)# exit
S1#
Note: The enable secret password overrides the enable password. If both are configured
on the switch, you must enter the enable secret password to enter privileged EXEC
mode.

Step 7: Verify that the enable secret password is added to the configuration file.
Enter the show running-config command again to verify the new enable secret password
is configured.
Note: You can abbreviate show running-config as
S1# show run
Questions:
What is displayed for the enable secret password?
$1$mERr$ILwq/b7kc.7X/ejA4Aosn0
Why is the enable secret passworddisplayed differently from what we configured?

The enable secret is shown in encrypted form, whereas the enable password is in plain text.

Step 8: Encrypt the enable and console passwords.


As you noticed in Step 7, the enable secretpassword was encrypted, but
the enableandconsole passwords were still in plain text. We will now encrypt these plain
text passwords using the service password-encryption command.
S1# config t
S1(config)# service password-encryption
S1(config)# exit
Question:
If you configure any more passwords on the switch, will they be displayed in the
configuration file as plain text or in encrypted form? Explain.
The service password-encryption command encrypts all current and future passwords.

Part 3: Configure a MOTD Banner


Step 1: Configure a message of the day (MOTD) banner.
The Cisco IOS command set includes a feature that allows you to configure messages that
anyone logging onto the switch sees. These messages are called message of the day, or
MOTD banners. Enclose the banner text in quotations or use a delimiter different from
any character appearing in the MOTD string.
S1#config t
S1(config)#banner motd “This is a secure system. Authorized Access Only!”
S1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
S1#
Questions:
When will this banner be displayed?
The message will be displayed when someone accesses the switch through the console port.
Why should every switch have a MOTD banner?

Every switch should have a banner to warn unauthorized users that access is prohibited. Banners
can also be used for sending messages to network personnel/technicians (such as impending system
shutdowns or who to contact for access).

Part 4: Save and Verify Configuration Files to NVRAM

Step 1: Verify that the configuration is accurate using the show run command.
Save the configuration file. You have completed the basic configuration of the switch.
Now back up the running configuration file to NVRAM to ensure that the changes made
are not lost if the system is rebooted or loses power.
S1#copy running-configstartup-config
Destination filename [startup-config]?[Enter]
Building configuration…
[OK]
Questions:
What is the shortest, abbreviated version of the copy running-configstartup-
config command?
cop r s

Examine the startup configuration file.


Which command will display the contents of NVRAM?

show startup-config

Are all the changes that were entered recorded in the file?

Yes, it is the same as the running configuration.

Part 5: Configure S2
You have completed the configuration on S1. You will now configure S2. If you cannot
remember the commands, refer to Parts 1 to 4 for assistance.
Configure S2 with the following parameters:
Open Configuration Window for S2
a. Device name: S2
b. Protect access to the console using the letmein password.
c. Configure an enable password of c1$c0and an enable secret password of itsasecret.
d. Configure an appropriate message to those logging into the switch.
e. Encrypt all plain text passwords.
f. Ensure that the configuration is correct.
g. Save the configuration file to avoid loss if the switch is powered down.

Switch> enable
Switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# hostname S2
S2(config)# line console 0
S2(config-line)# password letmein
S2(config-line)# login
S2(config-line)# enable password c1$c0
S2(config)# enable secret itsasecret
S2(config)# banner motd $any text here$
S2(config)# service password-encryption
S2(config)# exit
S2#copy running-configstartup-config

Topology
Experiment No. 7
Aim: To construct a Wireless LAN and make the PC’s communicate wirelessly

Requirements
 Windows pc – 2 Nos
 CISCO Packet Tracer Software ( Student Version)
 8 port switch – 1 No
 Cat-5 LAN cable
Procedure
 Open the CISCO Packet tracer software
 Drag and drop 2 Laptop pcs using End Device Icons on the left corner
 Select Access point and server from wireless devices
 Select laptop-> physical-> OFF laptop-> remove LAN Module & replace WPC 300N
 Wireless module -> ON Laptop
 Observe the wireless connections between access point and laptops
 Give IP address of the PCs as per table, ping between PCs and observe the transfer of
 data packets in real and simulation mode.
Theory

A Wireless Local Area Network (WLAN) implements a flexible data communication


system frequently augmenting rather than replacing a wired LAN within a building or
campus. WLANs use radio frequency to transmit and receive data over the air,
minimizing the need for wired connections.

Network Topology Diagram for Wireless LAN


WLAN OUTPUT WINDOW:(PINGING FROM laptop 1- laptop 0)
C:\>ping 169.254.129.204
Pinging 169.254.129.204 with 32 bytes of data:
Reply from 169.254.129.204: bytes=32 time=30ms TTL=128
Reply from 169.254.129.204: bytes=32 time=16ms TTL=128
Reply from 169.254.129.204: bytes=32 time=15ms TTL=128
Reply from 169.254.129.204: bytes=32 time=13ms TTL=128
Ping statistics for 169.254.129.204:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 13ms, Maximum = 30ms, Average = 18ms

Experiment No. 8
Aim: Study of basic network command and Network configuration commands

Apparatus (Software): Command Prompt And Packet Tracer.

Procedure: To do this EXPERIMENT- follows these steps:


In this EXPERIMENT- students have to understand basic networking commands e.g ping,
tracer etc.
All commands related to Network configuration which includes how to switch to
privilege mode and normal mode and how to configure router interface and how to save this
configuration to
flash memory or permanent memory.

This commands includes


• Configuring the Router commands
• General Commands to configure network
• Privileged Mode commands of a router
• Router Processes & Statistics
• IP Commands
• Other IP Commands e.g. show ip route etc.

ping: ping(8) sends an ICMP ECHO_REQUEST packet to the specified host. If the host
responds, you get an ICMP packet back. Sound strange? Well, you can “ping” an IP address
to see if a machine is alive. If there is no response, you know something is wrong.
Traceroute: Tracert is a command which can show you the path a packet of information
takes from yourcomputer to one you specify. It will list all the routers it passes through until
it reaches its destination, or fails to and is discarded. In addition to this, it will tell you how
long each 'hop' from router to router takes.
nslookup: Displays information from Domain Name System (DNS) name servers.
NOTE :If you write the command as above it shows as default your pc's server name firstly.

pathping: A better version of tracert that gives you statics about packet lost and latency.
Getting Help In any command mode, you can get a list of available commands by entering a
question mark (?).
Router>?
To obtain a list of commands that begin with a particular character sequence, type in those
haracters followed immediately by the question mark (?).
Router#co?

configure connect copy


To list keywords or arguments, enter a question mark in place of a keyword or argument.
Include a space before the question mark.
Router#configure ?
memory Configure from NV memory network Configure from a TFTP network host terminal
Configure from the terminal You can also abbreviate commands and keywords by entering
just enough characters to make the command unique from other commands. For example,
you can abbreviate the showcommand to sh.
Configuration Files
Any time you make changes to the router configuration, you must save the changes to
memory because if you do not they will be lost if there is a system reload or power outage.
There are two types of configuration files: the running (current operating) configuration and
thestartup configuration.
Experiment No. 9

Aim: Study of Application layer protocols-DNS, HTTP, HTTPS, FTP and TelNet
Theory:
Application layer protocols:
Protocols in each layer of the network model provide a mechanism for devices to identify
and connect. They also contain formatting rules specifying how data is packaged when the
messages are sent and received.
There are several protocols in the application layer used for different services like email
services, file transfers, etc. We will look at each one of them one by one.
1. DNS: Domain Name System (DNS)
DNS is a hierarchy and distributed naming system for computers, services, and other Internet
resources or IP networks. DNS is responsible for translating domain names into IP addresses
for locating and identifying computer services and devices with the underlying network
protocols. It is responsible for assigning domain names to authoritative name servers for each
domain, providing distributed and fault-tolerant service.
DNS defines the DNS protocol, which specifies the technical functionality of the database
service at its core and the data structures and communication exchanges used.
'dig', 'host', and 'nslookup' are frequently used DNS protocol commands. You can use these
commands to ask DNS servers questions and get data on domains, IP addresses, and other
related topics. Using the '+short' option with the 'dig' or 'host' command will provide a
concise response to a DNS query.
Common characteristics of the DNS protocol include:
 Translates domain names into IP addresses.
 Operates over UDP/TCP on port 53.
 Utilizes hierarchical distributed naming system.
 Provides domain name resolution for internet resources.
2. Hypertext Transfer Protocol (HTTP)
HTTP/HTTPS
HTTP stands for Hypertext Transfer Protocol and HTTPS is the more secured version of
HTTP, that’s why HTTPS stands for Hypertext Transfer Protocol Secure. This protocol is
used to access data from the World Wide Web. The Hypertext is the well-organized
documentation system that is used to link pages in the text document.
 HTTP is based on the client-server model.
 It uses TCP for establishing connections.
 HTTP is a stateless protocol, which means the server doesn’t maintain any information
about the previous request from the client.
 HTTP uses port number 80 for establishing the connection.
The World Wide Web's foundational protocol is HTTP. It supports web client and server
communication and loads web pages using hypertext links. An individual, known as the user-
agent, requests a server using the client-server protocol known as HTTP. The user agent is
typically a web browser.
The protocol outlines the message transmission and reception between the client and server
and how to exchange resources like HTML or hypertext documents.
JavaScript programmers can use the fetch() API or the Axios library to send HTTP requests.
Here is an example of how to make the request using the fetch() API:
3. File Transfer Protocol (FTP)
FTP is an application layer protocol that transfers files between local and remote systems. It
runs on TCP/IP and uses separate control and data connections. The end user's computer is
the local host in an FTP transaction. FTP can be used to transmit files from one host to
another. FTP is often secured with SSL/TLS or replaced with SSH File Transfer Protocol
(SFTP) to encrypt the content and protect the username and password.
The FTP protocol is widely used to exchange data between hosts, update websites, and
deliver content. ALG (application layer gateway) can be enabled or disabled for the FTP
protocol for a DS-Lite configuration.
The FTP protocol can be used with several commands,
including PORT, PWD, LIST, CD, PUT, and GET.
Common characteristics of the FTP (File Transfer Protocol) protocol include:
1. FTP operates over TCP/IP and is used for transferring files between a client and a
server.
2. It uses separate control and data connections: the control connection for sending
commands and receiving responses, and the data connection for transferring files.
3. FTP supports various authentication methods, including username/password
authentication and anonymous FTP.
4. It allows for both ASCII and binary file transfer modes, enabling the transfer of text and
binary files with appropriate handling of line breaks and character encoding.
4. Telnet
"Teletype network" is what Telnet stands for. A remote terminal access application layer
protocol is used. Telnet enables users to sign in to a distant computer as if they were
physically nearby. TCP port 23 is used for transmission.
Telnet is a text-based protocol where the client and server exchange commands and answers.
Telnet is insecure because it transmits data and login credentials in clear text, leaving it open
to interception.
The central command to use Telnet is to connect to a remote server with telnet
<serverIP> command.
Common characteristics of the Telnet protocol include:
 Telnet is a protocol used for remotely accessing and managing devices over a network.
 Operates over TCP on port 23.
 Provides a text-based interface for logging into remote systems and executing
commands.
 Lacks encryption and security features, making it vulnerable to eavesdropping and
interception.
 Historically widely used for remote administration of servers and network devices but
now considered insecure due to its lack of encryption, often replaced by more secure
protocols like SSH (Secure Shell).
5. Simple Mail Transfer Protocol (SMTP)
It is a widely used Internet protocol for sending emails between servers. When sending
emails from one mail server to another, SMTP uses other protocols like POP3 or IMAP to
get the emails to their destinations. SMTP establishes the format for email messages and
transmits them using TCP port 25 or 587.
STARTTLS or SSL/TLS are two encryption protocols that can be used with SMTP to protect
email transmission. SMTP provides a dependable and effective method for sending and
receiving emails online. The client and server exchange commands and responses using the
text-based SMTP protocol.
The SMTP protocol's standard commands include EHLO, MAIL FROM, RCPT TO,
DATA, and QUIT. These commands are used in the above order to open communication
between the client and the email server, send an email, and end the session.
Common characteristics of the SMTP protocol include:
 Used for sending email messages between servers.
 Operates over TCP on port 25.
 Follows a client-server model for email transmission.
 Supports basic email delivery and forwarding functionalities.
Result: The Application layer protocols was successfully studied.

Experiment No. 10
Aim: Study of MAC Protocols like Aloha, CSMA, CSMA/CD and CSMA/CA using
Standard Network Simulators
Theory:
Multiple Access Protocols in Computer Network
The Data Link Layer is responsible for transmission of data between two nodes. Its main
functions
are-
 Data Link Control
 Multiple Access Control
Data Link Layer: The data link layer is used in a computer network to transmit the data
between two devices or nodes. It divides the layer into parts such as data link control and
the multiple access resolution/protocol. The upper layer has the responsibility to flow
control and the error control in the data link layer, and hence it is termed as logical of data
link control. Whereas the lower sub-layer is used to handle and reduce the collision or
multiple access on a channel. Hence it is termed as media access control or the multiple
access resolutions.
Data Link Control: A data link control is a reliable channel for transmitting data over a
dedicated link using various techniques such as framing, error control and flow control of
data packets in the computer network.

A. Random Access Protocol


In this protocol, all the station has the equal priority to send the data over a channel. In
random access protocol, one or more stations cannot depend on another station nor any
station control another station. Depending on the channel's state (idle or busy), each station
transmits the data frame. However, if more than one station sends the data over a channel,
there may be a collision or data conflict. Due to the collision, the data frame packets may be
lost or changed. And hence, it does not receive by the receiver end.Following are the different
methods of random-access protocols for broadcasting frames on the channel.

o Aloha
o CSMA
o CSMA/CD
o CSMA/CA

ALOHA Random Access Protocol

It is designed for wireless LAN (Local Area Network) but can also be used in a shared
medium to transmit data. Using this method, any station can transmit data across a network
simultaneously when a data frameset is available for transmission.

Aloha Rules

1. Any station can transmit data to a channel at any time.


2. It does not require any carrier sensing.
3. Collision and data frames may be lost during the transmission of data through
multiple stations.
4. Acknowledgment of the frames exists in Aloha. Hence, there is no collision detection.
5. It requires retransmission of data after some random amount of time.

Pure Aloha:Whenever data is available for sending over a channel at stations, we use Pure
Aloha. In pure Aloha, when each station transmits data to a channel without checking
whether the channel is idle or not, the chances of collision may occur, and the data frame can
be lost. When any station transmits the data frame to a channel, the pure Aloha waits for the
receiver's acknowledgment. If it does not acknowledge the receiver end within the specified
time, the station waits for a random amount of time, called the backoff time (Tb). And the
station may assume the frame has been lost or destroyed. Therefore, it retransmits the frame
until all the data are successfully transmitted to the receiver.

1. The total vulnerable time of pure Aloha is 2 * Tfr.


2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = G * e ^ - 2 G.
As we can see in the figure above, there are four stations for accessing a shared channel and
transmitting data frames. Some frames collide because most stations send their frames at the
same time. Only two frames, frame 1.1 and frame 2.2, are successfully transmitted to the
receiver end. At the same time, other frames are lost or destroyed. Whenever two frames fall
on a shared channel simultaneously, collisions can occur, and both will suffer damage. If the
new frame's first bit enters the channel before finishing the last bit of the second frame. Both
frames are completely finished, and both stations must retransmit the data frame.

Slotted Aloha:The slotted Aloha is designed to overcome the pure Aloha's efficiency
because pure Aloha has a very high possibility of frame hitting. In slotted Aloha, the shared
channel is divided into a fixed time interval called slots. So that, if a station wants to send a
frame to a shared channel, the frame can only be sent at the beginning of the slot, and only
one frame is allowed to be sent to each slot. And if the stations are unable to send data to the
beginning of the slot, the station will have to wait until the beginning of the slot for the next
time. However, the possibility of a collision remains when trying to send a frame at the
beginning of two or more station time slot.

1. Maximum throughput occurs in the slotted Aloha when G = 1 that is 37%.


2. The probability of successfully transmitting the data frame in the slotted Aloha is S =
G * e ^ - 2 G.
3. The total vulnerable time required in slotted Aloha is Tfr.
CSMA (Carrier Sense Multiple Access):It is a carrier sense multiple access based on
media access protocol to sense the traffic on a channel (idle or busy) before transmitting
the data. It means that if the channel is idle, the station can send data to the channel.
Otherwise, it must wait until the channel becomes idle. Hence, it reduces the chances of
a collision on a transmission medium.

CSMA Access Modes

1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared
channel and if the channel is idle, it immediately sends the data. Else it must wait and keep
track of the status of the channel to be idle and broadcast the frame unconditionally as soon
as the channel is idle.

Non-Persistent: It is the access mode of CSMA that defines before transmitting the data,
each node must sense the channel, and if the channel is inactive, it immediately sends the
data. Otherwise, the station must wait for a random time (not continuously), and when the
channel is found to be idle, it transmits the frames.

P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-


Persistent mode defines that each node senses the channel, and if the channel is inactive, it
sends a frame with a P probability. If the data is not transmitted, it waits for a (q = 1-p
probability) random time and resumes the frame with the next time slot.
O- Persistent: It is an O-persistent method that defines the superiority of the station before
the transmission of the frame on the shared channel. If it is found that the channel is inactive,
each station waits for its turn to retransmit the data.

CSMA/ CD: It is a carrier sense multiple access/ collision detection network protocol to
transmit data frames. The CSMA/CD protocol works with a medium access control
layer. Therefore, it first senses the shared channel before broadcasting the frames, and
if the channel is idle, it transmits a frame to check whether the transmission was
successful. If the frame is successfully received, the station sends another frame. If any
collision is detected in the CSMA/CD, the station sends a jam/ stop signal to the shared
channel to terminate data transmission. After that, it waits for a random time before
sending a frame to a channel.

CSMA/ CA:It is a carrier sense multiple access/collision avoidance network protocol for
carrier transmission of data frames. It is a protocol that works with a medium access
control layer. When a data frame is sent to a channel, it receives an acknowledgment to
check whether the channel is clear. If the station receives only a single (own)
acknowledgments, that means the data frame has been successfully transmitted to the
receiver. But if it gets two signals (its own and one more in which the collision of
frames), a collision of the frame occurs in the shared channel. Detects the collision of the
frame when a sender receives an acknowledgment signal.

Following are the methods used in the CSMA/ CA to avoid the collision:

Interframe space: In this method, the station waits for the channel to become idle, and if it
gets the channel is idle, it does not immediately send the data. Instead of this, it waits for
some time, and this time period is called the Interframe space or IFS. However, the IFS time
is often used to define the priority of the station.

Contention window: In the Contention window, the total time is divided into different slots.
When the station/ sender is ready to transmit the data frame, it chooses a random slot number
of slots as wait time. If the channel is still busy, it does not restart the entire process, except
that it restarts the timer only to send data packets when the channel is inactive.

Acknowledgment: In the acknowledgment method, the sender station sends the data frame to
the shared channel if the acknowledgment is not received ahead of time.

B. Controlled Access Protocol

It is a method of reducing data frame collision on a shared channel. In the controlled access
method, each station interacts and decides to send a data frame by a particular station
approved by all other stations. It means that a single station cannot send the data frames
unless all other stations are not approved. It has three types of controlled
access: Reservation, Polling, and Token Passing.

C. Channelization Protocols

It is a channelization protocol that allows the total usable bandwidth in a shared channel to be
shared across multiple stations based on their time, distance and codes. It can access all the
stations at the same time to send the data frames to the channel.

Following are the various methods to access the channel based on their time, distance and
codes:

1. FDMA (Frequency Division Multiple Access)


2. TDMA (Time Division Multiple Access)
3. CDMA (Code Division Multiple Access)

FDMA: It is a frequency division multiple access (FDMA) method used to divide the
available bandwidth into equal bands so that multiple users can send data through a different
frequency to the subchannel. Each station is reserved with a particular band to prevent the
crosstalk between the channels and interferences of stations.

TDMA:Time Division Multiple Access (TDMA) is a channel access method. It allows the
same frequency bandwidth to be shared across multiple stations. And to avoid collisions in
the shared channel, it divides the channel into different frequency slots that allocate stations
to transmit the data frames. The same frequency bandwidth into the shared channel by
dividing the signal into various time slots to transmit it. However, TDMA has an overhead of
synchronization that specifies each station's time slot by adding synchronization bits to each
slot.

CDMA: The code division multiple access (CDMA) is a channel access method. In CDMA,
all stations can simultaneously send the data over the same channel. It means that it allows
each station to transmit the data frames with full frequency on the shared channel at all times.
It does not require the division of bandwidth on a shared channel based on time slots. If
multiple stations send data to a channel simultaneously, their data frames are separated by a
unique code sequence. Each station has a different unique code for transmitting the data over
a shared channel. For example, there are multiple users in a room that are continuously
speaking. Data is received by the users if only two-person interact with each other using the
same language. Similarly, in the network, if different stations communicate with each other
simultaneously with different code language.
Next Topic

You might also like