Lab
Lab
Lab
web
texts
movies
audio
software
image
logosearch
Search
Search
upload
personSIGN IN
ABOUT
CONTACT
BLOG
PROJECTS
HELP
DONATE
JOBS
VOLUNTEER
PEOPLE
Full text of "CN 6thsem 15 ECL 68 Lab Manual 2017 2018"
See other formats
SAPTHAGIRI COLLEGE OF ENGINEERING
/ / .\\
(// W
/ A /\X
SAPTHAGIRI
Student Name:_
USN :_
15ECL68
VI Sem
VTU Syllabus
IA Marks: 20
Exam Marks: 80
Credits: 02
Laboratory Experiments
Part A
1. Implement a point - to - point network with four nodes and duplex links between
them.
Analyze the network performance by setting the queue size and vary the bandwidth
and
find the number of packets dropped.
5. Implement ESS with transmitting nodes in wire-less LAN and obtain the
performance
parameters
Part B
1. Write a program for a HDLC frame to perform the following i) Bit stuffing ii)
Character
stuffing
2. Write a program for distance vector algorithm to find suitable path for
transmission.
4. Lor the given data, use CRC-CCITT polynomial to obtain CRC code. Verify the
program
for the cases a. Without error b. With error
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
TABLE OF CONTENTS
EXP.NO.
Introduction to NS2
Implement a point - to - point network with four nodes and duplex links between
them. Analyze the network performance by setting the queue size and vary the
bandwidth and find the number of packets dropped.
follows: nO - n2, nl - n2 and n2 - n3. Apply TCP agent between n0-n3 and
UDP between nl-n3. Apply relevant applications over TCP and UDP agents
changing the parameter and determine the number of packets sent by TCP / UDP.
Implement Ethernet LAN using n nodes and assign multiple traffic nodes and plot
congestion window for different source / destination.
Implement ESS with transmitting nodes in wire-less LAN and obtain the
performance parameters
Part B
Write a program for a HDLC frame to perform the following i) Bit stuffing ii)
Character stuffing
Write a program for distance vector algorithm to find suitable path for
transmission.
4
Lor the given data, use CRC-CCITT polynomial to obtain CRC code. Verify the
program for the cases a. Without error b. With error
Dept of ECE
SCE, Bangalore
15ECL68
VI Sem
Course objectives:
� Choose suitable tools to model a network and understand the protocols at various
OSI
reference levels.
� Model the networks for different configurations and analyze the results.
Course outcomes:
On the completion of this laboratory course, the students will be able to:
� Choose suitable tool to model a network and understand the protocols at various
OSI
reference levels.
� Model the networks for different configuration and analyze the results.
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
Part A
Introduction to NS2:
� In general, NS2 provides users with a way of specifying such network protocols
and
simulating their corresponding behaviors.
_ M. _ ___4 _
NAM ! ! Xgraph
! (Animation) j ! (Plotting) !
Tel scripting
� Tel runs on most of the platforms such as Unix, Windows, and Mac.
� It is not necessary to declare a data type for variable prior to the usage
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
Set the time of traffic generation (e.g., CBR, FTP)
NS Simulator Preliminaries.
Which is thus the first line in the tel script? This line declares a new variable
as using the set
command, you can call this variable as you wish, In general people declares it as
ns because
it is an instance of the Simulator class, so an object the code[new Simulator] is
indeed the
installation of the class Simulator using the reserved word new.
In order to have output files with data on the simulation (trace files) or files
used for
visualization (nam files), we need to create the files using �open� command:
The above commands creates a dta trace file called �out.tr� and a nam visualization
trace file
called �out.nanT�.Within the tel script, these files are not called explicitly by
their names,but
instead by pointers that are declared above and called �tracefilel� and �namfile�
respectively.
Remark that they begins with a # symbol. The second line open the file �out.tr� to
be used for
writing, declared with the letter �w�. The third line uses a simulator method
called trace-all
that have as parameter the name of the file where the traces will go.
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
The last line tells the simulator to record all simulation traces in NAM input
format. It also
gives the file name that the trace will be written to later by the command $ns
flush-trace.In
our case,this will be the file pointed at by the pointer �$namfile�,i.e the file
�out.tr�.
Procfinish{}{
$ns flush-trace
Close $tracefilel
Close $namfile
The word proc declares a procedure in this case called finish and without
arguments. The
word global is used to tell that we are using variables declared outside the
procedure. The
simulator method �flush-trace� will dump the traces on the respective files. The
tel
command �close� closes the trace files defined before and exec executes the nam
program for
visualization. The command exit will ends the application and return the number 0
as status
to the system. Zero is the default for a clean exit. Other values can be used to
say that is a exit
because something fails.
At the end of ns program we should call the procedure �finish� and specify at what
time the
termination should occur. For example,
$ns run
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
Once we define several nodes, we can define the links that connect them. An example
of a
definition of a link is:
Which means that $n0 and $n2 are connected using a bi-directional link that has
10ms of
propagation delay and a capacity of 10Mb per sec for each direction.
In NS, an output queue of a node is implemented as a part of each link whose input
is that
node. The definition of the link then includes the way to handle overflow at that
queue. In our
case, if the buffer capacity of the output queue is exceeded then the last packet
to arrive is
dropped. Many alternative options exist, such as the RED (Random Early Discard)
mechanism, the FQ (Fair Queuing), the DRR (Deficit Round Robin), the stochastic
Fair
Queuing (SFQ) and the CBQ (which including a priority and a round-robin scheduler).
In ns, an output queue of a node is implemented as a part of each link whose input
is that
node. We should also define the buffer capacity of the queue related to each link.
An example
would be:
There are number variants of the TCP protocol, such as Tahoe, Reno, NewReno, Vegas.
The
type of agent appears in the first line:
The command $ns attach-agent $n0 $tcp defines the source node of the tcp
connection.
The command
Defines the behavior of the destination node of TCP and assigns to it a pointer
called sink.
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
The below shows the definition of a CBR application using a UDP agent
The command $ns attach-agent $n4 $sink defines the destination node. The command
$ns
connect $tcp $sink finally makes the TCP connection between the source and
destination
nodes.
TCP has many parameters with initial fixed defaults values that can be changed if
mentioned
explicitly. For example, the default TCP packet size has a size of lOOObytes.This
can be
changed to another value, say 552bytes, using the command $tcp set packetSize_ 552.
When we have several flows, we may wish to distinguish them so that we can identify
them
with different colors in the visualization part. This is done by the command $tcp
set fid_ 1
that assigns to the TCP connection a flow identification of �l�.We shall later give
the flow
identification of �2� to the UDP connection.
Dept of ECE
SCE,Bangalore
15ECL68
VI Sem
A UDP source and destination is defined in a similar way as in the case of TCP.
Instead of defining the rate in the command $cbr set rate_ 0.01Mb, one can define
the time
interval between transmission of packets using the command.
NS is a discrete event based simulation. The tcp script defines when event should
occur. The
initializing command set ns [new Simulator] creates an event scheduler, and events
are then
scheduled using the format:
The scheduler is started when running ns that is through the command $ns run.
The beginning and end of the FTP and CBR application can be done through the
following
command
Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set packetsize_ 100
$cbr set rate_ 0.01Mb
$cbr set random_ false
TCP has many parameters with initial fixed defaults values that can be changed if
mentioned
explicitly. For example, the default TCP packet size has a size of 1000bytes.This
can be
changed to another value, say 552bytes, using the command $tcp set packetSize_ 552.
When we have several flows, we may wish to distinguish them so that we can identify
them
with different colors in the visualization part. This is done by the command $tcp
set fid_ 1
Dept of ECE
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
that assigns to the TCP connection a flow identification of �l�.We shall later give
the flow
identification of �2� to the UDP connection.
XGRAPH
The xgraph program draws a graph on an x-display given data read from either data
file or
from standard input if no files are specified. It can display upto 64 independent
data sets
using different colors and line styles for each set. It annotates the graph with a
title, axis
labels, grid lines or tick marks, grid labels and a legend.
event
time
from
node
to
node
pkt
type
pkt
size
flags
fid
src
addr
dst
addr
seq
num
pkt
id
r 1.3556 3 2 ack 40 �
+ 1.3556 2 0 ack 40 �
- 1.3556 2 0 ack 40 �
r 1.35576 0 2 tcp 1000
+ 1.35576 2 3 tcp 1000
d 1.35576 2 3 tcp 1000
+ 1.356 1 2 cbr 1000 -
3. From node
8. Flow id (fid) of IPv6 that a user can set for each flow at the input OTcl
script. Even
though fid field may not be used in a simulation, users can use this field for
analysis
purposes. The fid field is also used when specifying stream color for the NAM
display.
Dept of ECE
10
SCE,Bangalore
15ECL68
VI Sem
11. Network layer protocol's packet sequence number. Note that even though UDP
implementations do not use sequence number, NS keeps track of UDP packet
sequence number for analysis purposes.
Dept of ECE
11
SCE,Bangalore
15ECL68
VI Sem
Experiment 1
Aim: Implement a point - to - point network with duplex links between them. Analyze
the
network performance by setting the queue size and vary the bandwidth and find the
number
of packets dropped.
Step: 2.0ms
sl.awk
BEGIN {
count = 0;
event = $1;
END{
sl.tcl
Dept of ECE
12
SCE, Bangalore
15ECL68
VI Sem
close $tracefile
close $namfile
#create 4 nodes
set nO [$ns node]
set nl [$ns node]
set n2 [$ns node]
set n3 [$ns node]
//create labels
//set color
$ns color 1 red
Dept of ECE
13
SCE, Bangalore
15ECL68
VI Sem
ttcreate traffic: FTP: create FTP source agent on top of TCP and attach to TCP
agent
set ftp [new Application/FTP]
#.schedule events
$ns at 0.2 "$ftp start"
$ns run
Steps
2) gedit s 1 .tel
4) Vary the bandwidth from node 0 to 2 and keeping same bandwidth between 2 to 3
and
note down packets dropped.
slgraph
0.25 0
0.50 0
0.75 0
1.00 0
1.25 6
1.50 8
2.00 9
3.00 11
4.00 12
5.00 10
slgraph
Dept of ECE
14
SCE, Bangalore
15ECL68
VI Sem
|Close pHdcpyJ|Hboutj^
performance
analysis
slgraph
l.OC
00 2*0
000 3.0
o.
CJ1
o.
. ^ bandwidth
000
Experiment 2:
Dept of ECE
15
SCE, Bangalore
CCN Lab Manual
15ECL68
VI Sem
44
??
1 1 1 1 1 1 1 1 1
1 [ 1 1 1 1 1 1 1
1 1 1 1 [ 1 1 1 1 1
s2.awk
BEGIN {
ctcp = 0;
cudp = 0;
pkt = $5;
END {
printf("\nNo of packets sent\nTcp : %d \n Udp : %d\n", ctcp, cudp);
s2.tcl
proc finish {} {
Dept of ECE
16
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
Dept of ECE
17
SCE, Bangalore
15ECL68
VI Sem
Output
gedit s2.awk
gedit s2.tcl
sudo ns s2.tcl
No of packets sent
Tcp : 5940
Udp : 5166
gedit s2graph
Dept of ECE
18
SCE, Bangalore
15ECL68
VI Sem
Experiment 3
Implement Ethernet LAN using n nodes (6-10), change error rate and data rate and
compare throughput.
??
0.036000
Step: 2.0ms
4$
SD
TCPSource
O -�GO
�o
I I I
I I I I I I I
I I I I I I I I I I I I I I I I I I I I I I I I I I I I I
Dept of ECE
19
SCE, Bangalore
CCN Lab Manual
15ECL68
VI Sem
s3.awk
BEGIN {
sSize = 0;
startTime = 5.0;
stopTime = 0.1;
Tput = 0;
event = $1;
time = $2;
size = $6;
if(event == "+")
startTime = time;
if(event == "r")
{
if(time > stopTime)
stopTime = time;
sSize += size;
END {
s3.tcl
proc finish {} {
Dept of ECE
20
SCE,Bangalore
VI Sem
$ns make-lan "$nl $n2 $n3 $n4 $n5 $n6" 2Mb 40ms LL Queue/DropTail Mac/802_3
$ns run
Output:
#gedit s3.tcl
#sudo ns s3.tcl
Dept of ECE
21
SCE, Bangalore
15ECL68
VI Sem
E"El
xgraph
Close II Hdcp
tnrognput x
Performanc
e analysis
.s3graph
� v \
^ 1
. J
. H
(
J
/ .
. I
f
J
1*0
000 1*5
CSJ
000 2*5
ro
4*-
o
4a-
cn
time
000
0.00000
cwnd
1.000
( 1 )
( 2 )
( 3 )
( 4 )
( 5 )
( 6 )
( 7 )
1. Timestamp
3. Source port id
5. Destination port id
6. Name of the variable being traced (cwnd_ , t_seqno_ , throughput,
reverse_feedback)
Dept of ECE
22
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
Experiment 4
Simulate an Ethernet LAN using n nodes and set multiple traffic nodes and plot
congestion window for different source / destination.
s4.awk
BEGIN {
if($6 == "cwnd_")
END {
s4.tcl
Dept of ECE
23
SCE, Bangalore
15ECL68
VI Sem
set tracefile [open s4.tr w]
proc finish {} {
$ns make-lan "$n3 $n4 $n5 $n6 $n7 $n8" 512Kb 40ms LL Queue/DropTail Mac/802_3
24
SCE, Bangalore
15ECL68
VI Sem
$ns run
Output
#gedit s4.tcl
#sudo ns s4.tcl
Dept of ECE
25
SCE, Bangalore
15ECL68
VI Sem
xgraph
xgraph
to noon
Conge
istion Window g
to nnnn
/.
tcpz:
oo*UU<Jo.
28 0000.
.� / r
26*0000.
o a nnnn.
r*
99 nnnn.
r=f
zz a w w
on nnnn.
, f
zy.ww
ip nnnn.
lo.ww
16.0000..
>
19 nnnn.
1Z * ww
in nnnn.
p nnnn.
. /
o * ww
R nnnn
0*0000
A tint'll�).......
. 2.
n* OOOO
2 0000
2
n nnnn
� "
0.0000 1*0
000 2*0
000 3*0
in
.. o
000 TineCsec)
Dept of ECE
26
SCE, Bangalore
CCN Lab Manual
15ECL68
VI Sem
Implement Ethernet LAN using n nodes and assign multiple traffic nodes and plot
congestion
window for different source / destination.
5. Simulate simple ESS and with transmitting nodes in wire-less LAN by simulation
and
determine the performance with respect to transmission of packets.
s5.awk
BEGIN {
PacketRcvd = 0;
Throughput = 0.0;
PacketRcvd++;
END {
s6.tcl
Dept of ECE
27
SCE, Bangalore
CCN Lab Manual
15ECL68
VI Sem
proc finish {} {
$ns flush-trace
close $tracefile
close $namfile
exit 0
set val(nn) 5
-llType LL \
-macType Mac/802_11 \
-ifqType Queue/DropTail \
-channelType ChannelAVirelessChannel \
-propType Propagation/TwoRayGround \
-antType Antenna/OmniAntenna \
-ifqLen 50 \
-phyType Phy/WirclessPhy \
-topolnstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace ON
Mabel node
Dept of ECE
28
SCE, Bangalore
VI Sem
$ns run
Output
#gedit s5.tcl
#sudo ns s5.tcl 5
Dept of ECE
29
SCE, Bangalore
15ECL68
VI Sem
Experiment 6
proc finish {} {
Dept of ECE
30
SCE, Bangalore
15ECL68
VI Sem
$ns rtproto LS
$ns at 45 "finish"
$ns run
Output
#gedit s6.tcl
#sudo ns s6.tcl
Dept of ECE
31
SCE, Bangalore
CCN Lab Manual
15ECL68
VI Sem
Dept of ECE
32
SCE, Bangalore
15ECL68
VI Sem
Part B
i) Bit stuffing
BIT STUFFING
#include<string.h>
#include<stdio.h>
main()
char a[20],fs[50]="",t[6],r[5];
int i,j,p=0,q=0;
if(strlen(a)<5)
strcat(fs,a);
else
for(i=0;i<strlen(a)-4;i++)
for(j=i;j<i+5;j++)
t[p++]=a[j];
t[p]='\0';
strcat(fs,"l 11110");
i=j-l;
}
else
r[0]=a[i];
r[l]='\0';
strcat(fs,r);
P=0;
t[p++]=a[q];
t[p]-\0';
Dept of ECE
33
SCE,Bangalore
15ECL68
VI Sem
strcat(fs,t);
strcat(fs,"01111110");
printf("After stuffing : %s",fs);
getch();
}
CHARACTER OR BYTE STUFFING
#include<string.h>
#include<stdio.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;
scanf(" %c",&ed);
x[0]=s[0]=s[l]=sd;
x[l]=s[2]='\0';
y[0]=d[0]=d[l]=ed;
d[2]=y[l]='\0';
strcat(fs,x);
for(i=0;i<strlen(a);i++)
t[0]=a[i];
t[l]-\0';
if(t[0]=sd)
strcat(fs,s);
else
if(t[0]==ed)
strcat(fs,d);
else
strcat(fs,t);
}
strcat(fs,y);
getch();
Dept of ECE
34
SCE, Bangalore
15ECL68
VI Sem
2. Write a program for distance vector algorithm to find suitable path for
transmission.
#include<stdio.h>
void initialize()
int i, j;
void getgraph()
int i, j;
if (i == j) continue;
35
SCE,Bangalore
15ECL68
VI Sem
if (graph[src][i] == 1)
min = delay;
via = i;
int main()
initialize();
getgraph();
process(src, dest);
return 0;
#include<stdio. h>
void sort(void);
}stemp,permanent[10]={'',0},temp[10]={'',-1};
static int perm,tern;
void main()
Dept of ECE
36
SCE,Bangalore
15ECL68
VI Sem
printf("\nEnter the adjacency matrix for the graph:\n");
for(i=0;i<nodes ;i++)
scanf("%d",&dsp[i][j]);
fflush(stdin);
if(i!=j)
if(dsp[i][j]>0)
sort();
while(tem>=0)
j =permanent[perm-1 ] .dest-97;
for(i=0;i<nodes;i++)
if(i!=initial-97)
{
if(dsp[j][i]>0)
i=-i;
for(k=0;k<perm;k++)
if(permanent[k] .dest==(i+97))
l=k;
if(temp[k] .dest==(i+97))
l=k;
Dept of ECE
37
SCE, Bangalore
15ECL68
VI Sem
if(l<0)
for(m=0;m<perm;m++)
{
if(permanent[m] .dest==temp[tem] .src)
n=permanent[m] .length;
else
for(m=0;m<perm;m++)
if(permanent[m] .dest==j+97)
else
n=dsp[j][i];
if((n<temp[l] .length))
temp[l].length=n;
temp[l].src=j+97;
temp[l].dest=i+97;
sort();
printf("\nShortest path:\n");
printf("From %c to %c is:",initial,dest);
for(i=0;i<perm-1 ;i++)
if(permanent[i] .dest==dest)
point=i;n=i; break;
} i=0;
f�r(j=perm;j>0;j�)
Dept of ECE
38
SCE,Bangalore
15ECL68
VI Sem
path[i++]=permanent[point] .dest;
point=j-l;
path[i]=initial;
for(j=i;j>=0;j�)
printf("%c ",path[j]);
printf("\t length=%d",permanent[n].length);
getch();
void sort()
int i,j,k;
for(i=0;i<=tem;i++)
k=l;
stemp=temp[j];
temp [j ] =temp [j+1 ];
tcmp[j+1 J=stcmp; k=0;
if(k)
break;
4. For the given data, use CRC-CCITT polynomial to obtain CRC code. Verify the
program for the cases
a. Without error
b. With error
Theory
h n -lbn-2bn-3- � -bib[bo
Ex: -
As
As
X 10 + X 7 + X 5 + X 3 + X 2 +X I
Dept of ECE
39
SCE, Bangalore
15ECL68
VI Sem
Algorithm
1. Given a bit string, append Os to the end of it (the number of Os is the same as
the degree of the
generator polynomial) let B(x) be the polynomial corresponding to B.
5. Let T� represent the bit stream the receiver gets and T�(x) the associated
polynomial.
#include<stdio. h>
int main()
void div();
scanf("%d",&a[i]);
k=len-16;
div();
for(i=0;i<len;i++)
Dept of ECE
40
SCE,Bangalore
VI Sem
printf("%2d",b[i]);
scanf("%d",&a[i]);
div();
for(i=0;i<len;i++)
if(a[i] !=0)
void div()
for(i=0;i<k;i++)
if(a[i]==gp[0])
a[j]=a[j] A gp[count++];
count=0;
#include<conio.h>
#include<stdlib .h>
void main()
int ij,noframes,x,x2;
// clrscr();
//for(i=0;i<2;i++)
// rand();
noframes=10;
i=i;
j=i;
Dept of ECE
41
SCE, Bangalore
15ECL68
VI Sem
// scanf("%d",&noframes);
getchO;
while(noframes>0)
//srand(xl++);
x=rand()%10;
i++;
j++;
#include<stdio. h>
int main()
int w,i,f,frames[50];
for(i=l;i<=f;i++)
Dept of ECE
42
SCE,Bangalore
15ECL68
VI Sem
printf("After sending %d frames at each stage sender waits for acknowledgement sent
by
the receiver\n\n",w);
for(i=l;i<=f;i++)
if(i%w==0)
printf("%d\n",frames[i]);
else
printf("%d ",frames[i]);
if(f%w!=0)
}
6. Write a program for congestion control using leaky bucket algorithm.
Theory
The congesting control algorithms are basically divided into two groups: open loop
and closed
loop. Open loop solutions attempt to solve the problem by good design, in essence,
to make sure
it does not occur in the first place. Once the system is up and running, midcourse
corrections are
not made. Open loop algorithms are further divided into ones that act at source
versus ones that
act at the destination. In contrast, closed loop solutions are based on the concept
of a feedback
loop if there is any congestion. Closed loop algorithms are also divided into two
sub categories:
explicit feedback and implicit feedback. In explicit feedback algorithms, packets
are sent back
from the point of congestion to warn the source. In implicit algorithm, the source
deduces the
existence of congestion by making local observation, such as the time needed for
acknowledgment to come back.
The presence of congestion means that the load is (temporarily) greater than the
resources (in part
of the system) can handle. For subnets that use virtual circuits internally, these
methods can be
used at the network layer. Another open loop method to help manage congestion is
forcing the
packet to be transmitted at a more predictable rate. This approach to congestion
management is
widely used in ATM networks and is called traffic shaping.
The other method is the leaky bucket algorithm. Each host is connected to the
network by an
interface containing a leaky bucket, that is, a finite internal queue. If a packet
arrives at the queue
when it is full, the packet is discarded. In other words, if one or more process
are already queued,
the new packet is unceremoniously discarded. This arrangement can be built into the
hardware
interface or simulate d by the host operating system. In fact it is nothing other
than a single server
queuing system with constant service time.
Dept of ECE
43
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
The host is allowed to put one packet per clock tick onto the network. This
mechanism turns an
uneven flow of packet from the user process inside the host into an even flow of
packet onto the
network, smoothing out bursts and greatly reducing the chances of congestion.
Faucet
Interface
Containing
a Leaky Bucket
Leaky Bucket
Packet
Unregulated
Flow
Regulated
Packet
Network
LEAKY BUCKET
#include<stdio. h>
#include<stdlib .h>
int orate,drop=0,cap,x,count=0,inp[10]={0},i=0,nsec,ch;
printf("\n enter bucket size : ");
scanf("%d",&cap);
printf("\n enter output rate
scanf(" %d" ,&orate);
do
{
i++;
scanf("%d",&ch);
while(ch);
nsec=i;
printf("%d",i+l);
printf(" \t%d\t ",inp[i]);
printf(" \t %d\t ",MIN((inp[i]+count),orate));
if((x=inp[i]+count-orate)>0)
Dept of ECE
44
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
if(x>cap)
count=cap;
drop=x-cap;
else
count=x;
drop=0;
else
drop=0;
count=0;
printf(" \t %d \t %d \n",drop,count);
return 0;
Viva Questions
5. What is encapsulation?
7. What is MTU?
22. What are ephemerical port number and well known port numbers?
Dept of ECE
45
SCE,Bangalore
CCN Lab Manual
15ECL68
VI Sem
43. How do you classify routing algorithms? Give examples for each.
Dept of ECE
46
SCE,Bangalore