Experiment -1
Aim: - Configuration and logging to a CISCO Router and introduction to the basic user
Interfaces. Introduction to the basic router configuration and basic commands.
Pre-requisites: Cisco Packet Tracer
Theory: - 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.
Step 1: Connect to the Router
a. Connect the console cable to the console port of the Cisco router.
b. Connect the other end of the console cable to your computer's serial port or USB port
using an adapter.
c. Open the terminal emulation software (e.g., PuTTY).
d. Configure the terminal emulator to connect to the router using the appropriate serial
port and settings (9600 bps, 8 data bits, 1 stop bit, no parity).
Step 2: Access the Basic User Interfaces: - Once connected, you should see the router
prompt. Access the different user interfaces:
- Enter the user EXEC mode: Router> (prompt may vary)
- Enter the privileged EXEC mode: Router# (prompt may vary)
- Enter the global configuration mode: Router(config)# (prompt may vary).
Step 3: Basic Router Configuration
a. Enter global configuration mode by typing enable and then configure terminal.
b. Configure the router hostname: hostname YourRouterName.
c. Set a password for privileged EXEC mode: enable secret YourPassword.
d. Set a password for console access: line console 0 and then password
YourConsolePassword.
e. Secure virtual terminal lines: line vty 0 4 and then password YourVTYPassword.
f. Save the configuration: write memory.
Step 4: Basic Commands
a. Display the running configuration: show running-config.
b. Display the interfaces on the router: show ip interface brief.
c. Verify the routing table: show ip route.
d. Check the status of interfaces: show interfaces status.
Step 5: Enable Logging
a. Enter global configuration mode: configure terminal.
b. Enable logging to the console: logging console.
c. Enable logging to a syslog server (if available): logging host x.x.x.x (replace x.x.x.x with the
syslog server's IP address).
d. Set logging severity level: logging trap severity-level (e.g., logging trap informational).
Step 6: Test Logging
a. Intentionally generate a log message (e.g., disconnect and reconnect a network cable).
b. Check the console for log messages: show logging.
Experiment - 2
Aim: - Configuration of IP addressing for a given scenario for a given set of topologies.
Pre-requisites: Cisco Packet Tracer
Theory: -
Topology 1: Point-to-Point Connection: - Configure IP addressing for a simple point-to-point
connection between two routers.
Procedure:
1. Connect to Router 1 and enter global configuration mode.
2. Assign IP addresses to the connected interfaces: interface GigabitEthernet0/0 and ip
address [Link] [Link].
3. Repeat the process on Router 2 with an IP address of [Link] on the corresponding
interface.
4. Verify connectivity using the ping command between the routers.
Fig 2.1 Point to point connection
Topology 2: Basic LAN with a Switch: - Configure IP addressing for a basic local area
network (LAN) using a router and a switch.
Procedure:
1. Connect a router and a switch. Connect hosts to the switch.
2. Configure the router interface connected to the switch: interface GigabitEthernet0/0 and
ip address [Link] [Link].
3. Configure IP addresses for hosts in the same subnet.
4. Verify connectivity by pinging between hosts and the router.
Fig 2.2 Basic LAN with a switch
Topology 3: Subnetting for Multiple LANs: - Implement IP addressing with subnetting for a
network with multiple LANs.
Procedure:
1. Connect a router and two switches. Connect hosts to the switches.
2. Subnet the network and assign IP addresses to router interfaces: interface
GigabitEthernet0/0.10 with encapsulation dot1Q 10 and ip address [Link]
[Link].
3. Repeat the process for the second subnet: interface GigabitEthernet0/0.20 with
encapsulation dot1Q 20 and ip address [Link] [Link].
4. Assign IP addresses to hosts in their respective subnets.
5. Verify connectivity within each subnet and between subnets.
Fig 2.3 Subnetting for Multiple LAN
Topology 4: Three-router Interconnection: - Configure IP addressing for a network with
three routers interconnected.
Procedure:
1. Connect three routers in a series.
2. Assign IP addresses to the router interfaces: interface GigabitEthernet0/0 with ip address
[Link] [Link], interface GigabitEthernet0/1 with ip address [Link]
[Link], and so on.
3. Configure routing protocols (e.g., OSPF or EIGRP) to enable communication between
routers.
4. Verify end-to-end connectivity by pinging between hosts connected to different routers.
Fig 2.4 Three Router Interconnection
Experiment - 3
Aim: - Configure a DHCP Server to serve contiguous IP addresses to a pool of four IP
devices with a default gateway and DNS address. Integrate the DHCP server with a BOOTP
demon to automatically serve Windows and Linux OS Binaries based on the client MAC
address.
Pre-requisites: Cisco Packet Tracer
Theory: -
PART 1: Configure DHCP Server: -
Step 1: Install DHCP Server Software
Step 2: Configure DHCP Server: - Edit the DHCP server configuration file. Add the following
configuration:
subnet [Link] netmask [Link] {
range [Link] [Link];
option routers [Link];
option domain-name-servers [Link];
}
Save the file and exit.
Step 3: Restart DHCP Server: sudo service isc-dhcp-server restart
Fig 3.1 DHCP Server
Part 2: Integrate BOOTP Daemon: -
Step 1: Install BOOTP Daemon: sudo apt install bootp
Step 2: Configure BOOTP Daemon: - Edit the BOOTP daemon configuration file:
sudo nano /etc/bootptab
Add entries for Windows and Linux OS binaries based on client MAC addresses:
# Windows Binary
host windows-pc {
hardware ethernet [Link];
filename "[Link]";
next-server [Link];
}
# Linux Binary
host linux-pc {
hardware ethernet [Link];
filename "[Link]";
next-server [Link];
}
Save the file and exit.
Step 3: Restart BOOTP Daemon: - sudo service bootp restart
Part 3: Test Configuration: -
Step 1: Connect Devices: - Connect four devices to the network.
Step 2: DHCP Lease Test: - Check if the devices receive IP addresses from the DHCP server:
sudo dhclient -v -r
sudo dhclient -v
Step 3: BOOTP Binary Test:- Verify that Windows and Linux PCs receive the appropriate
binaries based on their MAC addresses.
Experiment - 4
Aim: - Configure, implement, and debug the following: Use open-source tools for
debugging anddiagnostics.
a. ARP/RARP protocols
b. RIP routing protocols
c. BGP routing
d. OSPF routing protocols
e. Static routes (check using netstat)
Pre-requisites: Cisco Packet Tracer
Theory: -
Part 1: ARP/RARP Protocols: -
The Address Resolution Protocol (ARP) is a telecommunication protocol used for the
resolution ofInternet layer addresses into link layer addresses, a critical function in multiple-
access networks. ARP is used for mapping a network address (e.g. an IPv4 address) to a
physical address like an Ethernet address (also named a MAC address). ARP has been
implemented with many combinations of network and data link layer technologies, like IPv4,
FDDI, X.25, Frame Relay, and Asynchronous Transfer Mode (ATM). IPv4 over IEEE 802.3
and IEEE 802.11 is the most common case.
The Reverse Address Resolution Protocol (RARP) is an obsolete computer networking
protocol used by a client computer to request its Internet Protocol (IPv4) address from a
computer network when all it has available is its link layer or hardware address, such as a
MAC address. The client broadcasts the request and does not need prior knowledge of the
network topology or the identities of servers capable of fulfilling its request. RARP requires
one or more server hosts to maintain a database of mappings of Link Layer addresses to their
respective protocol addresses. Media Access Control (MAC) addresses need tobe individually
configured on the servers by an administrator. RARP is limited to serving only IP addresses.
Step 1: Configure ARP/RARP
# Enable ARP: sudo arp -s [Link] [Link]
# Enable RARP: sudo rarpd -a
Step 2: Debugging with tcpdump: - sudo tcpdump -i <interface> arp
Part 2: RIP Routing Protocol: -
Step 1: Install Quagga (RIP Daemon): - sudo apt update && sudo apt install quagga
Step 2: Configure RIP:
# Edit the RIP daemon configuration file: - sudo nano /etc/quagga/[Link]
# Add the following configuration: router rip network <your_network>
Step 3: Start RIP Daemon: - sudo service quagga start
Step 4: Debugging with tcpdump: - sudo tcpdump -i <interface> udp port 520
Part 3: BGP Routing Protocol: -
Step 1: Install Quagga (BGP Daemon): - sudo apt update && sudo apt install quagga
Step 2: Configure BGP: -
# Edit the BGP daemon configuration file: sudo nano /etc/quagga/[Link]
# Add the following configuration:
router bgp <your_ASN>
neighbor <neighbor_IP> remote-as <neighbor_ASN>
network <your_network>
Step 3: Start BGP Daemon: - sudo service quagga start
Step 4: Debugging with tcpdump: - sudo tcpdump -i <interface> tcp port 179
Part 4: OSPF Routing Protocol: -
Step 1: Install Quagga (OSPF Daemon): - sudo apt update sudo apt install quagga
Step 2: Configure OSPF
# Edit the OSPF daemon configuration file: sudo nano /etc/quagga/[Link]
# Add the following configuration:
router ospf
network <your_network> area [Link]
Step 3: Start OSPF Daemon: - sudo service quagga start
Step 4: Debugging with tcpdump: - sudo tcpdump -i <interface> ospf
Part 5: Static Routes: -
Step 1: Configure Static Routes: - sudo ip route add [Link]/24 via [Link]
Step 2: Check Static Routes with netstat: - netstat -rn
Experiment – 5
Aim: - Configure DNS: Make a caching DNS client and a DNS Proxy; implement reverse
DNS and forward DNS, using TCP dump/Wireshark to characterize traffic when the DNS
server is up and down.
Pre-requisites: Cisco Packet Tracer, TCP dump, Wireshark
Theory: - A Domain Name System (DNS) turns domain names into IP addresses, which allow
browsers to get to websites and other internet resources. Every device on the internet has
an IP address, which other devices can use to locate the device.
Part 1: Configure Caching DNS Client
Step 1: Install DNS Utilities: - sudo apt update && sudo apt install dnsutils
Step 2: Configure Caching DNS Client
# Edit the /etc/[Link] file: sudo nano /etc/[Link]
# Add the following lines: nameserver [Link]
Step 3: Test Caching DNS:
# Perform DNS queries: - nslookup [Link]
Part 2: Configure DNS Proxy: -
Step 1: Install and Configure DNSMasq: - sudo apt install dnsmasq
# Edit the DNSMasq configuration file: sudo nano /etc/[Link]
# Add the following lines: cache-size=1000
Step 2: Restart DNSMasq: - sudo service dnsmasq restart
Part 3: Implement Reverse DNS and Forward DNS: -
Step 1: Edit the DNS Proxy Configuration: - sudo nano /etc/[Link]
# Add the following lines to enable reverse DNS:
# Enable reverse DNS: - rev-server=[Link]/24,[Link]
Step 2: Restart DNSMasq: - sudo service dnsmasq restart
Step 3: Test Reverse DNS
# Perform a reverse DNS lookup: - nslookup [Link]
Step 4: Test Forward DNS
# Perform a forward DNS lookup: - nslookup [Link]
Part 4: Analyze DNS Traffic with TCP Dump/Wireshark: -
Step 1: Capture DNS Traffic: - sudo tcpdump -i <interface> port 53 -w dns_traffic.pcap
Step 2: Analyze DNS Traffic with Wireshark: - Open Wireshark and load the dns_traffic.pcap
file.
# Observe DNS queries and responses.
# Analyze the interactions between the caching DNS client and the DNS proxy.
Part 5: Simulate DNS Server Unavailability: -
Step 1: Stop DNSMasq: - sudo service dnsmasq stop
Step 2: Capture DNS Traffic during Unavailability: - Repeat Steps 1 and 2 from Part 4 to
capture DNS traffic while the DNS server is down.
Experiment - 6
Aim: - Configure FTP Server on a Linux/Windows machine using an FTP
client/SFTP clientcharacterize file transfer rate for a cluster of small files of 100k
each and a video file of [Link] a TFTP clientand repeat the experiment.
Pre-requisites: Cisco Packet Tracer
Theory: -
Part 1: Configure FTP Server:
Step 1: Install and Configure FTP Server on Linux (vsftpd)
# For Debian/Ubuntu: - sudo apt update && sudo apt install vsftpd
# Edit the vsftpd configuration file: sudo nano /etc/[Link]
# Add/modify the following lines:
write_enable=YES
local_enable=YES
chroot_local_user=YES
# Restart vsftpd: sudo service vsftpd restart
Step 2: Install and Configure FTP Server on Windows (FileZilla Server)
Download and install FileZilla Server: [Link]
[Link]/[Link]?type=server
Part 2: Characterize File Transfer Rate with FTP/SFTP:
Step 1: Use FTP/SFTP Client to Transfer Small Files
• Connect to the FTP server using an FTP/SFTP client (e.g., FileZilla, WinSCP).
• Transfer a cluster of small files (100KB each) to the server.
• Record the time taken for the transfer.
Step 2: Use FTP/SFTP Client to Transfer a Large Video File
• Transfer the large video file (700MB) to the server.
• Record the time taken for the transfer.
Part 3: Configure and Use TFTP Client: -
Step 1: Install TFTP Client on Linux
# For Debian/Ubuntu: - sudo apt install tftp
Step 2: Install Tftpd32 on Windows
Download and install Tftpd32: [Link]
Step 3: Use TFTP Client to Transfer Small Files
• Connect to the TFTP server using the TFTP client.
• Transfer the same cluster of small files (100KB each) to the server.
• Record the time taken for the transfer.
Step 4: Use TFTP Client to Transfer a Large Video File
• Transfer the large video file (700MB) to the server.
• Record the time taken for the transfer.
Experiment - 7
Aim: - Configure a mail server for IMAP/POP protocols and write a simple SMTP
client inC/C++/Java client to send and receive mail.
Pre-requisites: Cisco Packet Tracer
Theory: -
Configure a Mail Server for IMAP/POP: -
1. Install Postfix (SMTP Server):
• Update your package list: sudo apt update (for Debian/Ubuntu) or sudo yum update (for
CentOS/RHEL).
• Install Postfix: sudo apt install postfix or sudo yum install postfix.
• Follow the on-screen prompts to configure Postfix. Choose "Internet Site" and enter your
domain.
2. Install Dovecot (IMAP/POP Server):
• Install Dovecot: sudo apt install dovecot-core dovecot-imapd dovecot-pop3d or sudo
yum install dovecot.
• Edit the Dovecot configuration: sudo nano /etc/dovecot/[Link].
• Set protocols = imap pop3 to enable both IMAP and POP.
• Restart Dovecot: sudo service dovecot restart.
3. Configure SSL (Optional): - For secure connections, consider setting up SSL/TLS.
Obtain and configure SSL certificates for your domain.
4. Create Email Accounts: Use the adduser command to create user accounts for email
addresses.
5. Test IMAP and POP Access: Use an email client (e.g., Thunderbird, Outlook) to test
IMAP and POP access to your server.
Part 2: Simple SMTP Client in C: -
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#define SERVER_IP "your_mail_server_ip"
#define SERVER_PORT 25
int main() {
int sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock == -1) {
perror("Socket creation failed");
exit(EXIT_FAILURE); }
struct sockaddr_in server;
server.sin_family = AF_INET;
server.sin_port = htons(SERVER_PORT);
if (inet_pton(AF_INET, SERVER_IP, &server.sin_addr) <= 0) {
perror("Invalid address/ Address not supported");
exit(EXIT_FAILURE); }
if (connect(sock, (struct sockaddr *)&server, sizeof(server)) < 0) {
perror("Connection failed");
exit(EXIT_FAILURE); }
char buffer[1024];
recv(sock, buffer, sizeof(buffer), 0);
printf("%s", buffer); // Expecting a welcome message
// Replace these placeholders with your email details
char *from = "your_email@[Link]";
char *to = "recipient@[Link]";
char *subject = "Test Subject";
char *body = "This is a test email from the SMTP client.";
char message[1024];
snprintf(message, sizeof(message), "EHLO localhost\r\n"
"MAIL FROM:<%s>\r\n"
"RCPT TO:<%s>\r\n"
"DATA\r\n"
"Subject: %s\r\n"
"\r\n%s\r\n"
".\r\n"
"QUIT\r\n",
from, to, subject, body);
send(sock, message, strlen(message), 0);
recv(sock, buffer, sizeof(buffer), 0);
printf("%s", buffer); // Expecting a closing connection message
close(sock);
return 0; }
Experiment - 8
Aim: - Implement Open NMS+ SNMPD for checking the Device status of devices in
community MIB of a Linux PC. Using yellow pages and NIS/NFS protocols implement
Network Attached StorageController (NAS).
Pre-requisites: Cisco Packet Tracer
Theory: -
Part 1: Implement OpenNMS and SNMPD for Device Monitoring
Step 1: Install OpenNMS: - sudo apt update sudo apt install opennms
Step 2: Configure SNMPD: - sudo apt install snmpd
# Edit the SNMPD configuration file: - sudo nano /etc/snmp/[Link]
# Add the following lines: - rocommunity public
# Restart SNMPD: - sudo service snmpd restart
Step 3: Access OpenNMS Web Interface: - Open a web browser and navigate to
[Link] Log in with the default credentials (admin/admin).
Step 4: Add SNMP Device
• Navigate to "Admin -> Provisioning Requisitions."
• Click "Add a Requisition."
• Provide a name and click "Save."
• Click "Edit" on the newly created requisition.
• Click "Add Interface."
• Enter the IP address of the Linux PC, set the SNMP version, and click "Save."
• Click "Scan for Nodes" and add the discovered nodes
Part 2: Set Up NAS with Yellow Pages and NIS/NFS Protocols: -
Step 1: Install NFS Server: - sudo apt install nfs-kernel-server
Step 2: Configure Exports: -
# Edit the NFS exports file: - sudo nano /etc/exports
# Add the following line: - /home/shared *(rw,sync,no_subtree_check)
# Restart NFS: - sudo service nfs-kernel-server restart
Step 3: Install NIS Server: - sudo apt install nis
Step 4: Configure NIS Server
# Edit the NIS configuration file: - sudo nano /etc/default/nis
# Set NISDOMAIN to a chosen domain name: - NISDOMAIN=[Link]
# Restart NIS: - sudo service nis restart
Step 5: Set Up Yellow Pages (YP) Server: - sudo apt install ypserv
# Edit the YP configuration file: - sudo nano /etc/default/nis
# Set DOMAIN to the same domain name used for NIS: - DOMAIN=[Link]
# Restart YP: - sudo service ypserv restart
Step 6: Add a User for NFS and NIS: - sudo useradd -m -s /bin/bash nasuser && sudo
passwd nasuser
Step 7: Test NFS and NIS:-
# Create a directory for NFS: - sudo mkdir /home/shared
# Mount the NFS share locally: - sudo mount -t nfs localhost:/home/shared /mnt
# Create a test file: - echo "Hello, NFS!" | sudo tee /mnt/testfile
# Verify NIS user authentication: - su – nasuser