Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
: Date:
Computer Networks (CS203) Rev No.: Nil Rev. Date: Nil
Clause: Nil Page: 1 of 36
Lab Manual
Table of Contents
1 System Requirements 5
2 Lab Objectives 5
Experiment Manual
(2) While entering into the LAB students should carry ID cards.
(4) Students should come with the record note book into the laboratory.
(6) After completing the laboratory exercise, make sure to shut-down the system properly.
DONT’S
(4) Students bringing pen drive or other secondary storage device inside the laboratory.
System Requirements
1. Intel based desktop PC of 2 GHz or faster processor with at least 2 GB RAM and 500 MB
2. Need of networking tool for simulation of network using Cisco packet Tracer, Network
simulator 2.0
Lab Objectives
1. The overall goal of the field of Computer network is to study different types of protocol
standard and network model, simulate with the help of simulator.
2. The student will learn what is the roll of layered architecture of protocol of reliable
communication.
3. Student will learn the layered architecture of OSI and TCP/IP model and detail study of each
layer responsibility.
4. The student will get practical experiences of protocol standard of each layer by
implementing, debugging and testing in Programming language like C and C++ (during the
Lab).
Practical - 1
IP Configuration:
Generic PC1: 169.254.90.147
Generic PC2: 169.254.155.23
Subnet Mask: 255.255.0.0
CIDR: /16
OUTPUT
Practical - 2
OUTPUT
Practical - 3
Aim: Simulate a network having two subnets in Cisco packet Tracer using 2
routers and 2 switches
Devices Used- 4 generic PC, 2 Switch, 2 generic routers, straight through cable and dotted
Cable.
IP Configuration-
Generic PCO : 192.168.1.2
Generic PC1 : 192.168.1.3
Generic PC2 : 192.168.3.2
Generic PC3 : 192.168.3.3
Subnet Mask : 255.255.255.0
CIDR : /24
IP at fa0/0 : 192.168.2.2
Router0 fa1/0 : 192.168.1.1
IP at fa0/0 : 192.168.2.3
Router1 fa1/0 : 192.168.3.1
OUTPUT
Practical - 4
IP Configuration-
CIDR : /24
IP at fa1/0 : 172.16.1.1
Router0 fa0/0 : 192.168.1.1
IP at fa1/0 : 172.16.1.2
Router1 fa1/0 : 192.168.3.1
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1
Router(config)#ip dhcp excluded-address 192.168.3.1
Router(config)#ip dhcp pool internal-LAN
Router(dhcp-config)#network 192.168.3.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.3.1
Router(dhcp-config)#exit
OUTPUT
Practical - 5
Aim: Simulate a network using Star Topology Using Cisco packet Tracer
Star Topology – This topology for a Local Area Network (LAN) in which all nodes
are individually connected to a central connection point, like a hub or a switch.
IP Configuration-
Generic PC 0: 192.168.1.1
Generic PC 1: 192.168.1.2
Generic PC 2: 192.168.1.3
OUTPUT
Practical - 6
Aim: Simulate a network using Bus Topology Using Cisco packet Tracer
Devices Used- 3 Generic PC, 3 Switch, Straight Through Cable and Cross Over
Cable.
Bus Topology – This topology for a Local Area Network (LAN) in which all the
nodes are connected to a single cable.
IP Configuration-
Generic PC 0: 192.168.1.1
Generic PC 1: 192.168.1.2
Generic PC 2: 192.168.1.3
OUTPUT
Practical - 7
Aim: Simulate a network using Ring Topology Using Cisco packet Tracer
Devices Used- 4 Generic PC, 4 Switch, Straight Through Cable and Cross Over
Cable.
Ring Topology – This topology for a Local Area Network (LAN) in which each
node connects to exactly two other nodes, forming a single continuous pathway
for signals through each node - a ring.
IP Configuration-
Generic PC 0: 192.168.1.1
Generic PC 1: 192.168.1.2
Generic PC 2: 192.168.1.3
Generic PC 3: 192.168.1.4
Subnet Mask: 255.255.255.0
OUTPUT
Practical - 8
Aim: Simulate a network using Mesh Topology Using Cisco packet Tracer
Devices Used- 4 Generic PC, 4 Switch, Straight Through Cable and Cross Over
Cable.
Mesh Topology – This topology for a Local Area Network (LAN) in which all
nodes cooperate to distribute data amongst each other.
IP Configuration-
Generic PC 0: 192.168.1.1
Generic PC 1: 192.168.1.2
Generic PC 2: 192.168.1.3
Generic PC 3: 192.168.1.4
Subnet Mask: 255.255.255.0
OUTPUT
Practical - 9
Aim: Implement NAT(network address translation) using Cisco Packet Tracker
IP Configuration-
CIDR : /24
At Router0:
fa0/0 : 27.0.1.2
fa1/0 : 192.168.1.1
At Router1:
fa0/0 : 27.0.1.1
fa1/0 : 10.0.0.1
At Server0:
fa0/0: 10.0.0.2
Default Gateway: 10.0.0.1
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#exit
OUTPUT
PC0:
Router 0
Router 1
Practical - 10
AIM: Create a DNS Server Using Cisco Packet Tracer.
Configuration Of Server:
DNS Server given IP address 8.8.8.8,
Subnet Mask: 255.255.255.0,
Default Gateway: 8.8.8.1
Configuration Of PC’s:
Generic PC0:
IP address 192.168.1.2,
Default Gateway 192.168.1.1
DNS Server 8.8.8.8
Generic PC1:
IP address 192.168.1.3,
Default Gateway 192.168.1.1
DNS Server 8.8.8.8
Configuration Of Routers:
Router0:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Prepared by: Reviewed by: Approved by:
Dr Aditya K Saxena
Issue No.: Date:
Computer Networks (CS203) Rev No.: Nil Rev. Date: Nil
Clause: Nil Page: 21 of 36
Lab Manual
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int fa0/1
Router(config-if)#ip address 27.0.1.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#ip route 8.8.8.0 255.255.255.0 27.0.1.2
Router(config)#ip route 10.0.0.0 255.255.255.0 27.0.1.2
Router1:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gig 0/0
Router(config-if)#ip address 27.0.1.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int gig0/1
Router(config-if)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int gig0/2
Router(config-if)#ip address 8.8.8.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#ip route 192.168.1.0 255.255.255.0 27.0.1.1
OUTPUT
Practical - 11
Aim: Perform Bit Stuffing using C.
#include<stdio.h>
int main() {
int i,k=0,fl=0;
1,1,1,1,0,
1,0,0,1,0,
1,1,1,1,1,
1,0,1,0,0,
0,1,1,1,1,
1,0,0,1,1,
1,0,1,0,0};
printf("%d ",a[i]);
if((i+1)%5==0)
printf("\n");
int b[40];
b[k++]=1;
b[k++]=1;
b[k++]=1;
b[k++]=1;
b[k++]=1;
b[k++]=0;
i=i+4;
fl++;
} else
b[k++]=a[i];
printf("%d ",b[i]);
if((i+1)%5==0)
printf("\n");
return 0;
OUTPUT
Practical - 12
Aim: Perform Character Stuffing using C.
#include<stdio.h>
int main(){
char s[40]={'w','a','v','t','v','k','g','n','t','c','g','v','t','c','\0'};
char s2[20];
int i,k=0,fl=0;
for(i=0;;i++){
printf("%c ",s[i]);
if(s[i]=='\0')
break;
for(i=0;;i++){
if(s[i]=='v'|| s[i]=='t'){
s2[k++]='v';
s2[k++]=s[i];
fl++;
else
s2[k++]=s[i];
if(s[i]=='\0')
break;
for(i=0;;i++){
printf("%c ",s2[i]);
if(s2[i]=='\0')
break;
return 0;
OUTPUT
Practical - 13
#include<conio.h>
void main()
int a[20],c[20],d[20],aux[20],r,i,j,l,in,flag,choice,key;
clrscr();
scanf("%d",&l);
scanf("%d",&a[i]);
scanf("%d",&r);
scanf("%d",&d[i]);
if(i<l) c[i]=a[i];
else c[i]=0;
printf("%d ",c[i]);
aux[i]=c[i];
in=1;
if(c[i]==1){
c[j]=c[j]^d[in];
in++;
else{
c[j]=c[j]^0;
printf("%d ",c[i]);
if(i<l) c[i]=aux[i];
printf("%d ",c[i]);
scanf("%d",&choice);
if(choice==1){
scanf("%d",&key);
if(i==(key-1)){
if(c[key-1]==0) c[key-1]=1;
else c[key-1]=0;
printf("%d ",c[i]);
in=1;
if(c[i]==1){
c[j]=c[j]^d[in];
in++;
else{
c[j]=c[j]^0;
printf("%d ",c[i]);
flag=0;
if(c[i]!=0){
flag=1;
break;
getch();
Output
Practical - 14
#include<string.h>
int main()
char a[20],b[20];
char sum[20],complement[20];
int i,length;
scanf("%s",&a);
scanf("%s",&b);
if(strlen(a)==strlen(b)){
length = strlen(a);
char carry='0';
for(i=length-1;i>=0;i--)
sum[i]='0';
carry='0';
sum[i]='1';
carry='0';
sum[i]='1';
carry='0';
sum[i]='0';
carry='1';
sum[i]='1';
carry='0';
sum[i]='0';
carry='1';
sum[i]='0';
carry='1';
sum[i]='1';
carry='1';
else
break;
printf("\nSum=%c%s",carry,sum);
for(i=0;i<length;i++)
if(sum[i]=='0')
complement[i]='1';
else
complement[i]='0';
if(carry=='1')
carry='0';
else
carry='1';
printf("\nChecksum=%c%s",carry,complement);
else {
Output