forked from opiproject/opi-evpn-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
469 lines (437 loc) · 23.5 KB
/
docker-compose.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.
---
version: '3.7'
services:
spine1:
image: quay.io/frrouting/frr:8.5.3
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/spine1.conf:/etc/frr/frr.conf
networks:
n1l1tos1:
ipv4_address: 10.168.1.6
n0l2tos1:
ipv4_address: 10.168.2.6
btos1:
ipv4_address: 10.168.3.6
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.1 netmask 255.255.255.255 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
leaf1:
image: quay.io/frrouting/frr:8.5.3
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/leaf1.conf:/etc/frr/frr.conf
ports:
- "16686:16686"
- "50151:50151"
- "8082:8082"
networks:
n1l1tos1:
ipv4_address: 10.168.1.5
n2htoleaf1:
n6h1tol1y:
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.2 netmask 255.255.255.255 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
bleaf:
image: quay.io/frrouting/frr:8.5.3
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/bleaf.conf:/etc/frr/frr.conf
networks:
btos1:
ipv4_address: 10.168.3.5
internet1:
ipv4_address: 6.6.6.6
internet2:
ipv4_address: 7.7.7.7
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.3 netmask 255.255.255.255 up && \
ip link add green type vrf table 1001 && \
ip link set green up && \
ip link set eth1 master green && \
ip link add yellow type vrf table 1002 && \
ip link set yellow up && \
ip link set eth2 master yellow && \
ip link add br100 type bridge && \
ip link set br100 master green addrgenmode none && \
ip link set br100 addr aa:bb:cc:00:00:44 && \
ip link add vni100 type vxlan local 10.0.0.3 dstport 4789 id 100 nolearning && \
ip link set vni100 master br100 addrgenmode none && \
ip link set vni100 type bridge_slave neigh_suppress on learning off && \
ip link set vni100 up && \
ip link set br100 up && \
ip link add br101 type bridge && \
ip link set br101 master yellow addrgenmode none && \
ip link set br101 addr aa:bb:cc:00:00:55 && \
ip link add vni101 type vxlan local 10.0.0.3 dstport 4789 id 101 nolearning && \
ip link set vni101 master br101 addrgenmode none && \
ip link set vni101 type bridge_slave neigh_suppress on learning off && \
ip link set vni101 up && \
ip link set br101 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
leaf2:
image: quay.io/frrouting/frr:8.5.3
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/leaf2.conf:/etc/frr/frr.conf
networks:
n0l2tos1:
ipv4_address: 10.168.2.5
n2htoleaf2:
n4htoleafbn2:
n7htoleafbn2:
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.4 netmask 255.255.255.255 up && \
ip link add blue type vrf table 1000 && \
ip link set blue up && \
ip link add green type vrf table 1001 && \
ip link set green up && \
ip link add br10 type bridge && \
ip link set br10 addr aa:bb:cc:00:00:22 && \
ip link add link eth1 name eth1.10 type vlan id 10 && \
ip link set eth1 up && ip addr flush dev eth1 && \
ip link set eth1.10 up && \
ip link set eth1.10 master br10 addrgenmode none && \
ip link add vni10 type vxlan local 10.0.0.4 dstport 4789 id 10 nolearning && \
ip link set vni10 master br10 addrgenmode none && \
ip link set vni10 type bridge_slave neigh_suppress on learning off && \
ip link set vni10 up && \
ip link set br10 up && \
ip link add br20 type bridge && \
ip link set br20 master blue addrgenmode none && \
ip link set br20 addr aa:bb:cc:00:00:23 && \
ip addr add 20.20.20.1/24 dev br20 && \
ip link add vni20 type vxlan local 10.0.0.4 dstport 4789 id 20 nolearning && \
ip link set vni20 master br20 addrgenmode none && \
ip link set vni20 type bridge_slave neigh_suppress on learning off && \
ip link set vni20 up && \
ip link set br20 up && \
ip link add br30 type bridge && \
ip link set br30 master blue addrgenmode none && \
ip link set eth2 up && ip addr flush dev eth2 && \
ip link add link eth2 name eth2.30 type vlan id 30 && \
ip link set eth2.30 up && \
ip link set eth2.30 master br30 addrgenmode none && \
ip link set br30 addr aa:bb:cc:00:00:24 && \
ip addr add 30.30.30.1/24 dev br30 && \
ip link add vni30 type vxlan local 10.0.0.4 dstport 4789 id 30 nolearning && \
ip link set vni30 master br30 addrgenmode none && \
ip link set vni30 type bridge_slave neigh_suppress on learning off && \
ip link set vni30 up && \
ip link set br30 up && \
ip link add br40 type bridge && \
ip link set br40 master green addrgenmode none && \
ip link set eth3 up && ip addr flush dev eth3 && \
ip link add link eth3 name eth3.40 type vlan id 40 && \
ip link set eth3.40 up && \
ip link set eth3.40 master br40 addrgenmode none && \
ip link set br40 addr aa:bb:cc:00:00:25 && \
ip addr add 40.40.40.1/24 dev br40 && \
ip link add vni40 type vxlan local 10.0.0.4 dstport 4789 id 40 nolearning && \
ip link set vni40 master br40 addrgenmode none && \
ip link set vni40 type bridge_slave neigh_suppress on learning off && \
ip link set vni40 up && \
ip link set br40 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
opi-evpn-bridge:
build:
context: .
cap_add:
- NET_ADMIN
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
depends_on:
- leaf1
- redis
- jaeger
network_mode: service:leaf1
command: /opi-evpn-bridge -grpc_port=50151 -http_port=8082
healthcheck:
test: grpcurl -plaintext localhost:50151 list || exit 1
jaeger:
image: jaegertracing/all-in-one:1.50.0
environment:
- COLLECTOR_OTLP_ENABLED=true
network_mode: service:leaf1
redis:
image: redis:7.2.1-alpine3.18
network_mode: service:leaf1
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
opi-gw-test:
image: curlimages/curl:8.4.0
network_mode: service:leaf1
depends_on:
opi-evpn-bridge:
condition: service_healthy
command: curl -qkL http://localhost:8082/v1/inventory/1/inventory/2
opi-jaeger-test:
image: curlimages/curl:8.4.0
network_mode: service:leaf1
depends_on:
- testgrpc
command: sh -c 'curl -s "http://localhost:16686/api/traces?service=opi-evpn-bridge&lookback=20m&prettyPrint=true&limit=10" | grep operationName'
testgrpc:
image: docker.io/namely/grpc-cli
cap_add:
- NET_ADMIN
network_mode: service:leaf1
depends_on:
opi-evpn-bridge:
condition: service_healthy
entrypoint: /bin/bash
command: |
-x -c 'echo start && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.CreateVrf -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.ListVrfs -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.GetVrf -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.DeleteVrf -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.UpdateVrf -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.CreateSvi -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.ListSvis -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.GetSvi -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.DeleteSvi -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.UpdateSvi -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.CreateLogicalBridge -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.ListLogicalBridges -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.GetLogicalBridge -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.DeleteLogicalBridge -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.UpdateLogicalBridge -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.CreateBridgePort -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.ListBridgePorts -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.GetBridgePort -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.DeleteBridgePort -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.UpdateBridgePort -l && \
echo toremove && \
apt update && apt install iproute2 -y && \
ip link add br-tenant type bridge vlan_default_pvid 0 vlan_filtering 1 vlan_protocol 802.1Q && \
ip link set br-tenant up && \
echo create && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVrf "{\"vrf_id\" : \"blue\", \"vrf\" : {\"spec\" : { \"loopback_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772418}, \"len\": 32}, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 32} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVrf "{\"vrf_id\" : \"green\", \"vrf\" : {\"spec\" : {\"vni\" : 100, \"loopback_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772674}, \"len\": 32}, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 32} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVrf "{\"vrf_id\" : \"yellow\", \"vrf\" : {\"spec\" : {\"vni\" : 101, \"loopback_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772930}, \"len\": 32}, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 32} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateLogicalBridge "{\"logical_bridge_id\" : \"vlan10\", \"logical_bridge\" : {\"spec\" : {\"vni\" : 10, \"vlan_id\": 10, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 24} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateLogicalBridge "{\"logical_bridge_id\" : \"vlan20\", \"logical_bridge\" : {\"spec\" : {\"vni\" : 20, \"vlan_id\": 20, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 24} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateLogicalBridge "{\"logical_bridge_id\" : \"vlan30\", \"logical_bridge\" : {\"spec\" : {\"vni\" : 30, \"vlan_id\": 30, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 24} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateLogicalBridge "{\"logical_bridge_id\" : \"vlan40\", \"logical_bridge\" : {\"spec\" : {\"vni\" : 40, \"vlan_id\": 40, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 24} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateLogicalBridge "{\"logical_bridge_id\" : \"vlan50\", \"logical_bridge\" : {\"spec\" : { \"vlan_id\": 50, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"len\": 24} }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSvi "{\"svi_id\" : \"blue-vlan20\", \"svi\" : {\"spec\" : {\"vrf\": \"//network.opiproject.org/vrfs/blue\", \"logical_bridge\": \"//network.opiproject.org/bridges/vlan20\", \"mac_address\" : \"qrvMAAAh\", \"gw_ip_prefix\": [{\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 336860161}, \"len\": 24}] }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSvi "{\"svi_id\" : \"blue-vlan30\", \"svi\" : {\"spec\" : {\"vrf\": \"//network.opiproject.org/vrfs/blue\", \"logical_bridge\": \"//network.opiproject.org/bridges/vlan30\", \"mac_address\" : \"qrvMAAAx\", \"gw_ip_prefix\": [{\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 505290241}, \"len\": 24}] }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSvi "{\"svi_id\" : \"green-vlan40\", \"svi\" : {\"spec\" : {\"vrf\": \"//network.opiproject.org/vrfs/green\", \"logical_bridge\": \"//network.opiproject.org/bridges/vlan40\", \"mac_address\" : \"qrvMAABB\", \"gw_ip_prefix\": [{\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 673720321}, \"len\": 24}] }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSvi "{\"svi_id\" : \"yellow-vlan50\", \"svi\" : {\"spec\" : {\"vrf\": \"//network.opiproject.org/vrfs/yellow\", \"logical_bridge\": \"//network.opiproject.org/bridges/vlan50\", \"mac_address\" : \"qrvMAABR\", \"gw_ip_prefix\": [{\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 842150405}, \"len\": 24}] }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateBridgePort "{\"bridge_port_id\" : \"eth1\", \"bridge_port\" : {\"spec\" : {\"mac_address\" : \"qrvMAAAB\", \"ptype\": \"TRUNK\", \"logical_bridges\": [\"//network.opiproject.org/bridges/vlan10\", \"//network.opiproject.org/bridges/vlan20\", \"//network.opiproject.org/bridges/vlan40\"] }} }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateBridgePort "{\"bridge_port_id\" : \"eth2\", \"bridge_port\" : {\"spec\" : {\"mac_address\" : \"qrvMAAAB\", \"ptype\": \"ACCESS\", \"logical_bridges\": [\"//network.opiproject.org/bridges/vlan50\"] }} }" && \
echo get && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVrf "{\"name\" : \"//network.opiproject.org/vrfs/blue\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVrf "{\"name\" : \"//network.opiproject.org/vrfs/green\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVrf "{\"name\" : \"//network.opiproject.org/vrfs/yellow\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetLogicalBridge "{\"name\" : \"//network.opiproject.org/bridges/vlan10\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetLogicalBridge "{\"name\" : \"//network.opiproject.org/bridges/vlan20\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetLogicalBridge "{\"name\" : \"//network.opiproject.org/bridges/vlan30\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetLogicalBridge "{\"name\" : \"//network.opiproject.org/bridges/vlan40\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetLogicalBridge "{\"name\" : \"//network.opiproject.org/bridges/vlan50\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSvi "{\"name\" : \"//network.opiproject.org/svis/blue-vlan20\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSvi "{\"name\" : \"//network.opiproject.org/svis/blue-vlan30\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSvi "{\"name\" : \"//network.opiproject.org/svis/green-vlan40\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSvi "{\"name\" : \"//network.opiproject.org/svis/yellow-vlan50\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetBridgePort "{\"name\" : \"//network.opiproject.org/ports/eth1\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetBridgePort "{\"name\" : \"//network.opiproject.org/ports/eth2\" }" && \
echo list && \
/entrypoint.sh call --json_input --json_output localhost:50151 ListVrfs "{}" && \
/entrypoint.sh call --json_input --json_output localhost:50151 ListLogicalBridges "{}" && \
/entrypoint.sh call --json_input --json_output localhost:50151 ListSvis "{}" && \
/entrypoint.sh call --json_input --json_output localhost:50151 ListBridgePorts "{}" && \
echo done'
host2-leaf2:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n2htoleaf2:
# L2 VXLAN - VLAN10 stretched with VNI10 to leaf2 from leaf1 (ping 10.10.10.3)
command: |
sh -x -c 'ip link add link eth0 name eth0.10 type vlan id 10 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.10 up && \
ip addr add 10.10.10.11/24 dev eth0.10 && sleep infinity'
host3-leaf2:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n4htoleafbn2:
command: |
sh -x -c 'ip link add link eth0 name eth0.30 type vlan id 30 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.30 up && \
ip addr add 30.30.30.31/24 dev eth0.30 &&
ip route replace default via 30.30.30.1 && sleep infinity'
host4-leaf2:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n7htoleafbn2:
command: |
sh -x -c 'ip link add link eth0 name eth0.40 type vlan id 40 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.40 up && \
ip addr add 40.40.40.41/24 dev eth0.40 &&
ip route replace default via 40.40.40.1 && sleep infinity'
opi-test:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n2htoleaf1:
n6h1tol1y:
depends_on:
- spine1
- leaf1
- leaf2
- bleaf
- host2-leaf2
- host3-leaf2
- host4-leaf2
- opi-evpn-bridge
- testgrpc
- opi-jaeger-test
# HOST1
# L2 VXLAN - VLAN10 stretched with VNI10 to leaf2 from leaf1, ping Host2 IP from Host1
# L3VXLAN Asymmetric IRB:
# VLAN20 & VLAN30 stretched with VNI20 & VNI30 repectively to leaf2 from leaf1 via blue VRF, ping Host3 IP from Host1
# L3VXLAN Symmetric IRB:
# Ping to Bleaf internet connectivity IPs from Host1 via green and yellow VRFs from Leaf1
command: |
sh -x -c 'sleep 30 && \
ip link add link eth0 name eth0.10 type vlan id 10 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.10 up && \
ip addr add 10.10.10.10/24 dev eth0.10 && \
sleep 5 && \
ping -c 3 10.10.10.11 && \
ip link add link eth0 name eth0.20 type vlan id 20 && \
ip link set eth0.20 up && \
ip addr add 20.20.20.20/24 dev eth0.20 && \
ip rule add from 20.20.20.20 lookup 1000
ip route add default via 20.20.20.1 dev eth0.20 table 1000
sleep 5 && \
ping -c 3 30.30.30.31 -I 20.20.20.20 && \
ip link add link eth0 name eth0.40 type vlan id 40 && \
ip link set eth0.40 up && \
ip addr add 40.40.40.40/24 dev eth0.40 && \
ip rule add from 40.40.40.40 lookup 1001
ip route add default via 40.40.40.1 dev eth0.40 table 1001
sleep 5 && \
ping -c 3 6.6.6.6 -I 40.40.40.40 && ping -c 3 40.40.40.41 && \
ip addr add 50.50.50.50/24 dev eth1 && \
ip rule add from 50.50.50.50 lookup 1002
ip route add default via 50.50.50.5 dev eth1 table 1002
sleep 5 && \
ping -c 3 7.7.7.7 -I 50.50.50.50'
networks:
n1l1tos1:
ipam:
driver: default
config:
- subnet: 10.168.1.0/24
n0l2tos1:
ipam:
driver: default
config:
- subnet: 10.168.2.0/24
btos1:
ipam:
driver: default
config:
- subnet: 10.168.3.0/24
internet1:
ipam:
driver: default
config:
- subnet: 6.6.6.0/24
internet2:
ipam:
driver: default
config:
- subnet: 7.7.7.0/24
n2htoleaf1:
ipam:
driver: default
config:
- subnet: 10.10.10.16/28
n2htoleaf2:
ipam:
driver: default
config:
- subnet: 10.10.10.32/28
n4htoleafbn2:
ipam:
driver: default
config:
- subnet: 30.30.30.0/24
n6h1tol1y:
ipam:
driver: default
config:
- subnet: 50.50.50.0/24
n7htoleafbn2:
ipam:
driver: default
config:
- subnet: 40.40.40.41/28