Network & Security Manual
Network & Security Manual
TECHNOLOGY
LAB MANUAL
STUDENT NAME :
SUBJECT CODE :
SUBJECT NAM E :
YEAR / SEM :
KARPAGA VINAYAGA
COLLEGE OF ENGINEERING & TECHNOLOGY
(Approved by AICTE, Accrediated by NBA & Affiliated to Anna University)
G.S.T Road, Chinna Kolambakkam, Padalam – 603 308,
Madhuranthagam (Tk), Kancheepuram (Dt).
BONAFIDE CERTIFICATE
REGISTER NUMBER:
Date :
Signature of
Page Marks
S.No Name of the Experiment the faculty
No Obtained
member.
AIM:
Software Required:
Turbo C, C++
ALGORITHM:
#include<string.h>
int main()
int a[20],b[30],i,j,k,count,n;
scanf("%d",&n);
scanf("%d",&a[i]);
i=0;
count=1;
j=0;
while(i<n)
if(a[i]==1)
1
{
b[j]=a[i];
j++;
b[j]=a[k];
count++;
if(count==5)
j++;
b[j]=0;
i=k;
else
b[j]=a[i];
i++;
j++;
printf("%d",b[i]);
return 0;
2
PROGRAM (CHARECTER STUFFING):
#include<stdio.h>
#include<string.h>
main()
char a[30], fs[50] = " ", t[3], sd, ed, x[3], s[3], d[3], y[3];
int i, j, p = 0, q = 0;
clrscr();
scanf("%s", a);
strcat(fs, x);
t[0] = a[i];
t[1] = '\0';
if(t[0] == sd)
strcat(fs, s);
strcat(fs, d);
else
3
strcat(fs, t);
strcat(fs, y);
getch();
4
5
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
RESULT:
6
EX.NO.2 IMPLEMENTATION OF ERROR DETECTION AND ERROR
CORRECTION TECHNIQUES (LRC, CRC, HAMMING CODE)
AIM:
To write a C program to implement the error detection and error correction techniques.
Software Required:
Turbo C, C++
ALGORITHM:
PROGRAM (LRC):
void main()
int l1,bit[100],count=0,i,choice;
clrscr();
scanf("%d",&l1);
for(i=0;i {
scanf("%d",&bit[i]);
if(bit[i]==1)
count=count+1;
}
printf("Number of 1's are %d",count);
scanf("%d",&choice);
7
switch(choice)
case 1:
if(count%2==0)
bit[l1]=0;
else
bit[l1]=1;
for(i=0;i<=l1;i++)
printf("%d",bit[i]);
break;
case 2:
if(count%2==0)
else
break;
default:
printf("Invalid choice");
break;
getch();
8
PROGRAM (CRC):
#include<stdio.h>
#include<string.h>
#define N strlen(gen_poly)
char data[28];
// CRC value
char check_value[28];
// generator polynomial
char gen_poly[10];
// variables
int data_length,i,j;
void XOR(){
void receiver(){
scanf("%s", data);
printf("\n \n");
9
// Cyclic Redundancy Check
crc();
if(i<N-1)
printf("\nError detected\n\n");
else
void crc(){
// initializing check_value
for(i=0;i<N;i++)
check_value[i]=data[i];
do{
if(check_value[0]=='1')
XOR();
for(j=0;j<N-1;j++)
check_value[j]=check_value[j+1];
check_value[j]=data[i++];
}while(i<=data_length+N-1);
int main()
10
{
scanf("%s",data);
scanf("%s",gen_poly);
data_length=strlen(data);
for(i=data_length;i<data_length+N-1;i++)
data[i]='0';
printf("\n ");
printf("\n ");
crc();
for(i=data_length;i<data_length+N-1;i++)
data[i]=check_value[i-data_length];
printf("\n ");
printf("\n \n");
11
receiver();
return 0;
}
#include<conio.h>
void main() {
int data[7],rec[7],i,c1,c2,c3,c;
printf("this works for message of 4bits in size \nenter message bit one by one: ");
scanf("%d%d%d%d",&data[0],&data[1],&data[2],&data[4]);
data[6]=data[0]^data[2]^data[4];
data[5]=data[0]^data[1]^data[4];
data[3]=data[0]^data[1]^data[2];
for (i=0;i<7;i++) {
printf("%d ",data[i]);
for (i=0;i<7;i++) {
scanf("%d",&rec[i]);
c1=rec[6]^rec[4]^rec[2]^rec[0];
c2=rec[5]^rec[4]^rec[1]^rec[0];
c3=rec[3]^rec[2]^rec[1]^rec[0];
c=c3*4+c2*2+c1 ;
if(c==0) {
12
} else {
if(rec[7-c]==0)
rec[7-c]=1; else
rec[7-c]=0;
for (i=0;i<7;i++) {
printf("%d ",rec[i]);
getch();
13
14
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
RESULT:
15
16
EX .NO: 3a IMPLEMENTATION OF STOP AND WAIT PROTOCOLAIM:
To write a c program to perform stop and wait protocol.
Software Required:
Turbo C, C++
ALOGORITHM:
int i,f;
clrscr();
17
}
getch();
}
18
Result:
Thus the program of Stop and Wait protocol has been executed successfully and the output
was verified.
19
EX. NO: 3b IMPLEMENTATION OF SLIDING WINDOW PROTOCOL
AIM:
Software Required:
Turbo C, C++
ALGORITHM:
#include<stdio.h>
void main()
{
int i,f,w,frame[50];
clrscr();
printf("enter the frame size");
scanf("%d",&f);
printf("enter the window size");
scanf("%d",&w);
printf("enter the frame:");
for(i=1;i<=f;i++)
{
scanf("%d",&frame[i]);
}
for(i=1;i<=f;i++)
20
{
if((i%w)==0)
{
printf("%d",frame[i]);
printf("the frame received \n");
}
else
{
printf("%d",frame[i]);
}
}
if((i%w)!=0)
{
printf("\n the frame received\n");
}
getch();
}
21
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
Result:
22
EX.NO:4 IMPLEMENTATION AND STUDY OF GO BACK-N AND SELECTIVE
REPEAT PROTOCOL
AIM:
To write the C program to perform Go back-N and selective repeat protocol.
Software Required:
Turbo C, C++
ALGRORITHM:
PROGRAM:
Go back N-protocol;
#include<stdio.h>
void main()
{
int i, windowsize,sent=0,ack;
printf("enter windowsize\n");
scanf("%d",&windowsize);
while(1)
{
for(i=0;i<windowsize;i++)
{
23
printf("Frame %d has been transmitted\n",sent);
sent++;
if(sent==windowsize)
break;
}
#include<stdio.h>
void main()
{
int windowsize,sent=0,nak,i;
clrscr();
printf("enter the window size");
scanf("%d",&windowsize);
for(i=0;i<windowsize;i++)
{
printf("frame %d has been transmitted \n", sent);
sent++;
24
if(sent==windowsize)
break;
}
printf("\n please enter the negative acknowledgement recieved");
scanf("%d",&nak);
if(nak==windowsize)
{
printf("successful");
}
else
printf("frame %d has been retransmitted ",nak);
getch();
25
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
RESULT:
26
27
EX.NO:5 IMPLEMENTATION OF DISTANCE VECTOR ROUTING ALGORITHM
Aim:
To write a ns2 program for implementing distance vector routing algorithm.
Software Required:
Turbo C, C++
Algorithm:
Program:
#include<stdio.h>
struct node
{
unsigned dist[20];
unsigned from[20];
}rt[10];
int main()
{
int dmat[20][20];
int n,i,j,k,count=0;
printf("\nEnter the number of nodes : ");
scanf("%d",&n);
printf("\nEnter the cost matrix :\n");
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{
scanf("%d",&dmat[i][j]);
dmat[i][i]=0;
rt[i].dist[j]=dmat[i][j];
rt[i].from[j]=j;
}
do
{
count=0;
28
for(i=0;i<n;i++)
for(j=0;j<n;j++)
for(k=0;k<n;k++)
if(rt[i].dist[j]>dmat[i][k]+rt[k].dist[j])
{
rt[i].dist[j]=rt[i].dist[k]+rt[k].dist[j];
rt[i].from[j]=k;
count++;
}
}while(count!=0);
for(i=0;i<n;i++)
{
printf("\n\nState value for router %d is \n",i+1);
for(j=0;j<n;j++)
{
printf("\t\nnode %d via %d
Distance%d",j+1,rt[i].from[j]+1,rt[i].dist[j]);
}
}
printf("\n\n");
}
29
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
Result:
30
EX.NO:6 IMPLEMENTATION OF LINK STATE ROUTING ALGORITHM
Aim:
To write a ns2 program for implementing link state routing algorithm.
Software Required:
Turbo C, C++
Algorithm:
Program:
#include<stdio.h>
int main()
int count,src_router,i,j,k,w,v,min;
int cost_matrix[100][100],dist[100],last[100];
int flag[100];
scanf("%d",&count);
for(i=0;i<count;i++)
for(j=0;j<count;j++)
31
printf("\n%d->%d:",i,j);
scanf("%d",&cost_matrix[i][j]);
if(cost_matrix[i][j]<0)cost_matrix[i][j]=1000;
scanf("%d",&src_router);
for(v=0;v<count;v++)
flag[v]=0;
last[v]=src_router;
dist[v]=cost_matrix[src_router][v];
flag[src_router]=1;
for(i=0;i<count;i++)
min=1000;
for(w=0;w<count;w++)
if(!flag[w])
if(dist[w]<min)
32
v=w;
min=dist[w];
flag[v]=1;
for(w=0;w<count;w++)
if(!flag[w])
if(min+cost_matrix[v][w]<dist[w])
dist[w]=min+cost_matrix[v][w];
last[w]=v;
for(i=0;i<count;i++)
printf("\n%d==>%d:Path taken:%d",src_router,i,i);
w=i;
while(w!=src_router)
printf("\n<--%d",last[w]);w=last[w];
33
printf("\n Shortest path cost:%d",dist[i]);
34
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
Result:
35
EX.NO:7 ENCRYPTION AND DECRYPTION USING DES ALGORITHM
AIM:
SOFTWARE REQUIRED:
Turbo C, C++
ALGORITHM:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <time.h>
int IP[] =
{
58, 50, 42, 34, 26, 18, 10, 2,
60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6,
64, 56, 48, 40, 32, 24, 16, 8,
57, 49, 41, 33, 25, 17, 9, 1,
59, 51, 43, 35, 27, 19, 11, 3,
61, 53, 45, 37, 29, 21, 13, 5,
63, 55, 47, 39, 31, 23, 15, 7
};
int E[] =
{
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
36
8, 9, 10, 11, 12, 13,
12, 13, 14, 15, 16, 17,
16, 17, 18, 19, 20, 21,
20, 21, 22, 23, 24, 25,
24, 25, 26, 27, 28, 29,
28, 29, 30, 31, 32, 1
};
int P[] =
{
16, 7, 20, 21,
29, 12, 28, 17,
1, 15, 23, 26,
5, 18, 31, 10,
2, 8, 24, 14,
32, 27, 3, 9,
19, 13, 30, 6,
22, 11, 4, 25
};
int FP[] =
{
40, 8, 48, 16, 56, 24, 64, 32,
39, 7, 47, 15, 55, 23, 63, 31,
38, 6, 46, 14, 54, 22, 62, 30,
37, 5, 45, 13, 53, 21, 61, 29,
36, 4, 44, 12, 52, 20, 60, 28,
35, 3, 43, 11, 51, 19, 59, 27,
34, 2, 42, 10, 50, 18, 58, 26,
33, 1, 41, 9, 49, 17, 57, 25
};
int S1[4][16] =
{
14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13
};
37
int S2[4][16] =
{
15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,
3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9
};
int S3[4][16] =
{
10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12
};
int S4[4][16] =
{
7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15,
13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9,
10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4,
3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14
};
int S5[4][16] =
{
2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9,
14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6,
4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14,
11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3
};
int S6[4][16] =
{
12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,
10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8,
9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6,
4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13
};
38
int S7[4][16]=
{
4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1,
13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6,
1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2,
6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12
};
int S8[4][16]=
{
13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7,
1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2,
7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8,
2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11
};
int PC1[] =
{
57, 49, 41, 33, 25, 17, 9,
1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27,
19, 11, 3, 60, 52, 44, 36,
63, 55, 47, 39, 31, 23, 15,
7, 62, 54, 46, 38, 30, 22,
14, 6, 61, 53, 45, 37, 29,
21, 13, 5, 28, 20, 12, 4
};
int PC2[] =
{
14, 17, 11, 24, 1, 5,
3, 28, 15, 6, 21, 10,
23, 19, 12, 4, 26, 8,
16, 7, 27, 20, 13, 2,
41, 52, 31, 37, 47, 55,
30, 40, 51, 45, 33, 48,
44, 49, 39, 56, 34, 53,
46, 42, 50, 36, 29, 32
};
39
int SHIFTS[] = { 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 };
FILE* out;
int LEFT[17][32], RIGHT[17][32];
int IPtext[64];
int EXPtext[48];
int XORtext[48];
int X[8][6];
int X2[32];
int R[32];
int key56bit[56];
int key48bit[17][48];
int CIPHER[64];
int ENCRYPTED[64];
int F1(int i)
{
int r, c, b[6];
40
for (int j = 0; j < 6; j++) {
b[j] = X[i][j];
}
r = b[0] * 2 + b[5];
c = 8 * b[1] + 4 * b[2] + 2 * b[3] + b[4];
if (i == 0) {
return S1[r][c];
}
else if (i == 1) {
return S2[r][c];
}
else if (i == 2) {
return S3[r][c];
}
else if (i == 3) {
return S4[r][c];
}
else if (i == 4) {
return S5[r][c];
}
else if (i == 5) {
return S6[r][c];
}
else if (i == 6) {
return S7[r][c];
}
else if (i == 7) {
return S8[r][c];
}
}
if (i % 32 == 0) {
i = 0;
}
i = i + 4;
}
int value;
for (int i = 0; i < 8; i++)
{
value = F1(i);
ToBits(value);
}
}
42
int PBox(int pos, int text)
{
int i;
for (i = 0; i < 32; i++)
{
if (P[i] == pos + 1) {
break;
}
}
R[i] = text;
}
SBox(XORtext);
void convertToBinary(int n)
{
int k, m;
for (int i = 7; i >= 0; i--)
{
m = 1 << i;
k = n & m;
if (k == 0) {
fprintf(out, "0");
}
else {
fprintf(out, "1");
}
}
}
while (i)
{
ch = fgetc(inp);
if (ch == -1) {
break;
44
}
i--;
convertToBinary(ch);
}
fclose(out);
fclose(inp);
}
fclose(out);
}
int bittochar()
{
out = fopen("result.txt", "ab+");
for (int i = 0; i < 64; i = i + 8) {
convertToBits(&ENCRYPTED[i]);
}
fclose(out);
}
k = 0;
for (int i = 28 – shift; i < 28; i++) {
C[x][i] = backup[x – 1][k++];
}
k = 0;
for (int i = 28 – shift; i < 28; i++) {
D[x][i] = backup[x – 1][k++];
}
}
while (!feof(in))
{
ch = getc(in);
plain[++i] = ch – 48;
}
fclose(in);
}
while (!feof(in))
{
ch = getc(in);
plain[++i] = ch – 48;
}
void create16Keys()
{
FILE* pt = fopen("key.txt", "rb");
unsigned int key[64];
int i = 0, ch;
while (!feof(pt))
{
ch = getc(pt);
key[i++] = ch – 48;
}
key64to48(key);
fclose(pt);
}
return size;
}
int main()
{
// destroy contents of these files (from previous runs, if any)
51
out = fopen("result.txt", "wb+");
fclose(out);
create16Keys();
encrypt(n);
decrypt(n);
return 0;
}
52
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
RESULT
53
54
EX.NO:8 DATA ENCRYPTION AND DECRYPTION USING RSA (RIVEST, SHAMIR
AND ADLEMAN) ALGORITHM
AIM:
SOFTWARE REQUIRED:
Turbo C, C++
ALGORITHM:
#include <stdio.h>
int main()
{
int i, x;
char str[100];
case 2:
for(i = 0; (i < 100 && str[i] != '\0'); i++)
str[i] = str[i] - 3; //the key for encryption is 3 that is subtracted to ASCII value
default:
printf("\nError\n");
}
return 0;
}
56
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
RESULT
57
EX.NO:9 IMPLEMENTATION OF CLIENT SERVER MODEL USING FTP
PROTOCOL
AIM:-
SOFTWARE REQUIRED:-
Turbo C, C++
ALGORITHM:
SERVER:
STEP 1: Start
STEP 2: Declare the variables for the socket
STEP 3: Specify the family, protocol, IP address and port number
STEP 4: Create a socket using socket() function
STEP 5: Bind the IP address and Port number
STEP 6: Listen and accept the client’s request for the connection
STEP 7: Establish the connection with the client
STEP 8: Close the socket
STEP 9: Stop
CLIENT:
STEP 1: Start
STEP 2: Declare the variables for the socket
STEP 3: Specify the family, protocol, IP address and port number
STEP 4: Create a socket using socket() function
STEP 5: Call the connect() function
STEP 6: Close the socket
STEP 7: Stop
Program:
SERVER:
#include<stdio.h>
#include<arpa/inet.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
58
#include<netdb.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#define SERV_TCP_PORT 5035
#define MAX 60
int i, j, tem;
char buff[4096], t;
FILE *f1;
int main(int afg, char *argv)
{
int sockfd, newsockfd, clength;
struct sockaddr_in serv_addr,cli_addr;
char t[MAX], str[MAX];
strcpy(t,"exit");
sockfd=socket(AF_INET, SOCK_STREAM,0);
serv_addr.sin_family=AF_INET;
serv_addr.sin_addr.s_addr=INADDR_ANY;
serv_addr.sin_port=htons(SERV_TCP_PORT);
printf("\nBinded");
bind(sockfd,(struct sockaddr*)&serv_addr, sizeof(serv_addr));
printf("\nListening...");
listen(sockfd, 5);
clength=sizeof(cli_addr);
newsockfd=accept(sockfd,(struct sockaddr*) &cli_addr,&clength);
close(sockfd);
read(newsockfd, &str, MAX);
59
printf("\nClient message\n File Name : %s\n", str);
f1=fopen(str, "r");
while(fgets(buff, 4096, f1)!=NULL)
{
write(newsockfd, buff,MAX);
printf("\n");
}
fclose(f1);
printf("\nFile Transferred\n");
return 0;
}
CLIENT:
#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<netdb.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
char send[MAX],recvline[MAX],s[MAX],name[MAX];
sockfd=socket(AF_INET,SOCK_STREAM,0);
serv_addr.sin_family=AF_INET;
serv_addr.sin_addr.s_addr=inet_addr("127.0.0.1");
serv_addr.sin_port=htons(SERV_TCP_PORT);
connect(sockfd,(struct sockaddr*)&serv_addr,sizeof(serv_addr));
printf("\nEnter the source file name : \n");
scanf("%s",send);
write(sockfd,send,MAX);
while((n=read(sockfd,recvline,MAX))!=0)
{
printf("%s",recvline);
}
close(sockfd);
return 0;
}
void main()
{
int a[50],b[50];
clrscr();
printf("\nEcho");
include<stdio.h>
void main()
{
int a,b;
clrscr();
printf("\n ping in client");
printf("\nenter input address");
scanf("%d",&a);
printf("\n communuication established");
printf("\n enter the data");
scanf("%d",&b);
printf("\n server pinging \n server received: %d",b);
getch();
}
62
RESULT:-
63
64
EX.NO:10 NETWORK TOPOLOGY - STAR, BUS, RING
Aim:
Software Required:
NS2 Simulator
Algorithm:
66
Aim : To monitor traffic for Bus topology using NS2
#******************************************#
67
$cbr0 set interval_ 0.01
$cbr0 attach-agent $tcp0
68
$n0 shape square
69
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
Result:
70
EX.NO:11 TO CREATE SCENARIO AND STUDY THE PERFORMANCE OF
NETWORK WITH CSMA / CA PROTOCOL AND COMPARE WITH CSMA/CD
PROTOCOLS
Aim:
To write a ns2 program for create scenario and study the performance of network with
CSMA / CA protocol and compare with CSMA/CD protocols.
Software Required:
NS2 Simulator
Algorithm:
71
Program:
73
Particulars Allotted Obtained
Performance 50
Viva voce 10
Record 15
Total 75
Result:
74
75
76