-
Notifications
You must be signed in to change notification settings - Fork 1
/
flowtable.py
97 lines (95 loc) · 2.04 KB
/
flowtable.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
flow1 = {
"priority": 10,
"timeout": 0,
"tableId": 1,
"isPermanent": true,
"deviceId": "of:0000687f7429badf",
"treatment": {
"instructions": [
{
"type": "OUTPUT",
"port": "2"
}
]
},
"selector": {
"criteria": [
{
"type": "IN_PORT",
"port": 1
},
{
"type": "ETH_SRC",
"mac": "84:38:35:61:16:62"
},
{
"type": "ETH_DST",
"mac": "60:E3:27:9B:44:BF"
}
]
}
}
flow2 = {
"priority": 10,
"timeout": 0,
"isPermanent": true,
"deviceId": "of:0000687f7429badf",
"treatment": {
"instructions": [
{
"type": "OUTPUT",
"port": "1"
}
]
},
"selector": {
"criteria": [
{
"type": "IN_PORT",
"port": 2
},
{
"type": "ETH_SRC",
"mac": "60:E3:27:9B:44:BF"
},
{
"type": "ETH_DST",
"mac": "84:38:35:61:16:62"
}
]
}
}
flow3 = {
"priority": 10,
"timeout": 0,
"isPermanent": true,
"deviceId": "of:0000687f7429badf",
"treatment": {
"instructions": [
{
"type": "TABLE",
"tableId": 1
}
]
},
"selector": {
"criteria": [
{
"type": "IN_PORT",
"port": 1
},
{
"type": "IPV4_SRC",
"ip": "192.168.86.51/24"
},
{
"type": "IPV4_DST",
"ip": "128.59.105.24/24"
},
{
"type": "ETH_TYPE",
"ethType": "0x0800"
}
]
}
}