Professional Documents
Culture Documents
Generation
Hongyi Zeng , Peyman Kazemian , Nick McKeown
University, Stanford, CA, USA
George Varghese
UCSD, La Jolla
Microsoft Research, Mountain View, CA, USA
https://github.com/eastzone/atpg/wiki
FIBs , topology
Header Space
Analyses
Equivalent
classes &
packets
Goal :
generate a set of test packets to exercise every rule.
DB
All pairs
reachability
T
function
parser
Test terminals
10
11
0
A
0
1
2 0
C
1
Header
dst_ip = 10.0/16, tcp = 80
12
dst_ip = 10.2/16
Ingress Port
Egress Port
Rule History
2Header
dst_ip = 10.0/16, A
tcp = 80
dst_ip = 10.2/16
dst_ip = 10.2/16
Ingress Port
1
2 0
dst_ip = 10.1/16
dst_ip = 10.2/16
dst_ip = 10.2/16, tcp = 80
dst_ip = 10.1/16
13
2 Port
Egress
C
1
0 History
Rule
Sampling
Pick at least one packet from every equivalent class.
You can peak randomly or peak all the headers from
a certain class to check a fault for a specific header.
Header
dst_ip = 10.0/16, tcp = 80
dst_ip = 10.2/16
dst_ip = 10.2/16
dst_ip = 10.1/16
dst_ip = 10.2/16
dst_ip = 10.2/16, tcp = 80
14
dst_ip = 10.1/16
Ingress Port
Egress Port
Rule History
Compression
Using the Min-Set Cover algorithm.
The remaining test packet will be use later for fault
localization.
Header
dst_ip = 10.1/16
Ingress Port
Egress Port
Rule History
Fault Localization
Success and failure depend on the nature of the rule
forwarding / drop.
Divide the fault in two categories:
Action fault - effect all the packets matching the rule.
Match fault - effect some of the packets matching the rule.
16
Fault Localization
Find the set of suspect rules
P is the set of all the rules traversed by success test packets.
F is the set of all the rules traversed by failing test packets.
F - P is the set of suspect rules.
P F
Ingress Port
Egress Port
Rule History
dst_ip = 10.2/16suspect
dst_ip = 10.2/16 rules
17
Result
pass
Minimize
the suspect
rules set
Report the
set
fail
fail
False positive
There is a possibly for false positive ,
Rule that are left as suspect although it behave
correctly.
18
Test packet
generator
Test Pkt
Fault
Localization
DB
All pairs
reachability
T
function
parser
Link rule :
if packet passing the link without header modification.
Drop rule
C Fwd
A Broadcast
A drop
HeaderC C A
Header
R3
C
R1
R2
HeaderB B A
Header
R4
B
B Fwd
21
Implementation
ATPG written in python.
The data plane information Collected and parsed (Cisco IOS) .
The generator use Hassel header space analysis library to construct
T functions.
All pairs reachability is computed using multiprocess parallel
processing
After Min set cover executes the output stored in SQLite database.
The process uses JSON to communicate with the test agents.
22
23
Forwarding
Error
24
Congestion
Available
Bandwidth
Priority
25
Forwarding Error
bbra
s1
goza
26
s2
coza
s5
s4
poza
boza
Forwarding Error
bbra
s1
goza
27
s2
coza
s5
s4
poza
boza
Congestion
bbra
s1
pozb
28
s2
poza
yoza
roza
bbra
s1
poza
pozb
29
s2
yoza
roza
Ingress Port
Egress Port
Rule History
poza
yoza
Poza-s1,s1-bbra,bbra-yoza
roza
yoza
Roza-s2,s2-bbra,bbra-yoza
pzob
yoza
Pozb-s1,s1-bbra,bbra-yoza
pzob
roza
Pozb-s1,s1-bbra,bbra-roza
30
31
Evaluation
Evaluated the system on Stanford backbone.
700000
4500
600000
4000
500000
3500
3000
400000
2500
300000
Packets
Test Packets
2000
comp time
1500
200000
1000
100000
500
0
-100000
20
40
60
80
100
120
0
-500 0
20
40
60
80
100
120
testing all rules 10 times per second needs < 1% of link overhead.
32
Limitation
33
Dynamic , Non
deterministic
boxes
Sampling time
Invisible rule
Conclusion
ATPG tests liveness and performance.
< 1% of link overhead.
Works in real networks.
Questions?
34