Professional Documents
Culture Documents
Regulation : R20
A.Y. : 2022-23
➢ Students should report to the concerned lab as per the time table.
➢ Students who turn up late to the labs will in no case be permitted to do the program schedule
for the day.
➢ After completion of the program, certification of the concerned staff in-charge in the
observation book is necessary.
➢ Student should bring a notebook of 100 pages and should enter the readings /observations into
the notebook while performing the experiment.
➢ The record of observations along with the detailed experimental procedure of the experiment
in the immediate last session should be submitted and certified staff member in-charge.
➢ The group-wise division made in the beginning should be adhered to and no mix up of students
among different groups will be permitted.
➢ When the experiment is completed, should disconnect the setup made by them, and should
return all the components/instruments taken for the purpose.
➢ Any damage of the equipment or burn-out components will be viewed seriously either by
putting penalty or by dismissing the total group of students from the lab for the semester/year.
➢ Students are required to prepare thoroughly to perform the experiment before coming to
laboratory.
CMREC, III –I,CSE Page 2
AI604PC: COMPUTER NETWORKS LAB
III Year B.Tech. CSE II-Sem L T P C
0 0 3 1.5
Course Objectives
1. To understand the working principle of various communication protocols.
2. To understand the network simulator environment and visualize a network topology
and observe its performance
3. To analyze the traffic flow and the contents of protocol frames
Course Outcomes
1. Implement data link layer farming methods
2. Analyze error detection and error correction codes.
3. Implement and analyze routing and congestion issues in network design.
4. Implement Encoding and Decoding techniques used in presentation layer
5. To be able to work with different network tools
List of Experiments
1. Implement the data link layer framing methods such as character, character-stuffing and bit
stuffing.
2. Write a program to compute CRC code for the polynomials CRC-12, CRC-16 and CRCCCIP
3. Develop a simple data link layer that performs the flow control using the sliding window
protocol, and loss recovery using the Go-Back-N mechanism.
4. Implement Dijsktra’s algorithm to compute the shortest path through a network
5. Take an example subnet of hosts and obtain a broadcast tree for the subnet.
6. Implement distance vector routing algorithm for obtaining routing tables at each node.
7. Implement data encryption and data decryption
8. Write a program for congestion control using Leaky bucket algorithm.
9. Write a program for frame sorting technique used in buffers.
10. Wireshark
i. Packet Capture Using Wire shark
ii. Starting Wire shark
iii. Viewing Captured Traffic
iv. Analysis and Statistics & Filters.
11. How to run Nmap scan
12. Operating System Detection using Nmap
13. Do the following using NS2 Simulator
i. NS2 Simulator-Introduction
ii. Simulate to Find the Number of Packets Dropped
iii. Simulate to Find the Number of Packets Dropped by TCP/UDP
iv. Simulate to Find the Number of Packets Dropped due to Congestion
v. Simulate to Compare Data Rate& Throughput.
vi. Simulate to Plot Congestion for Different Source/Destination
vii. Simulate to Determine the Performance with respect to Transmission of Packets
SOURCE CODE:
//PROGRAM FOR CHARACTER STUFFING
#include<stdio.h>
#include<string.h>
#include<process.h>
void main()
{
int i=0,j=0,n,pos;
char a[20],b[50],ch;
printf("enter string\n");
scanf("%s",&a);
n=strlen(a);
printf("enter position\n");
scanf("%d",&pos);
if(pos>n)
{
OUTPUT:
[m0033@agni cnlabprograms]$ ./a.out
Enter position 3
dlestxardlehdlechanadleetx
SOURCE CODE:
// BIT Stuffing program
#include<stdio.h>
#include<string.h>
void main()
{
int a[20],b[30],i,j,k,count,n;
printf("Enter frame length:");
scanf("%d",&n);
printf("Enter input frame (0's & 1's only):");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
i=0; count=1; j=0;
while(i<n)
{
if(a[i]==1)
{
b[j]=a[i];
for(k=i+1;a[k]==1 && k<n && count<5;k++)
{
OUTPUT
1
After stuffing the frame is: 1111101111111
SOURCE CODE:
//PROGRAM FOR CYCLIC REDUNDENCY CHECK
#include<stdio.h>
int gen[4],genl,frl,rem[4];
void main()
{
int i,j,fr[8],dupfr[11],recfr[11],tlen,flag;
frl=8; genl=4;
printf("enter frame:");
for(i=0;i<frl;i++)
{
scanf("%d",&fr[i]);
dupfr[i]=fr[i];
}
printf("enter generator:");
for(i=0;i<genl;i++)
scanf("%d",&gen[i]);
tlen=frl+genl-1;
for(i=frl;i<tlen;i++)
{
dupfr[i]=0;
}
remainder(dupfr);
for(i=0;i<frl;i++)
{
remainder(recfr);
flag=0;
for(i=0;i<4;i++)
{
if(rem[i]!=0)
flag++;
}
if(flag==0)
{
printf("frame r eceived correctly");
}
else
{
printf("the received frame is wrong");
}
}
remainder(int fr[])
{
int k,k1,i,j;
for(k=0;k<frl;k++)
{
if(fr[k]==1)
{
k1=k;
for(i=0;i<genl;i++)
{
fr[k1]=rem[i];
k1++;
}
}
}
}
COMPILE THE PROGRAM
[m0033@agni cnlabprograms]$ cc exp2.c
OUTPUT:
[m0033@agni cnlabprograms]$ ./a.out
Enter frame: 1
0
1
1
Enter generator: 1
enter frame:1
enter generator:1
1
the received frame is wrong
AIM: Implement of a slidining window algorithm to loss recovery using the Go-Back-N mechanism.
a) Sliding window protocol
Sliding window protocol: this protocol is applied on the Data Link Layer of OSI model to
provide flow control. At data link layer data is in the form of frames. In Networking, Window
simply means a buffer which has data frames that needs to be transmitted.
In this sliding window mechanism both sender and receiver agrees on some window size and
transfer the frames based on the size the window. If window size=w then after sending w frames
sender waits for the acknowledgement (ack) of the first frame.
As soon as sender receives the acknowledgement of a frame it is replaced by the next frames to
be transmitted by the sender.
#include<stdio.h>
int main()
{
int w,i,f,frames[50];
for(i=1;i<=f;i++)
scanf("%d",&frames[i]);
printf("\nWith sliding window protocol the frames will be sent in the following manner
(assuming no corruption of frames)\n\n");
printf("After sending %d frames at each stage sender waits for acknowledgement sent by the
receiver\n\n",w);
for(i=1;i<=f;i++)
{
if(i%w==0)
{
printf("%d\n",frames[i]);
printf("Acknowledgement of above frames sent is received by sender\n\n");
}
if(f%w!=0)
printf("\nAcknowledgement of above frames sent is received by sender\n");
return 0;
}
Output
Enter window size: 3
Enter number of frames to transmit: 5
Enter 5 frames: 12 5 89 4 6
With sliding window protocol the frames will be sent in the following manner (assuming no
corruption of frames)
After sending 3 frames at each stage sender waits for acknowledgement sent by the receiver
12 5 89
Acknowledgement of above frames sent is received by sender
46
Acknowledgement of above frames sent is received by sender
b) Go back-N Protocol
Go-Back-N protocol, also called Go-Back-N Automatic Repeat reQuest, is a data link layer protocol
that uses a sliding window method for reliable and sequential delivery of data frames. It is a case of
sliding window protocol having to send window size of N and receiving window size of 1.
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgment for
the first frame. The frames are sequentially numbered and a finite number of frames. The maximum
number of frames that can be sent depends upon the size of the sending window. If the
acknowledgment of a frame is not received within an agreed upon time period, all frames starting
from that frame are retransmitted
#include<stdio.h>
int main()
{
int windowsize,sent=0,ack,i;
printf("enter window size\n");
scanf("%d",&windowsize);
while(1)
{
for( i = 0; i < windowsize; i++)
{
printf("Frame %d has been transmitted.\n",sent);
if(ack == windowsize)
break;
else
sent = ack;
}
return 0;
}
Output:-
enter window size 8
Frame 0 has been transmitted.
Frame 1 has been transmitted.
Frame 2 has been transmitted.
Frame 3 has been transmitted.
Frame 4 has been transmitted.
Frame 5 has been transmitted.
Frame 6 has been transmitted.
Frame 7 has been transmitted.
SOURCE CODE:
//*********************************
//PROGRAM FOR FINDING SHORTEST //PATH FOR A GIVEN GRAPH
//*********************************
#include<stdio.h>
void main()
{
int path[5][5],i,j,min,a[5][5],p,st=1,ed=5,stp,edp,t[5],index;
printf("enter the cost matrix\n");
for(i=1;i<=5;i++)
for(j=1;j<=5;j++)
scanf("%d",&a[i][j]);
printf("enter the paths\n");
scanf("%d",&p);
printf("enter possible paths\n");
for(i=1;i<=p;i++)
for(j=1;j<=5;j++)
scanf("%d",&path[i][j]);
for(i=1;i<=p;i++)
{
t[i]=0;
stp=st;
01420
10370
43050
27506
00060
12345
12450
13450
14500
Minimum cost 8
THEORY:
This technique is widely used because it is simple and easy to understand. The idea of this algorithm
is to build a graph of the subnet with each node of the graph representing a router and
each arc of the graph representing a communication line. To choose a route between a given pair of
routers the algorithm just finds the broadcast between them on the graph.
A B C D
A 1 3 5 6
B 6 7 8 9
C 2 3 5 6
D 1 2 3 7
Minimum cost is 9
BA6
CA2
DA1
AIM: Obtain Routing table at each node using distance vector routing algorithm for a given subnet.
THEORY:
Distance Vector Routing Algorithms calculate a best route to reach a destination based solely on
distance. E.g. RIP. RIP calculates the reach ability based on hop count. It’s different from link state
algorithms which consider some other factors like bandwidth and other metrics to reach a destination.
Distance vector routing algorithms are not preferable for complex networks and take longer to
converge.
{
scanf("%d",&dmat[i][j]);
dmat[i][i]=0;
rt[i].dist[j]=dmat[i][j];
rt[i].from[j]=j;
}
do
{
count=0;
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];
OUTPUT:
[m0033@agni cnlabprograms]$ ./a.out
024
204
450
#include<ctype.h>
#include<math.h>
#include<string.h>
void main()
int a,b,i,j,t,x,n,k=0,flag=0,prime[100];
char m[20],pp[20];
float p[20],c[20];
double e,d;
for(i=0;i<50;i++)
flag=0;
for(j=2;j<i/2;j++)
if(i%j==0)
flag=1;
break;
if(flag==0)
prime[k++]=i;
}
a=prime[k-1];
n=a*b;
t=(a-1)*(b-1);
e=(double)prime[2];
d=1/(float)e;
scanf("%s",&m);
x=strlen(m);
printf("\nChar\tnumeric\tcipher\t\tnumeric\t\tchar \n");
printf("\n***********************************************************\n");
printf("\n");
for(i=0;i<x;i++)
printf("%c",m[i]);
printf("\t%d",m[i]-97);
c[i]=pow(m[i]-97,(float)e);
c[i]=fmod(c[i],(float)n);
printf("\t%f",c[i]);
p[i]=pow(c[i],(float)d);
p[i]=fmod(p[i],(float)n);
printf("\t%f",p[i]);
printf("\t%c\n",pp[i]);
printf("\n***********************************************************\n");
printf("\n");
}
}
OUTPUT:
[m0033@agni cnlabprograms]$ ./a.out
***********************************************************
C -30 900.000000 30.000000 C
***********************************************************
S -14 196.000000 14.000000 S
***********************************************************
E -28 784.000000 28.000000 E
***********************************************************
B -31 961.000000 31.000000 B
**********************************************************
IP Datagram
The value of MTU differs from one physical network to another in order to make IP protocol
portable/independent of the physical network, the packagers decided to make the maximum length of the IP
datagram equal to the largest Maximum Transfer Unit (MTU) defined so far. However for other physical
networks we must divide the datagrams to make it possible to pass through these networks. This is called
fragmentation. When a datagram is fragmented, each fragmented has its own header. A fragmented datagram
may itself be fragmented if it encounters a network with an even smaller MTU. In another words, a datagram
may be fragmented several times before it reached the final destination and also, the datagrams referred to as
(frames in Data link layer) may arrives out of order at destination. Hence sorting of frames need to be done at
the destination to recover the original data.
PROGRAM:
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#define FSize 3
typedef struct packet{int SeqNum; char Data[FSize+1];}packet;
struct packet *readdata, *transdata;
int divide(char *msg) {
int msglen, NoOfPacket, i, j;
msglen = strlen(msg);
NoOfPacket = msglen/FSize;
Wireshark is a network packet analyzer. A network packet analyzer presents captured packet data in as
much detail as possible.
You could think of a network packet analyzer as a measuring device for examining what’s happening
inside a network cable, just like an electrician uses a voltmeter for examining what’s happening inside an
electric cable (but at a higher level, of course).
Apply a filter by typing it into the filter box at the top of the window and clicking Apply (or pressing Enter). For
example, type “dns” and you’ll see only DNS packets. When you start typing, Wireshark will help you
autocomplete your filter.
To analyze traffic,
click Analyze > Display Filters to choose a filter from among the default filters included inWireshark.
THEORY:
Nmap, short for Network Mapper, is a free, open-source tool for vulnerability scanning and
network discovery. Network administrators use Nmap to identify what devices are running on
their systems, discovering hosts that are available and the services they offer, finding open ports
and detecting security risks
i) how to run nmap scan
To get started, download and install Nmap from the nmap.org website and then launch a command
prompt. Typing nmap [hostname] or nmap [ip_address] will initiate a default scan.
THEORY:
Description:
NS2 Simulator-Introduction
1. NS2 stands for Network Simulator Version
2. It is an open-source event-driven simulator designedspecifically for research in computer
communication networks.
Features of NS2
1. It is a discrete event simulator for networking research.
2. It provides substantial support to simulate bunch of protocols like TCP, FTP, UDP, https and DSR.
Network simulation is an important tool in developing, testing and evaluating network protocols.
Simulation can be used without the target physical hardware, making it economical and practical for almost
any scale of network topology and setup.
GETTING STARTED
ii) Simulate a three node point to point network with a duplex link between them. Set the queue
size and vary the bandwidth and find the number of packets dropped.
iii) Simulate a four node point to point network and connect the link as follows Apply a TCP agent
between n0 to n3 and apply a UDP agent between n1 and n3.Apply relevant applications over TCP and
UDP agents changing the parameters and determine the number of packets sent by two agents.
1. Select/click the HOST icon on the toolbar and click the left mouse button on the editor,to place a
host on the editor.
Repeat the above procedure and place two other hosts “HOST2” and “HOST3” on the
editor.
2. Select/click the HUB (or SWITCH) icon on the toolbar and click the left mouse button
on the editor, to place a HUB (or SWITCH) on the editor.
3. Click on the LINK icon on the toolbar and connect HOST1 to HUB, HOST2 to HUB and
HUB to HOST3
4. Click on the “E” icon on the toolbar to save the current topology e.g: file2.tpl (Look
for the ******.tpl extension.)
NOTE: Changes cannot / (should not) be done after selecting the “E” icon.
Step2: Configuration
1. Double click the left mouse button while cursor is on HOST1 to open the HOSTwindow.
2. Change simulation time from 0 to 20 for HOST1
3. Select Add button on the HOST1 window to invoke the command window andprovide
the following command in the command textbox.
ttcp –t –u –s –p 8000 1.0.1.3
4. Click OK button on the command window to exit
Step3: Simulate
i. Click “R” icon on the tool bar
ii. Select Simulation in the menu bar and click/ select RUN in the dropdown list to
execute the simulation.
iii. To start playback select “►” icon located at the bottom right corner of the editor.
iv. To view results, Open up new TERMINAL window, move to file2.results folder
and open input and output throughput log files in separate TERMINAL window.
iv)Simulate the transmission of ping messages over a network topology consisting of 6 nodes
and find the number of packets dropped due to congestion.
1. Select/click the SUBNET icon on the toolbar and click the left mouse button on theeditor, to
place a SUBNET on the editor.
2. A pop up window appears requesting the number of nodes and radius for the subnet
Set number of nodes=6;
Set radius of subnet >150
3. Click on the “E” icon on the toolbar to save the current topology e.g: file4.tpl (Look
for the ******.tpl extension.)
NOTE: Changes cannot / (should not) be done after selecting the “E” icon.
Step2: Configuration
1. Make 5 HOST as sender and make 1 HOST as receiver and give the commands with
particular portnumber
2. Sender Commands
Sender 1 : stcp –p 21 –l 1024 1.0.1.1
Sender 2 : stcp –p 22 –l 1024 1.0.1.1
Sender 3 : stcp –p 23 –l 1024 1.0.1.1
Sender 4 : stcp –p 24 –l 1024 1.0.1.1
Sender 5 : stcp –p 25 –l 1024 1.0.1.1
Receiver Commands
rtcp –p 21 –l 1024
rtcp –p 22 –l 1024
rtcp –p 23 –l 1024
rtcp –p 24 –l 1024
Step3: Simulate
i. Click “R” icon on the tool bar
ii. Select Simulation in the menu bar and click/ select RUN in the dropdown list to
execute the simulation.
iii. During simulation, double click the mouse button on any sender HOST, the HOST
window pops up, select / click on command console button located at the bottom.
iv. A terminal window appears, type ping IP address of a receiver HOST in the subnet at the
command prompt.
v. To view results, Open up new TERMINAL window, move to file4.results folder and open
drop and collision log files in separate TERMINAL window.
v) Simulate an ETHERNET LAN using n nodes (6-10), change error rate and data
rate and compare throughput.
1. Select/click the HOST icon on the toolbar and click the left mousebutton
on the editor, to place HOST1 on the editor.
i. Repeat the above procedure and place 5 other hosts
“HOST2”, “HOST3”, “HOST4”, “HOST5”, and
“HOST6”on the editor.
2. Select/click the HUB icon on the toolbar and click the left mouse
button on the editor, to place HUB1 on the editor.
Repeat the above procedure and place another host “HUB2” on theeditor
3. Click on the LINK icon on the toolbar and connect HOST1,
HOST2 and HOST3 to HUB1, HOST4, HOST5 and HOST6 to
HUB2.
4. Select/click the SWITCH icon on the toolbar and click the left mouse
button on the editor, to place SWITCH1 on the editor.
5. Click on the LINK icon on the toolbar and connect HUB1 to
SWITCH1 and HUB2 to SWITCH1.
CMREC, III –I,CSE Page 64
6. Click on the “E” icon on the toolbar to save the current
topology e.g: file5.tpl
(Look for the ******.tpl extension.)
Step2: Configuration
1. Double click the left mouse button while cursor is on HOST1 to
open the HOST window.
2. Select Add button on the HOST window to invoke the command
window and provide the following command in the command
textbox.
ttcp –t –u –s –p 8001 1.0.1.4 (Split time from 0 to 10)
3. Change error rate and data rate in the physical layer and select
Outthroughput in MAC layer
4. Click OK button on the command window to exit and once
again click on the OK button on the HOST window to exit.
5. Repeat this step at HOST 2 and HOST3 by changing port number & IP
address of receiver. Change error rate and data rate.
ttcp –t –u –s –p 8002 1.0.1.5 (Split time from 11 to 20)
ttcp –t –u –s –p 8003 1.0.1.6 (Split time from 21 to 30)
5. Double click the left mouse button while cursor is on HOST4 to
open the HOST window.
6. Select Add button on the HOST window to invoke the command
window and provide the following command in the command
textbox.
ttcp –r –u –s –p 8001(Split time from 0 to 10)
7. Change error rate and data rate in the physical layer and select
INthroughput in MAC layer
8. Repeat this step at HOST 5 and HOST6, but use different
commands. Change error rate and data rate.
ttcp –r –u –s –p 8002(Split time from 11 to 20) ttcp –r
–u –s –p 8003(Split time from 21 to 30)
Step3: Simulate
i. Click “R” icon on the tool bar
ii. Select Simulation in the menu bar and click/ select
RUN in the dropdown list to execute the simulation.
iii. To start playback select “►” icon located at the bottom right
corner of the editor. To view results, Open up new TERMINAL
window, move to file5.results folder and open output throughput
log files in separate TERMINALwindow.
1. Select/click the HOST icon on the toolbar and click the left mouse button
on the editor, to place HOST1 on the editor.
i. Repeat the above procedure and place 3 other hosts
“HOST2”, “HOST3”, “HOST4”, “HOST5”, and
“HOST6”on the editor.
2. Select/click the HUB icon on the toolbar and click the left mouse button
on the editor, to place HUB1 on the editor.
Repeat the above procedure and place another host “HUB2” on the editor
3. Click on the LINK icon on the toolbar and connect HOST1, HOST2
and HOST3 to HUB1, HOST4, HOST5 and HOST6 to HUB2.
4. Select/click the SWITCH icon on the toolbar and click the left mousebutton
on the editor, to place SWITCH1 the editor.
5. Click on the LINK icon on the toolbar and connect HUB1 to SWITCH1
and HUB2 to SWITCH1.
6. Click on the “E” icon on the toolbar to save the current
topology e.g: file7.tpl (Look for the ******.tpl extension.)
NOTE: Changes cannot / (should not) be done after selectingthe “E” icon.
Step2: Configuration
1. Double click the left mouse button while cursor is on HOST1 to open
the HOST window.
2. Select Add button on the HOST window to invoke the command
window and provide the following command in the command textbox.
ttcp –t –u –s –p 8001 1.0.1.4
3. Click OK button on the command window to exit and once again click
on the OK button on the HOST window to exit.
4. Repeat this step at HOST 2 and HOST3 by changing port number & IP
address of receiver. Change error rate and data rate.
ttcp –t –u –s –p 8002 1.0.1.5
ttcp –t –u –s –p 8003 1.0.1.6
CMREC, III –I,CSE Page 66
5. Select Outthroughput, Collision & Drop in MAC layer for all senders
6. Double click the left mouse button while cursor is on HOST4 to open
the HOST window.
7. Select Add button on the HOST window to invoke the command
window and provide the following command in the command textbox.
ttcp –r –u –s –p 8001
8. Repeat this step at HOST 5 and HOST6, but use different
commands. Change error rate and data rate.
ttcp –r –u –s –p 8002
ttcp –r –u –s –p 8003
9. select Inthroughput, Collision & Drop in MAC layer for all receivers
Step3: Simulate
i. Click “R” icon on the tool bar
ii. Select Simulation in the menu bar and click/ select RUN in the
dropdown list to execute the simulation.
iii. To start playback select “►” icon located at the bottom right corner of the
editor.
iv. To plot congestion window select Tools in the menu bar and selectPLOT
GRAPH in the drop down list.
v. In the Graph window, select File->OPEN, move to file7.results folder and
the drop and collision log file.
vi. To open another Graph window, Select File->New tab on the drop down
list to open up to a maximum of 6 windows
vii. To view results, Open up new TERMINAL window, move to file7.results
folder and open input and output throughput log files in separate
TERMINAL window.
vii) Simulate simple BSS and with transmitting nodes in wireless LAN by simulation
and determine the performance with respect to transmissionof packets.
1. Select/click the HOST icon on the toolbar and click the left mouse button on the
editor, to place HOST1 on the editor.
2. Select/click the ROUTER icon on the toolbar and click the left mouse button on the
CMREC, III –I,CSE Page 67
editor, to place ROUTER1 on the editor.
3. Select/click the WIRELESS ACCESS POINT(802.11b) icon on the toolbar and
click the left mouse button on the editor, to place ACCESS POINT 1 onthe editor.
Repeat this procedure and place ACCESS POINT 2 on the editor.
4. Select/click the MOBILE NODE (infrastructure mode) icon on the toolbar and
click the left mouse button on the editor, to place MOBILE NODE 1 on the editor.
Repeat this procedure and place MOBILE NODE 2, MOBILE NODE3 and
MOBILE NODE 4 on the editor.
5. Click on the LINK icon on the toolbar and connect ACCESS POINT1 to
ROUTER1 and ACCESS POINT2 to ROUTER1
6. Click on the “Create a moving path” icon on the toolbar and draw moving path
across MOBILE NODE 1 and 2, Repeat for MOBILE NODE 3and 4 (Accept the
default speed value 10 and close the window, Click the right mouse button to
terminate the path).
To create Subnet
7. Select wireless subnet icon in the toolbar now select MOBILE NODE1, MOBILE
NODE2 and ACCESS POINT1 by clicking on left mouse button,and clicking right
mouse button will create a subnet.
8. Repeat the above step for MOBILE NODE3, MOBILE NODE4 and
ACCESS POINT2.
9. Click on the “E” icon on the toolbar to save the current topology e.g:
file8.tpl
(Look for the ******.tpl extension.)
NOTE: Changes cannot / (should not) be done after selecting the “E” icon.
Step2: Configuration
1. Double click the left mouse button while cursor is on HOST1 to open the HOST
window.
2. Select Add button on the HOST window to invoke the command window and
provide the following command in the command textbox.
ttcp –r –u –s –p 8001
3. Click OK button on the command window to exit
4. Repeat this step and add the following commands at HOST1 ttcp
–r –u –s –p 8002
ttcp –r –u –s –p 8003 ttcp
–r –u –s –p 8004 ttcp –r
–u –s –p 8005
5. Click NODE EDITOR Button on the HOST1 window and select the MAC tab
from the modal window that pops up.
6. Select LOG STATISTICS and select checkbox for Input throughput in the MAC
window
7. Click OK button on the MAC window to exit and once again click on the OK
button on the HOST window to exit.
8. Double click the left mouse button while cursor is on MOBILE NODE 1 to open
the MOBILE NODE window.
CMREC, III –I,CSE Page 68
9. Select Application tab and select Add button to invoke the command
window and provide the following command in the command textbox.
ttcp –t –u –s –p 8001 1.0.2.2 (host’s ip address)
10. Click NODE EDITOR Button on the MOBILE NODE1 window and select
the MAC tab from the nodal window that pops up.
11. Select LOG STATISTICS and select checkbox for Output throughput in the
MAC window
12. Click OK button on the MAC window to exit and once again click onthe OK
button on the MOBILE NODE1 window to exit.
13. Repeat the above steps (step 8 to step12) for the MOBILE NODE2,3 and 4 and
add the following commands at
MOBILE NODE2:- ttcp –t –u –s –p 8002 1.0.2.2 MOBILE
NODE 3:- ttcp –t–u –s –p 8003 1.0.2.2 MOBILE NODE4:-
ttcp –t –u –s –p 8004 1.0.2.2
14. Double click the left mouse button while cursor is on ROTER1 to open the
ROUTER window.
15. Click NODE EDITOR Button on the ROUTER1 window and you can see three
stacks. two stacks for two ACCESS POINTS and another stack for HOST1
which is connected to the ROUTER1.
16. Select the MAC tab of ACCESS POINT1 and Select LOG STATISTICS and
select checkbox for Input throughput in the MAC window. Click OK button on
the MAC window to exit.
17. Select the MAC tab of ACCESS POINT2 and Select LOG STATISTICS and
select checkbox for Input throughput in the MAC window. Click OK button on
the MAC window to exit.
18. Select the MAC tab of HOST1 and Select LOG STATISTICS and select
checkbox for Output throughput in the MAC window. Click OK button on the
MAC window to exit.
19. Add the following command for router
ttcp –t –u –s –p 8005 1.0.2.2 (host’s ip address)
Step3: Simulate
I. Click “R” icon on the tool bar
II. Select Simulation in the menu bar and click/ select RUN in the
dropdown list to execute the simulation.
III. To start playback select “►” icon located at the bottom right corner of the
editor.
IV. MOBILE NODE’s start moving across the paths already drawn.