3 AT_SETUP([tunnel - input])
4 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
5 options:remote_ip=1.1.1.1 ofport_request=1\
6 -- add-port br0 p2 -- set Interface p2 type=gre \
7 options:local_ip=2.2.2.2 options:remote_ip=1.1.1.1 \
9 -- add-port br0 p3 -- set Interface p3 type=gre \
10 options:remote_ip=2.2.2.2 ofport_request=3])
11 AT_DATA([flows.txt], [dnl
15 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
17 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
18 br0 (dummy@ovs-dummy):
19 lookups: hit:0 missed:0
20 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
21 overall avg: add rate: 0.000/min, del rate: 0.000/min
22 br0 65534/100: (dummy)
23 p1 1/1: (gre: remote_ip=1.1.1.1)
24 p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
25 p3 3/1: (gre: remote_ip=2.2.2.2)
29 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=1.2.3.4,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
30 AT_CHECK([tail -1 stdout], [0],
31 [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
34 dnl local_ip, remote_ip
35 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
36 AT_CHECK([tail -1 stdout], [0],
37 [Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
40 dnl reconfigure, local_ip, remote_ip
41 AT_CHECK([ovs-vsctl set Interface p2 type=gre options:local_ip=2.2.2.3 \
42 options:df_default=false options:ttl=1 options:csum=true \
43 -- set Interface p3 type=gre64])
44 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
45 br0 (dummy@ovs-dummy):
46 lookups: hit:0 missed:0
47 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
48 overall avg: add rate: 0.000/min, del rate: 0.000/min
49 br0 65534/100: (dummy)
50 p1 1/1: (gre: remote_ip=1.1.1.1)
51 p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
52 p3 3/64: (gre64: remote_ip=2.2.2.2)
54 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
55 AT_CHECK([tail -1 stdout], [0],
56 [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
58 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.3,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
59 AT_CHECK([tail -1 stdout], [0],
60 [Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.3,dst=1.1.1.1,tos=0x0,ttl=1,flags(csum))),1
63 dnl nonexistent tunnel
64 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=5.5.5.5,dst=6.6.6.6,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
66 ovs-appctl: ovs-vswitchd: server returned an error
69 OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
72 AT_SETUP([tunnel - ECN decapsulation])
73 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
74 options:remote_ip=1.1.1.1 ofport_request=1 \
75 -- add-port br0 p2 -- set Interface p2 type=dummy \
77 AT_DATA([flows.txt], [dnl
81 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
83 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
84 br0 (dummy@ovs-dummy):
85 lookups: hit:0 missed:0
86 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
87 overall avg: add rate: 0.000/min, del rate: 0.000/min
88 br0 65534/100: (dummy)
89 p1 1/1: (gre: remote_ip=1.1.1.1)
93 dnl Tunnel CE and encapsulated packet CE
94 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=3,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
95 AT_CHECK([tail -1 stdout], [0],
99 dnl Tunnel CE and encapsulated packet ECT(1)
100 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
101 AT_CHECK([tail -1 stdout], [0],
102 [Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0x3,ttl=64,frag=no)),2
105 dnl Tunnel CE and encapsulated packet ECT(2)
106 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=2,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
107 AT_CHECK([tail -1 stdout], [0],
108 [Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0x3,ttl=64,frag=no)),2
111 dnl Tunnel CE and encapsulated packet Non-ECT
112 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
113 AT_CHECK([tail -1 stdout], [0],
114 [Datapath actions: drop
116 OVS_VSWITCHD_STOP(["/dropping tunnel packet marked ECN CE but is not ECN capable/d"])
119 AT_SETUP([tunnel - output])
120 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
121 options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
122 options:key=5 ofport_request=1\
123 -- add-port br0 p2 -- set Interface p2 type=dummy \
124 ofport_request=2 ofport_request=2])
125 AT_DATA([flows.txt], [dnl
129 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
131 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
132 br0 (dummy@ovs-dummy):
133 lookups: hit:0 missed:0
134 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
135 overall avg: add rate: 0.000/min, del rate: 0.000/min
136 br0 65534/100: (dummy)
137 p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
142 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
143 AT_CHECK([tail -1 stdout], [0],
144 [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
148 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
149 AT_CHECK([tail -1 stdout], [0],
150 [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df,key))),1
155 AT_SETUP([tunnel - ToS and TTL inheritance])
156 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
157 options:remote_ip=1.1.1.1 options:tos=inherit \
158 options:ttl=inherit ofport_request=1 \
159 -- add-port br0 p2 -- set Interface p2 type=dummy \
160 ofport_request=2 ofport_request=2])
161 AT_DATA([flows.txt], [dnl
165 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
167 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
168 br0 (dummy@ovs-dummy):
169 lookups: hit:0 missed:0
170 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
171 overall avg: add rate: 0.000/min, del rate: 0.000/min
172 br0 65534/100: (dummy)
173 p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
178 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
179 AT_CHECK([tail -1 stdout], [0],
180 [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x4,ttl=128,flags(df))),1
184 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=5,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
185 AT_CHECK([tail -1 stdout], [0],
186 [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x5,ttl=128,flags(df))),1
190 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)'], [0], [stdout])
191 AT_CHECK([tail -1 stdout], [0],
192 [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
197 AT_SETUP([tunnel - set_tunnel])
198 OVS_VSWITCHD_START([dnl
199 add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
200 options:remote_ip=1.1.1.1 ofport_request=1 \
201 -- add-port br0 p2 -- set Interface p2 type=gre options:key=flow \
202 options:remote_ip=2.2.2.2 ofport_request=2 \
203 -- add-port br0 p3 -- set Interface p3 type=gre options:key=flow \
204 options:remote_ip=3.3.3.3 ofport_request=3 \
205 -- add-port br0 p4 -- set Interface p4 type=gre options:key=flow \
206 options:remote_ip=4.4.4.4 ofport_request=4])
207 AT_DATA([flows.txt], [dnl
208 actions=set_tunnel:1,output:1,set_tunnel:2,output:2,set_tunnel:3,output:3,set_tunnel:5,output:4
211 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
213 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
214 br0 (dummy@ovs-dummy):
215 lookups: hit:0 missed:0
216 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
217 overall avg: add rate: 0.000/min, del rate: 0.000/min
218 br0 65534/100: (dummy)
219 p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
220 p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
221 p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
222 p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
225 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
226 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
227 set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
228 set(tunnel(tun_id=0x2,src=0.0.0.0,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,key))),1,dnl
229 set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,dnl
230 set(tunnel(tun_id=0x5,src=0.0.0.0,dst=4.4.4.4,tos=0x0,ttl=64,flags(df,key))),1
235 AT_SETUP([tunnel - key])
236 OVS_VSWITCHD_START([dnl
237 add-port br0 p1 -- set Interface p1 type=gre options:key=1 \
238 options:remote_ip=1.1.1.1 ofport_request=1 \
239 -- add-port br0 p2 -- set Interface p2 type=gre options:in_key=2 \
240 options:out_key=3 options:remote_ip=1.1.1.1 ofport_request=2 \
241 -- add-port br0 p3 -- set Interface p3 type=gre options:out_key=5 \
242 options:remote_ip=1.1.1.1 ofport_request=3])
243 AT_DATA([flows.txt], [dnl
244 actions=IN_PORT,output:1,output:2,output:3
247 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
249 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
250 br0 (dummy@ovs-dummy):
251 lookups: hit:0 missed:0
252 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
253 overall avg: add rate: 0.000/min, del rate: 0.000/min
254 br0 65534/100: (dummy)
255 p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
256 p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
257 p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
260 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
261 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
262 set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
263 set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
264 set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
267 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
268 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
269 set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
270 set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
271 set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
274 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
275 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
276 set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
277 set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
278 set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
281 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
283 ovs-appctl: ovs-vswitchd: server returned an error
285 OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
288 AT_SETUP([tunnel - key match])
289 OVS_VSWITCHD_START([dnl
290 add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
291 options:remote_ip=1.1.1.1 ofport_request=1 \
292 -- add-port br0 p2 -- set Interface p2 type=gre options:key=3 \
293 options:remote_ip=3.3.3.3 ofport_request=2 \
294 -- add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3 \
295 -- add-port br0 p4 -- set Interface p4 type=dummy ofport_request=4 \
296 -- add-port br0 p5 -- set Interface p5 type=dummy ofport_request=5])
297 AT_DATA([flows.txt], [dnl
298 tun_id=2,actions=output:3
299 tun_id=3,actions=output:4,set_tunnel:2,resubmit:99,set_tunnel:4,output:2,resubmit:99
300 tun_id=4,actions=output:5
303 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
305 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
306 br0 (dummy@ovs-dummy):
307 lookups: hit:0 missed:0
308 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
309 overall avg: add rate: 0.000/min, del rate: 0.000/min
310 br0 65534/100: (dummy)
311 p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
312 p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
318 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
319 AT_CHECK([tail -1 stdout], [0], [dnl
323 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
324 AT_CHECK([tail -1 stdout], [0], [dnl
325 Datapath actions: 4,3,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,5
328 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
329 AT_CHECK([tail -1 stdout], [0], [dnl
330 Datapath actions: 4,3,5
333 AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
334 AT_CHECK([tail -1 stdout], [0], [dnl
335 - Sends "packet-in" messages to the OpenFlow controller.
341 AT_SETUP([tunnel - VXLAN])
342 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
343 options:remote_ip=1.1.1.1 ofport_request=1])
345 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
346 br0 (dummy@ovs-dummy):
347 lookups: hit:0 missed:0
348 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
349 overall avg: add rate: 0.000/min, del rate: 0.000/min
350 br0 65534/100: (dummy)
351 p1 1/1: (vxlan: remote_ip=1.1.1.1)
357 AT_SETUP([tunnel - LISP])
358 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=lisp \
359 options:remote_ip=1.1.1.1 ofport_request=1])
361 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
362 br0 (dummy@ovs-dummy):
363 lookups: hit:0 missed:0
364 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
365 overall avg: add rate: 0.000/min, del rate: 0.000/min
366 br0 65534/100: (dummy)
367 p1 1/1: (lisp: remote_ip=1.1.1.1)
373 AT_SETUP([tunnel - different VXLAN UDP port])
374 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
375 options:remote_ip=1.1.1.1 ofport_request=1 options:dst_port=4341])
377 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
378 br0 (dummy@ovs-dummy):
379 lookups: hit:0 missed:0
380 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
381 overall avg: add rate: 0.000/min, del rate: 0.000/min
382 br0 65534/100: (dummy)
383 p1 1/1: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
388 AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=5000])
390 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
391 br0 (dummy@ovs-dummy):
392 lookups: hit:0 missed:0
393 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
394 overall avg: add rate: 0.000/min, del rate: 0.000/min
395 br0 65534/100: (dummy)
396 p1 1/2: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
399 dnl change UDP port to default
401 AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=4789])
403 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
404 br0 (dummy@ovs-dummy):
405 lookups: hit:0 missed:0
406 flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
407 overall avg: add rate: 0.000/min, del rate: 0.000/min
408 br0 65534/100: (dummy)
409 p1 1/1: (vxlan: remote_ip=1.1.1.1)