SlideShare a Scribd company logo
Modeling computer networks by
colored Petri nets
Dmitry A. Zaitsev
http://member.acm.org/~daze
How it looks
Statistics
i03
PBBseg
bavail
o03
PBBseg
bavail
i04
PBBseg
bavail
o04
PBBseg
bavail
i01
PBBseg
bavail
o01
PBBseg
bavail
i02
PBBseg
bavail
o02
PBBseg
bavail
i06
seg
avail
o06
seg
avail
io5
seg
avail
o05
seg
avail
i07
seg
avail
o07
seg
avail
i09
seg
avail
o09
seg
avail
i10
seg
avail
o10
seg
avail
i33
seg
avail
o33
seg
avail
i32
seg
avail
o32
seg
avail
i34
seg
avail
o34
seg
avail
i35
seg
avail
o35
seg
avail
i36
seg
avail
o36
seg
avail
i37
seg
avail
o37
seg
avail
i38
seg
avail
o38
seg
avail
i08
seg
avail
o08
seg
avail
o31
seg
avail
i31
seg
avail
i11
seg
avail
011
seg
avail
i12
seg
avail
o12
seg
avail
i13
seg
avail
o13
seg
avail
i14
seg
avail
o145
seg
avail
i15
seg
avail
o15
seg
avail
i16
seg
avail
o16
seg
avail
i17
seg
avail
o17
seg
avail
i18
seg
avail
o18
seg
avail
o19
seg
avail
i19
seg
avail
i20
seg
avail
o20
seg
avail
i21
seg
avail
o21
seg
avail
i22
seg
avail
o22
seg
avail
i23
seg
avail
o23
seg
avail
i24
seg
avail
o24
seg
avail
i25
seg
avail
o25
seg
avail
i41
seg
avail
o41
seg
avail
i42
seg
avail
o42
seg
avail
i43
seg
avail
o43
seg
avail
o44
seg
avail
i44
seg
avail
o45
seg
avail
i45
seg
avail
i46
seg
avail
o46
seg
avail
i48
seg
avail
o48
seg
avail
i49
seg
avail
o49
seg
avail
i50
seg
avail
o50
seg
avail
i51
seg
avail
o51
seg
avail
i52
seg
avail
o52
seg
avail
i53
seg
avail
o53
seg
avail
i54
seg
avail
o54
seg
avail
i55
seg
avail
o55
seg
avail
i56
seg
avail
o56
seg
avail
i57
seg
avail
o57
seg
avail
i58
seg
avail
o58
seg
avail
i59
seg
avail
o59
seg
avail
a31
mac
31
a32
mac
32
a33
mac
33
a34
mac
34
a35
mac
35
a36
mac
36
a41
mac
41
a42
mac
42
a43
mac
43
a44
mac
44
a45
mac
45
a46
mac
46
a47
mac
47
a48
mac
48
a49
mac
49
a4a
mac
50
a4b
mac
51
a4c
mac
52
a11
mac
11
a12
mac
12
a13
mac
13
a14
mac
14
a15
mac
15
a16 mac
16
a21
mac
21
a22
mac
22
a23
mac
23
a24
mac
24
a25
mac
25
a26
mac
26
a27
mac
27
a28
mac
28
a29
mac
29
a37
mac
37
a38
mac
38
i61
seg
avail
o61
seg
avail
o60
seg
avail
i60
seg
avail
a2a
mac
30
i26
seg
avail
o26
seg
avail
ab0
mac
80
ab3
mac
83
ab4
mac
84
ab2
mac
82
ab1
mac
81
SndFrmT
sfT
INT
0
sfT
RcvFrmT
rfT
INT
0
rfT
DrpFrmNw
dfN
INT
0
dfN
DrpFrmT
dfT
INT
0
dfT
PBB0
SWB4SWB4
PBB3
SWB1-2SWB1-2
PBB4
SWB1-2SWB1-2
PBB1
SWB1-2SWB1-2
PBB2
SWB1-2SWB1-2
SW11
SW4SW4
SW12
SW4SW4
SW21
SW4SW4
SW22
SW4SW4
SW23
SW4SW4
SW42
SW4SW4
SW41
SW4SW4
SW45
SW4SW4
SW43
SW4SW4
SW44
SW4SW4
SW31
SW4SW4 SW33
SW4SW4
SW24
SW4SW4
SW32
SW4SW4
c11
SS
c12
WSWS
c13
WSWS
c14
WSWS
c15
WSWS
c16
MWSMWS
c21
WSWS
c22
WSWS
c23
WSWS
c24
WSWS
c25
WSWS
c26
MWSMWS
c27
SS
c28
WSWS
c29
WSWS
c31
SS
c32
WSWS
c33
WSWS
c34
WSWS
c35
WSWS
c36
MWSMWS
c41
WSWS
c42
WSWS
c43
WSWS
c44
SS
c45
WSWS
c46
WSWS
c47
WSWS
c48
WSWS
c49
MWSMWS
c4a
SS
c4b
WSWS
c4c
WSWS
c37
SS
c38
SS
c2a
SS
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`bavail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
11`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1
1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1
1`avail@0
1
1`avail@0
1 1`avail@0
1 1`31
1 1`32
1 1`33
1 1`34
1 1`35
1 1`36
1 1`41
1 1`42
1 1`43
1 1`44
1 1`45
1 1`46
1 1`47
1 1`48
1 1`49
1 1`50
1 1`51
1 1`52
1 1`11
1 1`12
1 1`13
1 1`14
1 1`15
1 1`16
1 1`21
1 1`22
1 1`23
1 1`24
1 1`25
1 1`26
1 1`27
1 1`28
1 1`29
1 1`37 1 1`38
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`30
1 1`avail@0
1 1`avail@0
1 1`80
1 1`83
1 1`841 1`82
1 1`81
1 1`0
1 1`0
1 1`0
1 1`0
Tools and models
• Download and install modeling system
CPN Tools from http://cpntools.org
• Download and unpack example nets
modeling networks:
Ethernet,
IP,
MPLS,
Bluetooth,
PBB
Books and textbooks
• Zaitsev D.A. Clans of Petri Nets: Verification of
protocols and performance evaluation of
networks, LAP LAMBERT Academic Publishing,
2013, 292 p. – free download a draft from
http://daze.ho.ua/daze-clans-covered-draft.djvu
• Zaitsev D.A., Shmeleva T.R. Simulating computer
networks by CPN Tools, Odessa: ONAT, 2006, 65
p. – free download from
http://daze.ho.ua/cpnmp2.pdf
Colored Petri net concept
• A Petri net graph – directed bipartite graph
• Functional programming language ML to load
elements of the graph
• Tokens as elements of abstract data types
(color sets)
• Hierarchical structure with the transition
substitution
• Time delays associated with transitions and
arcs
What to do with CPN models
• Watch tokens game – for understanding
and debugging
• Build the model State Space – for model
checking (verification)
• Simulate on prolonged interval of time –
for performance evaluation
After starting CPN Tools
Palettes and tools
A Place
Name
Color set
Initial Marking
A Transition
Name
[Guard predicate] @+Timed Dealay
input ();
output ();
action
(A Program);
Arcs
pattern
constructor@+
Time_delay
Declarations
• Colset – a color set
• Val – a constant
• Var – a variable
• Fun – a function
Model of switched Ethernet
Switch (SWI)
Server 1
(S1, MAC=1)
Server 2
(S2, MAC=3)
Workstation 1
(WS1, MAC=2)
Workstation 2
(WS2, MAC=4)
Workstation 3
(WS3, MAC=5)
Workstation 4
(WS4, MAC=6)
Workstation 5
(WS5, MAC=7)
HUB1 HUB2
HUB3
Port 1
Port 2
Port 3
Scheme of sample switched LAN
Main page of Ethernet model
Model of LAN
p1out
seg
avail p1in
seg
avail p2in
seg
availp2out
seg
avail p3out
seg
avail p3in
seg
avail
aS1
mac
1`1
aS2
mac
1`3
aWS1
mac
1`2
aWS2
mac
1`4
aWS3
mac
1`5
aWS4
mac
1`6
aWS5
mac
1`7
SWI
SWISWI
S1
SS
S2
SS
WS1
WSWS
WS2
WSWS
WS3
WSWS
WS4
WSWS
WS5
MWSMWS
Declarations
colset mac = INT timed;
colset portnum = INT;
colset nfrm = INT;
colset sfrm = product nfrm * INT timed;
colset frm = product mac * mac * nfrm timed;
colset seg = union f:frm + avail timed;
colset swi = product mac * portnum;
colset swf = product mac * mac * nfrm * portnum timed;
colset remsv = product mac * nfrm timed;
var src, dst, target: mac;
var port: portnum;
var nf, rnf: nfrm;
var t1, t2, s, q, r: INT;
colset Delta = int with 1000..2000;
fun Delay() = Delta.ran();
colset dex = int with 100..200;
fun Dexec() = dex.ran();
colset dse = int with 10..20;
fun Dsend() = dse.ran();
colset nse = int with 10..20;
fun Nsend() = nse.ran();
fun cT()=IntInf.toInt(!CPN'Time.model_time)
Ethernet Switch
Port1 Text
Text
Text
Port2
Port3
Model of Switch
Port1InIn/Out
seg
In/Out
Port1OutIn/Out
seg
In/Out
Port2InIn/Out
seg
In/Out
Port2OutIn/Out
seg
In/Out
Port3InIn/Out
seg
In/Out
Port3OutIn/Out
seg
In/Out
SwTa1 SwitchTable
swi
1`(1,1)++1`(2,1)++1`(3,2)++1`(4,2)++1`(5,3)++1`(6,3)++1`(7,3)
SwitchTable
Bu1 Buffer
swf
Buffer
SwTa2 SwitchTable
swi
1`(1,1)++1`(2,1)++1`(3,2)++1`(4,2)++1`(5,3)++1`(6,3)++1`(7,3)
SwitchTable
SwTa3 SwitchTable
swi
1`(1,1)++1`(2,1)++1`(3,2)++1`(4,2)++1`(5,3)++1`(6,3)++1`(7,3)
SwitchTable
Bu2 Buffer
swf
Buffer
Bu3 Buffer
swf
Buffer
In1
@+5
[dst=target]
Out1
@+5
In2
@+5
[dst=target]
Out2
@+5
In3
@+5
[dst=target]
Out3
@+5
f(src,dst,nf)
f(src,dst,nf)
(target,port)
f(src,dst,nf)
f(src,dst,nf)
(src,dst,nf,port)
(src,dst,nf,1)
f(src,dst,nf)
f(src,dst,nf)
(target,port)
(target,port)
(src,dst,nf,port)
(src,dst,nf,port)
(src,dst,nf,2)
(src,dst,nf,3)
avail
avail
avail
avail
avail
avail
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
1 1`avail@0
7
1`(1,1)++
1`(2,1)++
1`(3,2)++
1`(4,2)++
1`(5,3)++
1`(6,3)++
1`(7,3)
7
1`(1,1)++
1`(2,1)++
1`(3,2)++
1`(4,2)++
1`(5,3)++
1`(6,3)++
1`(7,3)
7
1`(1,1)++
1`(2,1)++
1`(3,2)++
1`(4,2)++
1`(5,3)++
1`(6,3)++
1`(7,3)
Switch port
Port1In
In/Out
seg
In/Out
Port1Out
In/Out
seg
In/Out
SwTa1
SwitchTable
swi
1`(1,1)++1`(2,1)++1`(3,2)++
1`(4,2)++1`(5,3)++1`(6,3)++1`(7,3)
Bu1
Buffer
swf
Buffer
In1
@+5
[dst=target]
Out1
@+5
f(src,dst,nf)
f(src,dst,nf)
(target,port)
(src,dst,nf,port)
(src,dst,nf,1)
avail
avail
SwitchTable
Workstation
LANout
In/Out
seg
In/Out
Own
In/Out
mac
In/Out
Remote
mac
1`1++1`3
LANin
In/Out
seg
In/Out
Receive
@+10
[dst=target]
Send
@+10
avail
f(src,dst,1)
target
src
dst
dst@+Delay()
f(src,dst,nf)
avail
Server
LANout
In/Out
seg
In/Out
Own
In/Out macIn/Out
Remote
remsv
Reply
frm
LANin
In/Out
seg
In/Out
Receive
@+10
[dst=target]
Send
@+Dsend()
Exec
@+Dexec()
avail
f(src,dst,nf)
target
(src,nf)
(dst,nf)
src
Nsend()`(src,dst,nf)(src,dst,nf)
f(src,dst,nf)
avail
Measuring workstation
Avarage Network
Responce Time
Network Responce Times
for Requests
Own
In/Out
mac
In/Out
LANoutIn/Out
seg
In/Out
LANinIn/Out
seg
In/Out
return
sfrm
Remote
mac
1`1++1`3
num
nfrm
1`1
nSnd
sfrm
NRTs
sfrm
new
BOOL
sum
INT
1`0
quan
INT
1`0
NRTime
INT
1`0
Send
@+10
Receive
@+10
[dst=target]
IsFirst
[rnf=nf]
Culc
avail
f(src,dst,nf)
dst
dst@+Delay()
src
nf
nf+1
f(src,dst,rnf) target
(nf,cT())
(rnf,cT())
(rnf,t2)
(nf,t1)
(nf,t2-t1)
avail
true
s
s+(t2-t1)
q
q+1
q
s
true
r s div q
Avarage Network
Responce Time
Network Responce Times
for Requests
Own
In/Out
mac
In/Out
LANoutIn/Out
seg
In/Out
LANinIn/Out
seg
In/Out
return
sfrm
Remote
mac
1`1++1`3
num
nfrm
1`1
nSnd
sfrm
NRTs
sfrm
new
BOOL
sum
INT
1`0
quan
INT
1`0
NRTime
INT
1`0
Send
@+10
Receive
@+10
[dst=target]
IsFirst
[rnf=nf]
Culc
avail
f(src,dst,nf)
dst
dst@+Delay()
src
nf
nf+1
f(src,dst,rnf) target
(nf,cT())
(rnf,cT())
(rnf,t2)
(nf,t1)
(nf,t2-t1)
avail
true
s
s+(t2-t1)
q
q+1
q
s
true
r s div q
1 1`7@235684
1 1`avail@235535
1 1`avail@235684
4544
2
1`1@236718+++
1`3@236161
1 1`311
1 1`(310,235520)@235530
309 1`(1,861)@886+++
1`(2,696)@781+++
1`(3,266)@1730+++
1`(4,335)@1989+++
1`(5,262)@3411+++
1`(6,253)@3591+++
1`(7,213)@4928+++
1`(8,213)@5021+++
1`(9,430)@6458+++
1`(10,267)@6383+++
1`(11,347)@8099+++
1`(12,336)@8365+++
1`(13,444)@9606+++
1`(14,415)@9951+++
1`(15,342)@10964+++
1`(16,218)@11172+++
1`(17,305)@12105+++
1`(18,334)@13215+++
1`(19,678)@14284+++
1`(20,488)@15348+++
1`(21,290)@15385+++
1`(22,291)@16291+++
1`(23,381)@16645+++
1 1`108233
1 1`309
1 1`350
Model state
Time scaling
Model of IP network
Main page
R1P1In
pkt
R1P1Out
pkt
R1P2In
pkt
R1P2Out
pkt
R1P3In
pkt
R1P3Out
pkt
R1P4In
pkt
R1P4Out
pkt
R2P1In
pkt
R2P1Out
pkt
R2P2In
pkt
R2P2Out
pkt
R2P3In
pkt
R2P3Out
pkt
R2P4In
pkt
R2P4Out
pkt
R3P1Out
pkt
R3P1In
pkt
R3P2Out
pkt
R3P2In
pkt
R3P4Out
pkt
R3P4In
pkt
R3P3Out
pkt
R3P3In
pkt
R4P1In
pkt
R4P1Out
pkt
R4P4In
pkt
R4P4Out
pkt
R4P2Out
pkt
R4P2In
pkt
R4P3Out
pkt
R4P3In
pkt
R5P1In
pkt
R5P1Out
pkt
R5P2Out
pkt
R5P2In
pkt
R5P3In
pkt
R5P3Out
pkt
R5P4In
pkt
R5P4Out
pkt
R6P1In
pkt
R6P1Out
pkt
R6P2Out
pkt
R6P2In
pkt
R6P3Out
pkt
R6P3In
pkt
R6P4In
pkt
R6P4Out
pkt
R7P3Out
pkt
R7P3In
pkt
R7P4In
pkt
R7P4Out
pkt
R7P2In
pkt
R7P2Out
pkt
R7P1In
pkt
R7P1Out
pkt
Traffic
Traffic
INT
1`0
Traffic
France
Router1Router1
Sweden
Router2Router2
Transmit
@+2
Receive
@+2
Spain
Router3Router3
Germany1
Router4Router4
Germany
Router5Router5
Ukraine
Router6Router6
Finland
Router7Router7
Receive1
@+2
Transmit1
@+2
Transmit2
@+2
Receive2
@+2
Transmit3
@+2
Receive3
@+2
Transmit4
@+2
Receive4
@+2
Transmit7
@+2
Receive7
@+2
Transmit6
@+2
Receive6
@+2
Receive5
@+2
Transmit5
@+2
Receive9
@+2
Transmit9
@+2
Transmit8
@+2
Receive8
@+2
Terminal1
Terminal1Terminal1
Terminal3
Terminal3Terminal3
Terminal2
Terminal2Terminal2
Terminal
Terminal6Terminal6
Terminal6
Terminal5Terminal5
Terminal5
Terminal4Terminal4
a
a a
a
a a
a a
a
a
a a
a
a a
a
a a
a a
a
a
a a
a a
aa
a
a
a
a
a a
a
a
a
a a
a
a
a
a
a
a
a
a
a
a
a
a
a
Basic declarations
colset ip=product INT*INT*INT*INT timed;
colset mask=INT;
colset nwt=product ip*mask timed;
colset b=INT timed;
colset pkt=record ipsrc:ip*ipdst:ip*data:b timed;
colset nif=int;
colset interf=product ip*nif;
colset gw=ip;
colset rtr=record nw:nwt *gw:ip*ifc:interf timed ;
colset buf=product pkt*ip;
fun pow(x,0)=1 | pow(x,y)=pow(x,y-1)*x;
colset aux=INT timed;
var q:nwt; var r:rtr; var p,src,dst:ip;
var a:pkt ; var v:aux; var i,c,k:INT; var tr:buf;
SameNW function
fun sameNW(a1:ip,a2:ip,m:INT)=if (32-m) < 8 then
( if ((#1 a1) = (#1 a2)) andalso ((#2 a1) = (#2 a2)) andalso
((#3 a1) =(#3 a2)) andalso ((((#4 a1) div pow(2,(32-m)))*(pow(2,(32-m)))) = (#4 a2))
then true else false ) else if (32-m)<16 then
( if ((#1 a1) = (#1 a2)) andalso ((#2 a1) = (#2 a2)) andalso
((((#3 a1) div pow(2,((32-m)-8))) * pow(2,((32-m)-8))) = (#3 a2)) then true else false)
else if (32-m)<24 then
(if ((#1 a1)=(#1 a2)) andalso ((((#2 a1) div pow(2,((32-m)-16)))*pow(2,((32-m)-16)))=(#2 a2))
then true else false) else
if ((((#1 a1) div pow(2,((32-m)-24)))*pow(2,((32-m)-24)))=(#1 a2)) then true else
false;
Router port
RT1
rt
rtr
[{nw=((194,79,128,0),19),gw=(212,225,128,1),ifc=((212,225,128,1),2)},
{nw=((212,225,128,0),17),gw=(212,225,128,1),ifc=((212,225,128,1),2)},
{nw=((194,98,0,0),19),gw=(212,225,128,1),ifc=((212,225,128,1),2)},
{nw=((217,13,48,0),20),gw=(212,225,128,1),ifc=((212,225,128,1),2)},
{nw=((195,100,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((62,220,160,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((83,218,64,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((82,99,0,0),18),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((82,223,0,0),16),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((85,155,0,0),16),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((213,171,224,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((80,81,96,0),20),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((62,117,0,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((82,119,0,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((212,60,192,0),18),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((217,146,144,0),20),gw=(213,9,128,2),ifc=((213,9,128,1),3)},
{nw=((82,207,0,0),17),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((195,5,0,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((62,16,0,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((212,1,64,0),18),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((195,134,224,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((85,23,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((84,34,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4)},
{nw=((62,71,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4)}
]
rt
p1IN
In
pkt
p1OUT
Out
pkt
Buf
Buffer1
buf
Buffer1
IP1
ip
1`(194,62,10,19)
get1
@+18
sameNW(#ipdst a,#1 (#nw r) ,#2 (#nw r))
put1
@+1(#2 tr)=p
r
tr
p
a
(#1 tr)
(a,(#1 (#ifc r)))
In
Out
Terminal network
Out
Out
pkt
Out
ownNW
nwt
1`((212,225,128,0),17)++
1`((194,79,128,0),19)++
1`((194,98,0,0),19)++
1`((217,13,48,0),20)
allNW
nwt
1`((62,117,0,0),19)++
1`((82,119,0,0),19)++
1`((212,60,192,0),18)++
1`((217,146,144,0),20)++
1`((195,134,224,0),19)++
1`((85,23,0,0),16)++
1`((84,34,0,0),16)++
1`((62,71,0,0),16)++
1`((62,220,160,0),19)++
1`((83,218,64,0),19)++
1`((195,100,0,0),16)++
1`((82,99,0,0),18)++
1`((85,155,0,0),16)++
1`((213,171,224,0),19)++
1`((82,223,0,0),16)++
1`((80,81,96,0),20)++
1`((82,207,0,0),17)++
1`((195,5,0,0),19)++
1`((62,16,0,0),19)++
1`((212,1,64,0),18)
Data
INT
1`64
In
In
pkt
In
ipsrc
ip
ipdst
ip
1
aux
1`5
Traffic
Traffic
INT
1`0
Traffic
Pkt
pkt
2
INT
1`1
3
INT
4
INT
1
@+2
IpGenerate1
@+2
IpGenerate2
@+2
Counter
{ipsrc=src,ipdst=dst,data=i}
i
qp
p
src
dst
q
q @+5
q @+5
v
v@+1
a
k+1
k
a
c
c
c
c
c
c
Program to generate IP address
input (q);
output (p);
action
(if (#2 q)>=24 then let
val i=pow(2,8-((#2 q)-24))-1
val p=(#1 (#1 q),#2 (#1 q),#3 (#1 q),discrete((#4 (#1 q)),(#4 (#1 q))+i))
In (p) end
else if (#2 q)>=16 andalso (#2 q)<24 then let
val i=pow(2,8-((#2 q)-16))-1
val p=(#1 (#1 q),#2 (#1 q),discrete((#3 (#1 q)),(#3 (#1 q))+i),discrete(1,254))
In (p) end
else if (#2 q)>=8 andalso (#2 q)<16 then
let
val i=pow(2,8-((#2 q)-8))-1
val p=(#1 (#1 q),discrete((#2 (#1 q)),(#2 (#1 q))+i),discrete(1,254),discrete(1,254))
In (p) end
else let
val i=pow(2,8-((#2 q)))-1
val p=(discrete((#1 (#1 q)),(#1 (#1 q))+i),discrete(1,254),discrete(1,254),discrete(1,254))
In (p) end);
MPLS label switching
MPLS router port
p2IN
In
pkt
In
rec2
rtr
p2
pkt
Buf1
buf
Ltable2
LT1
lt
1`{ininterf=2,L1=2,outinterf=4,L2=5}++
1`{ininterf=2,L1=3,outinterf=3,L2=1}++
1`{ininterf=2,L1=4,outinterf=3,L2=2}++
1`{ininterf=2,L1=5,outinterf=4,L2=6}++
1`{ininterf=2,L1=6,outinterf=4,L2=7}++
1`{ininterf=3,L1=3,outinterf=2,L2=0}++
1`{ininterf=3,L1=6,outinterf=2,L2=0}++
1`{ininterf=4,L1=2,outinterf=2,L2=0}++
1`{ininterf=4,L1=3,outinterf=2,L2=0}++
1`{ininterf=4,L1=4,outinterf=2,L2=0}
LT1
p2OUT
Out
pkt
Out
RT2
rtr
[{nw=((194,79,128,0),19),gw=(212,225,128,1),ifc=((212,225,128,1),2),label=1},
{nw=((212,225,128,0),17),gw=(212,225,128,1),ifc=((212,225,128,1),2),label=1},
{nw=((194,98,0,0),19),gw=(212,225,128,1),ifc=((212,225,128,1),2),label=1},
{nw=((217,13,48,0),20),gw=(212,225,128,1),ifc=((212,225,128,1),2),label=1},
{nw=((195,100,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=2},
{nw=((62,220,160,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=2},
{nw=((83,218,64,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=2},
{nw=((82,99,0,0),18),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=2},
{nw=((82,223,0,0),16),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=3},
{nw=((85,155,0,0),16),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=3},
{nw=((213,171,224,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=3},
{nw=((80,81,96,0),20),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=3},
{nw=((62,117,0,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=4},
{nw=((82,119,0,0),19),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=4},
{nw=((212,60,192,0),18),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=4},
{nw=((217,146,144,0),20),gw=(213,9,128,2),ifc=((213,9,128,1),3),label=4},
{nw=((82,207,0,0),17),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=5},
{nw=((195,5,0,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=5},
{nw=((62,16,0,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=5},
{nw=((212,1,64,0),18),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=5},
{nw=((195,134,224,0),19),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=6},
{nw=((85,23,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=6},
{nw=((84,34,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=6},
{nw=((62,71,0,0),16),gw=(85,68,0,2),ifc=((85,68,0,1),4),label=6}
]
InterfaceNr2
INT
1`2
Buffer2
Buffer1
buffer
Buffer1
get2
@+18
sameNW(#ipdst a,#1 (#nw r) ,#2 (#nw r))
2
@+1
Intermed
@+1
(#label (#1 tr))=(#L1 entry) andalso (#2 tr)=(#ininterf entry)
Out2
@+1
(#2 buff)=k
a r
a
a
r
({label=(#label r),ipsrc=(#ipsrc a),ipdst=(#ipdst a),data=(#data a)},i)
tr
entry
r
i
({label=(#L2 entry),ipsrc=(#ipsrc (#1 tr)),ipdst=(#ipdst (#1 tr)),data=(#data (#1 tr))},#outinterf entry)
buff({ipsrc=(#ipsrc (#1 buff)),ipdst=(#ipdst (#1 buff)),data=(#data (#1 buff))})
k
Comparison of IP and MPLS
Bluetooth piconetworks
Air
rf
availmaster
pma1
addr
11 pma2
addr
21
pma3
addr
31
pma4
addr
41
pma5
addr
51
pma6
addr
61
pma7
addr
71
pma8
addr
81
M1
MasterMaster
Keyboard
slaveslave
Mouse
slaveslave Mobile
slaveslave
Printer
slaveslave
Kamera
slaveslave
Scaner
slaveslave
Printer 2
slaveslave
Mobile2
slaveslave
1 1`availmaster@0
1 1`11
1 1`21
1 1`31
1 1`41
1 1`51
1 1`611 1`71
1 1`81
Basic declarations
colset addr=INT;
colset ptype=INT;
colset pkt = record srcama:addr*dstama:addr*mtype:ptype*pma:addr;
colset rf=union r:pkt+availmaster+availslave timed;
colset lpkt=list pkt;
colset amatab=record ama:addr*pma:addr*t:INT;
colset lamatab=list amatab;
colset npkt=int with 10..20;
fun NSend()=npkt.ran();
colset clc=unit with c timed;
colset Interval=int with 500..1000;
fun Delay()=Interval.ran();
fun eqpma v (rr:amatab)=((#pma rr)=v);
fun eqt v (rr:amatab)=((#t rr)=v);
fun grec prd [] = zero | grec prd (y::z) = if prd(y) then y else grec prd z;
fun prec prd [] pm ti= [] | prec prd (y::z) pm ti=
if prd(y) then ({ama=(#ama y),pma=pm,t=ti}::z) else y::(prec prd z pm ti);
fun cT()=IntInf.toInt(!CPN'Time.model_time)
fun mint [] = (cT()) | mint ((y::z):lamatab) = Int.min((#t y),(mint z));
Master
outbuf
lpkt
[]
InBuf
pkt
AllocBuf
pkt
TabAMA
lamatab
[{ama=1,pma=0,t=0},
{ama=2,pma=0,t=0},
{ama=3,pma=0,t=0},
{ama=4,pma=0,t=0},
{ama=5,pma=0,t=0},
{ama=6,pma=0,t=0},
{ama=7,pma=0,t=0}]
Release
pkt
C1
INT
0
C2
INT
0
air
In/Out
rf
In/Out
Listen
@+2
#dstama p=0
t1
#mtype p=1
t2
#mtype p=2
t3
#mtype p=3
AllocAma
List.exists (eqpma 0) al
RlsAma
send
@+2
x=availmaster orelse
x=availslave
check
SwapAMA
not (List.exists (eqpma 0) al)
p
p
p
p
p p
al prec (eqpma 0) al (#pma p) (cT())
pl^^[{srcama=0,
dstama=(#ama (grec (eqpma 0) al)),
mtype=1, pma=(#pma p)}]
p p
al
prec (eqpma (#pma p)) al 0 (cT())
pl^^[{srcama=0, dstama=(#srcama p),
mtype=2, pma=(#pma p)}]
i i+1
i+1
i
pl
r(p)
pl
availmaster
p::pl
pl
x
r(p)
[]
availmaster
availslave
al
p
pl
pl^^[{srcama=0, dstama=(#ama (grec (eqt (mint al)) al)),
mtype=2, pma=(#pma (grec (eqt (mint al)) al))},
{srcama=0, dstama=(#ama (grec (eqt (mint al)) al)),
mtype=1, pma=(#pma p)}]
prec (eqt (mint al)) al (#pma p) (cT())
1 1`[]
1
1`[{ama=1,pma=0,t=0},{ama=2,pm
a=0,t=0},{ama=3,pma=0,t=0},{ama
=4,pma=0,t=0},{ama=5,pma=0,t=0}
,{ama=6,pma=0,t=0},{ama=7,pma=
0,t=0}]
1 1`0 1 1`0
1 1`availmaster@0
Slave
Air
In/Out
rf
In/Out
myAMA
addr
1`8
myPMA
In/Out
addr
In/Out
InBuf
pkt
outbufs
lpkt
[]
clock
clc
1`c@+Delay()
data
pkt
Listen
@+2
#dstama p=ama,
#mtype p=3
AlloAMA
@+2
pl<>nil
FreeAMA
@+2ama <> 8
SetAMA
@+2
#mtype p=1, #pma p=tpma,
#srcama p<>8
DelAMA
@+2
#mtype p=2,
#pma p=tpma,
#srcama p=0
SendData
inque
send
@+2
ama<>8
r(p)
ama
p
8
tpmar({srcama=8,
dstama=0,
mtype=1,
pma=tpma})
ama
r({srcama=ama,
dstama=0,
mtype=2,
pma=tpma})
r(p)
tpma
#dstama p
r(p)
tpma
8
tpma
cc
cc@+Delay()
NSend()`{srcama=0,dstama=0,
mtype=3,pma=tpma}
p
pl^^[p]pl
p::plpl
r({srcama=ama,dstama=0,
mtype=(#mtype p),pma=(#pma p)})
availslave
availmasteravailmaster
availslave
availslave
availmaster
ama
pl
[]
tpma
ama
1 1`availmaster@0
1 1`8
1 1`51
1
1`[]
1 1`c@823
Efficiency of address space sharing
Provider Backbone Bridge
Example PBB network
Main pageStatistics
i03
PBBseg
bavail
o03
PBBseg
bavail
i04
PBBseg
bavail
o04
PBBseg
bavail
i01
PBBseg
bavail
o01
PBBseg
bavail
i02
PBBseg
bavail
o02
PBBseg
bavail
i06
seg
avail
o06
seg
avail
io5
seg
avail
o05
seg
avail
i07
seg
avail
o07
seg
avail
i09
seg
avail
o09
seg
avail
i10
seg
avail
o10
seg
avail
i33
seg
avail
o33
seg
avail
i32
seg
avail
o32
seg
avail
i34
seg
avail
o34
seg
avail
i35
seg
avail
o35
seg
avail
i36
seg
avail
o36
seg
avail
i37
seg
avail
o37
seg
avail
i38
seg
avail
o38
seg
avail
i08
seg
avail
o08
seg
avail
o31
seg
avail
i31
seg
avail
i11
seg
avail
011
seg
avail
i12
seg
avail
o12
seg
avail
i13
seg
avail
o13
seg
avail
i14
seg
avail
o145
seg
avail
i15
seg
avail
o15
seg
avail
i16
seg
avail
o16
seg
avail
i17
seg
avail
o17
seg
avail
i18
seg
avail
o18
seg
avail
o19
seg
availi19
seg
avail
i20
seg
avail
o20
seg
avail
i21
seg
avail
o21
seg
avail
i22
seg
avail
o22
seg
avail
i23
seg
avail
o23
seg
avail
i24
seg
avail
o24
seg
avail
i25
seg
avail
o25
seg
avail
i41
seg
avail
o41
seg
avail
i42
seg
avail
o42
seg
avail
i43
seg
avail
o43
seg
avail
o44
seg
avail
i44
seg
avail
o45
seg
avail
i45
seg
avail
i46
seg
avail
o46
seg
avail
i48
seg
avail
o48
seg
avail
i49
seg
avail
o49
seg
avail
i50
seg
avail
o50
seg
avail
i51
seg
avail
o51
seg
avail
i52
seg
avail
o52
seg
avail
i53
seg
avail
o53
seg
avail
i54
seg
avail
o54
seg
avail
i55
seg
avail
o55
seg
avail
i56
seg
avail
o56
seg
avail
i57
seg
avail
o57
seg
avail
i58
seg
avail
o58
seg
avail
i59
seg
avail
o59
seg
avail
a31
mac
31
a32
mac
32
a33
mac
33
a34
mac
34
a35
mac
35
a36
mac
36
a41
mac
41
a42
mac
42
a43
mac
43
a44
mac
44
a45
mac
45
a46
mac
46
a47
mac
47
a48
mac
48
a49
mac
49
a4a
mac
50
a4b
mac
51
a4c
mac
52
a11
mac
11
a12
mac
12
a13
mac
13
a14
mac
14
a15
mac
15
a16 mac
16
a21
mac
21
a22
mac
22
a23
mac
23
a24
mac
24
a25
mac
25
a26
mac
26
a27
mac
27
a28
mac
28
a29
mac
29
a37
mac
37
a38
mac
38
i61
seg
avail
o61
seg
avail
o60
seg
avail
i60
seg
avail
a2a
mac
30
i26
seg
avail
o26
seg
avail
ab0
mac
80
ab3
mac
83
ab4
mac
84
ab2
mac
82
ab1
mac
81
SndFrmT
sfT
INT
0
sfT
RcvFrmT
rfT
INT
0
rfT
DrpFrmNw
dfN
INT
0
dfN
DrpFrmT
dfT
INT
0
dfT
PBB0
SWB4SWB4
PBB3
SWB1-2SWB1-2
PBB4
SWB1-2SWB1-2
PBB1
SWB1-2SWB1-2
PBB2
SWB1-2SWB1-2
SW11
SW4SW4
SW12
SW4SW4
SW21
SW4SW4
SW22
SW4SW4
SW23
SW4SW4
SW42
SW4SW4
SW41
SW4SW4
SW45
SW4SW4
SW43
SW4SW4
SW44
SW4SW4
SW31
SW4SW4 SW33
SW4SW4
SW24
SW4SW4
SW32
SW4SW4
c11
SS
c12
WSWS
c13
WSWS
c14
WSWS
c15
WSWS
c16
MWSMWS
c21
WSWS
c22
WSWS
c23
WSWS
c24
WSWS
c25
WSWS
c26
MWSMWS
c27
SS
c28
WSWS
c29
WSWS
c31
SS
c32
WSWS
c33
WSWS
c34
WSWS
c35
WSWS
c36
MWSMWS
c41
WSWS
c42
WSWS
c43
WSWS
c44
SS
c45
WSWS
c46
WSWS
c47
WSWS
c48
WSWS
c49
MWSMWS
c4a
SS
c4b
WSWS
c4c
WSWS
c37
SS
c38
SS
c2a
SS
Essential declarations
colset sfrm = product nfrm * INT;
colset frm = product mac * mac * nfrm timed;
colset PBBfrm = product mac * mac * mac * mac * nfrm timed;
colset seg = union f:frm + avail timed;
colset PBBseg = union b:PBBfrm + bavail timed;
colset swi = product mac * portnum;
colset swita=list swi;
colset PBBswi = product mac * mac * portnum;
colset PBBswita = list PBBswi;
colset qfrm = list frm;
colset xfrm = union cf:frm + bf:PBBfrm;
colset qxfrm = list xfrm;
colset pqxfrm = product portnum *qxfrm;
Recursive ML functions
fun eqa a (rr:swi)=((#1 rr)=a);
fun eqaB a (rr:PBBswi)=((#1 rr)=a);
fun eqbaB a (rr:PBBswi)=((#2 rr)=a);
fun grec prd [] = (0,0) |
grec prd (q::r) = if prd(q) then q else grec prd r;
fun xrec prd [] = [] |
xrec prd (q::r) = if prd(q) then r else q::(xrec prd r);
fun grecB prd [] = (0,0,0) |
grecB prd (q::r) = if prd(q) then q else grecB prd r;
fun xrecB prd [] = [] |
xrecB prd (q::r) = if prd(q) then r else q::(xrecB prd r);
Ethernet switch (dynamic table)
Timer
mact
InP1
In/Out
seg
In/Out
OutP1
In/Out
seg
In/Out
Buf1
pqfrm
1`(1,[])++
1`(2,[])++
1`(3,[])++
1`(4,[])
SwT1
swita
[]
qport1
INT
1`4
myport1
portnum
1`1
InP2
In/Out
seg
In/Out
OutP2
In/Out
seg
In/Out
myport2
portnum
1`2
InP3
In/Out
seg
In/Out
OutP3
In/Out
seg
In/Out
InP4
In/Out
seg
In/Out
OutP4
In/Out
seg
In/Out
myport4
portnum
1`4
myport3
portnum
1`3
ClrSwTa
[List.exists (eqa target) x]
Port1
portport
Port2
portport
Port3
portport
Port4
portport
targetx
xrec (eqa target) x
Ethernet switch port
SwTa
In/Out
swita
In/Out
PortIn
In/Out
seg
In/Out
Aux1
frm
Buf
In/Out
pqfrm
In/Out
PortOut
In/Out
seg
In/Out
qports
In/Out
INT
In/Out
myport
In/Out
portnum
In/Out
Aux2
frm
fnum
INT
timer
Out
mact
Out
NewSrc
[not (List.exists (eqa src) x)]
OldSrc
[List.exists (eqa src) x]
NewDst
[not (List.exists (eqa dst) x)]
OldDst
[List.exists (eqa dst) x,
i=(#2 (grec (eqa dst) x))]
Out
@+1
BroadC
[i<=q]
clean
[i>q]
x
(src,m)::x
f(src,dst,nf)
f(src,dst,nf)
(src,dst,nf)
(src,dst,nf)
(src,dst,nf)
x
(src,dst,nf)
if i<>m then
1`(i,qu^^[(src,dst,nf)])
else 1`(i,qu)
f(src,dst,nf)
avail
(src,dst,nf)
1
(src,dst,nf)
i
if i<>m then
1`(i,qu^^[(src,dst,nf)])
else 1`(i,qu)
i+1
q
m
(src,dst,nf)
i
q
(m,(src,dst,nf)::qu)
x x
avail
avail
m
m
src@+TCL
(m,qu)
(i,qu) (i,qu)
m
PBB-port
SwTa
In/Out
swita
In/Out
PBBIn
In/Out
PBBseg
In/Out
Aux1
PBBfrm
Buf
In/Out
pqxfrm
In/Out
PBBOut
In/Out
PBBseg
In/Out
qports
In/Out
portq
In/Out
myport
In/Out
portnum
In/Out
Aux3
PBBfrm
fnum
INT
timer
Out
mact
Out
Aux2
PBBfrm
mymac
In/Out
mac
In/Out
dfPBB
dfN INT
0
dfN
NewSrc
[not (List.exists (eqa bsrc) x)]
OldSrc
[List.exists (eqa bsrc) x]
NewDst
[bdst=BC orelse
(not (List.exists (eqa bdst) x))]
OldDst
[bdst<>BC,
List.exists (eqa bdst) x,
i=(#2 (grec (eqa bdst) x))]
Out
@+1
BroadC
[i<=q]
clean
[i>q]
NotMYbdst
[bdst<>mm]
MYbdst
[bdst=mm]
x
(bsrc,m)::x
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
x
if i<>m
then 1`(i,qx^^[bf(bsrc,bdst,src,dst,nf)])
else 1`(i,qx)
b(bsrc,bdst,src,dst,nf)
bavail
(bsrc,bdst,
src,dst,nf)
1
(bsrc,bdst,
src,dst,nf)
i
if i<>m then
1`(i,qx^^[bf(bsrc,bdst,src,dst,nf)])
else 1`(i,qx)
i+1
q
m
(bsrc,bdst,
src,dst,nf)
i q
(m,bf(bsrc,bdst,src,dst,nf)::qx)
x
x
bavail
bavail
m
m
bsrc@+TCL
(bsrc,bdst,
src,dst,nf)
mm
mm
i
i+1
(i,qx)
(i,qx)
(m,qx)
b(bsrc,bdst,
src,dst,nf)
b(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
m
C-port
SwTa
In/Out
PBBswita
In/Out
PortIn
In/Out
seg
In/Out
Aux1
frm
Buf
In/Out pqxfrmIn/Out
PortOut
In/Out
seg
In/Out
qports
In/Out
portq
In/Out
myport
In/Out
portnum
In/Out
Aux2
frm
fnum
INT
mymac
In/Out
mac
1`21
In/Out
nPBBp
In/Out
PBBportq
In/Out
timer
Out
mact
Out
NewSrc
[not (List.exists (eqaB src) y)]
OldSrc
[List.exists (eqaB src) y]
NewDst
[not (List.exists (eqaB dst) y)]
OldDstMy
[(List.exists (eqaB dst) y),
(#2 (grecB (eqaB dst) y)=mm),
i=(#3 (grecB (eqaB dst) y))]
Out
@+1
BroadC
[i<=q]
clean
[i>q]
OldDstNotMy
[(List.exists (eqaB dst) y),
(#2 (grecB (eqaB dst) y)<>mm),
i=(#3 (grecB (eqaB dst) y))]
y
(src,mm,m)::y
f(src,dst,nf)
f(src,dst,nf)
(src,dst,nf)
(src,dst,nf)
(src,dst,nf) y
(src,dst,nf)
if i<>m
then 1`(i,qx^^[cf(src,dst,nf)])
else 1`(i,qx)
f(src,dst,nf)
avail
(src,dst,nf)
1
(src,dst,nf)
i
if i<>m then
if i<pbp then 1`(i,qx^^[cf(src,dst,nf)])
else 1`(i,qx^^[bf(mm,BC,src,dst,nf)])
else 1`(i,qx)
i+1
q
m
(src,dst,nf)
i
q
(m,cf(src,dst,nf)::qx)
y
y
avail
m
m
mm mm
(src,dst,nf)
y
mm
avail
if i<>m
then 1`(i,qx^^[bf(mm,#2 (grecB (eqaB dst) y),src,dst,nf)])
else 1`(i,qx)
pbp
mm
avail
src@+TCL
(m,qx)
(i,qx)(i,qx)
(i,qx)
m
m
B-port
PortBIn
In/Out
PBBseg
In/Out
SwTa
In/Out
PBBswita
In/Out
Aux1
PBBfrm
Buf
In/Out
pqxfrm
In/Out
PortOut
In/Out
PBBseg
In/Out
qports
In/Out
portq
In/Out
myport
In/Out
portnum
In/Out
fnum
INT
mymac
In/Out
mac
1`21
In/Out
nPBBp
In/Out
PBBportq
In/Out
timer
Out
mact
Out
Aux2
PBBfrm
Aux3
PBBfrm
Aux4
PBBfrm
BCcport
BOOL
BCbport
BOOL
dfcp
dfN
INT
0
dfN
NewSrc
[not (List.exists (eqaB src) y)]
OldSrc
[List.exists (eqaB src) y]
Out
@+1
BroadC[i<=q]
clean
[i>q]
bdstMY
[bdst=mm]
bdstNotMY
[bdst<>mm,bdst<>BC]
bdstBC
[bdst=BC]
bdstNew
[not (List.exists (eqbaB bdst) y)]
bdstOld
[(List.exists (eqbaB bdst) y),
(#2 (grecB (eqaB dst) y)=bdst),
i=(#3 (grecB (eqbaB bdst) y))]
dstNew
[not (List.exists (eqaB dst) y)]
DstOld
[(List.exists (eqaB dst) y),
(#2 (grecB (eqaB dst) y)=mm),
i=(#3 (grecB (eqaB dst) y))]
wrong
[(List.exists (eqaB dst) y),
(#2 (grecB (eqaB dst) y)<>mm)]
y
(src,bsrc,m)::y
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
b(bsrc,bdst,src,dst,nf)
bavail
i
if i<>m then
if (i<pbp) andalso BCc then 1`(i,qx^^[cf(src,dst,nf)]) else
if (i>=pbp) andalso BCb then 1`(i,qx^^[bf(bdst,bsrc,src,dst,nf)])
else 1`(i,qx)
else 1`(i,qx)
i+1
q
m
i
q
(m,bf(bsrc,bdst,src,dst,nf)::qx)
y
m
m
pbp
bavail
src@+TCL
b(bsrc,bdst,
src,dst,nf)
b(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,src,dst,nf)
(bsrc,bdst,
src,dst,nf)
if i<>m
then 1`(i,qx^^[cf(src,dst,nf)])
else 1`(i,qx)
if i<>m then
1`(i,qx^^[bf(bdst,bsrc,src,dst,nf)])
else 1`(i,qx)
true
false
true
true
false
true
(bsrc,bdst,
src,dst,nf)
(bsrc,bdst,
src,dst,nf)
1
(bsrc,bdst,
src,dst,nf)
BCc
BCb
(bsrc,bdst,
src,dst,nf)
BCc
BCb
mm
y
y
y
y m
(bsrc,bdst,
src,dst,nf)
mm
mm
y
mm
bavail bavail
1 1
bavail
ii+1
(m,qx)
(i,qx)
(i,qx) (i,qx)
m
Dynamics of broadcasting and QoS
Influence of the record ageing time
Conclusions
• Colored Petri net is a convenient and flexible
tool for modeling networks
• Build State Space for protocols verification
• Simulate on prolonged time intervals for
performance evaluation
• Flexibility and vivid graphical representation
• Suitable for developing new networking
technology
http://member.acm.org/~daze
Next step – parametric models
• A model for a technology
• A network topology as a parameter
• A tag to represent connection with
topology
• The same structure for any given
network
• Fast evaluation without redrawing model
Additional reading
• D. A. Zaitsev , T. R. Shmeleva, W. Retschitzegger, B. Pröll Security of grid structures
under disguised traffic attacks, Cluster Computing, 19(3) 2016, 1183–1200.
• Zaitsev D.A., Shmeleva T.R. A Parametric Colored Petri Net Model of a Switched
Network, Int. J. Communications, Network and System Sciences, 2011, 4, 65-76.
• Vorobiyenko P.P., Guliaiev K.D., Zaitsev D.A., Shmeleva T.R. PBB Efficiency Evaluation
via Colored Petri Net Models, Communications and Network, 2010, 2, 113-124.
• Zaitsev D.A., Shmeleva T.R. Parametric Petri Net Model for Ethernet Performance and
Qos Evaluation. Proc. of 16th Workshop on Algorithms and Tools for Petri Nets,
September 25-26, 2009, University of Karlsruhe, Germany, p. 15-28.
• Bereznyuk M.V., Gupta K.K., Zaitsev D.A. Effectiveness of Bluetooth Address Space
Usage. Proceedings of 20th International Conference, Software & Systems
Engineering and their Applications (ICSSEA 2007), Paris 4-6 December 2007.
• Zaitsev D.A., Sakun A.L. An Evaluation of MPLS Efficacy using Colored Petri Net
Models. Proc. of of International Middle Eastern Multiconference on Simulation and
Modelling (MESM'2008), Amman (Jordan), August 26-28, 2008, p. 31-36.
• Zaitsev D.A. Switched LAN simulation by colored Petri nets, Mathematics and
Computers in Simulation, Volume 65, Issue 3, 22 April 2004, 245–249.

More Related Content

PDF
ESL Anyone?
PPT
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
PPTX
CILK/CILK++ and Reducers
PPT
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
PDF
Fairplay Talk
PPT
ANPR based Security System Using ALR
PDF
VSSML16 L5. Basic Data Transformations
PDF
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14
ESL Anyone?
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
CILK/CILK++ and Reducers
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Fairplay Talk
ANPR based Security System Using ALR
VSSML16 L5. Basic Data Transformations
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14

Similar to Modeling computer networks by colored Petri nets (20)

PDF
String Comparison Surprises: Did Postgres lose my data?
PDF
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
PDF
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
PDF
JAWS DAYS 2018
PDF
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
DOCX
Lab 2Lab ObjectivesThe objective for this lab is to review.docx
PDF
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
PDF
Inside Winnyp
PDF
Move from C to Go
PPTX
Java on arm theory, applications, and workloads [dev5048]
PPTX
Week1 Electronic System-level ESL Design and SystemC Begin
PPT
nodebots presentation @seekjobs
PDF
presentation
PDF
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
PPTX
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
PDF
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
PPTX
Scale17x - Latency SLOs Done Right
PDF
MeetBSD2014 Performance Analysis
PDF
不深不淺,帶你認識 LLVM (Found LLVM in your life)
PDF
Beyond Breakpoints: A Tour of Dynamic Analysis
String Comparison Surprises: Did Postgres lose my data?
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
JAWS DAYS 2018
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
Lab 2Lab ObjectivesThe objective for this lab is to review.docx
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
Inside Winnyp
Move from C to Go
Java on arm theory, applications, and workloads [dev5048]
Week1 Electronic System-level ESL Design and SystemC Begin
nodebots presentation @seekjobs
presentation
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
Scale17x - Latency SLOs Done Right
MeetBSD2014 Performance Analysis
不深不淺,帶你認識 LLVM (Found LLVM in your life)
Beyond Breakpoints: A Tour of Dynamic Analysis
Ad

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Cell Types and Its function , kingdom of life
PDF
Trump Administration's workforce development strategy
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Module 4: Burden of Disease Tutorial Slides S2 2025
Cell Types and Its function , kingdom of life
Trump Administration's workforce development strategy
Final Presentation General Medicine 03-08-2024.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Weekly quiz Compilation Jan -July 25.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
History, Philosophy and sociology of education (1).pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
What if we spent less time fighting change, and more time building what’s rig...
Yogi Goddess Pres Conference Studio Updates
A systematic review of self-coping strategies used by university students to ...
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
RMMM.pdf make it easy to upload and study
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Ad

Modeling computer networks by colored Petri nets