Created
December 11, 2022 13:24
-
-
Save Shikugawa/09b94697d9b2e052516558b19fe0e88a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodes: | |
- name: R1 | |
image: slankdev/frr | |
interfaces: | |
- { name: net0, type: direct, args: C1#net0 } | |
- { name: net1, type: direct, args: R2#net1 } | |
- { name: net2, type: direct, args: R3#net2 } | |
- name: R2 | |
image: slankdev/frr | |
interfaces: | |
- { name: net1, type: direct, args: R1#net1 } | |
- { name: net3, type: direct, args: C2#net3 } | |
- name: R3 | |
image: slankdev/frr | |
interfaces: | |
- { name: net2, type: direct, args: R1#net2 } | |
- { name: net4, type: direct, args: C3#net4 } | |
- name: C1 | |
image: slankdev/ubuntu:18.04 | |
interfaces: | |
- { name: net0, type: direct, args: R1#net0 } | |
- name: C2 | |
image: slankdev/ubuntu:18.04 | |
interfaces: | |
- { name: net3, type: direct, args: R2#net3 } | |
- name: C3 | |
image: slankdev/ubuntu:18.04 | |
interfaces: | |
- { name: net4, type: direct, args: R3#net4 } | |
node_configs: | |
- name: R1 | |
cmds: | |
# - cmd: echo 'ecmp=yes' >> /etc/frr/daemons | |
- cmd: /usr/lib/frr/frr start | |
- cmd: ip addr add 192.168.0.2/24 dev net0 | |
- cmd: ip addr add 10.0.2.1/24 dev net1 | |
- cmd: ip addr add 10.0.3.1/24 dev net2 | |
- cmd: >- | |
vtysh -c 'conf t' | |
-c 'router bgp 100' | |
-c ' bgp router-id 1.1.1.1' | |
-c ' bgp bestpath as-path multipath-relax' | |
-c ' neighbor 10.0.2.2 remote-as 200' | |
-c ' neighbor 10.0.3.2 remote-as 300' | |
-c ' address-family ipv4 unicast' | |
-c ' redistribute connected' | |
-c ' exit-address-family' | |
-c 'exit' | |
- name: R2 | |
cmds: | |
- cmd: /usr/lib/frr/frr start | |
- cmd: ip addr add 10.0.2.2/24 dev net1 | |
- cmd: ip addr add 192.168.100.10/24 dev net3 | |
- cmd: >- | |
vtysh -c 'conf t' | |
-c 'router bgp 200' | |
-c ' bgp router-id 2.2.2.2' | |
-c ' neighbor 10.0.2.1 remote-as 100' | |
-c ' network 192.168.100.0/24' | |
-c 'exit' | |
- name: R3 | |
cmds: | |
- cmd: /usr/lib/frr/frr start | |
- cmd: ip addr add 10.0.3.2/24 dev net2 | |
- cmd: ip addr add 192.168.100.10/24 dev net4 | |
- cmd: >- | |
vtysh -c 'conf t' | |
-c 'router bgp 300' | |
-c ' bgp router-id 3.3.3.3' | |
-c ' neighbor 10.0.3.1 remote-as 100' | |
-c ' network 192.168.100.0/24' | |
-c 'exit' | |
- name: C1 | |
cmds: | |
- cmd: ip addr add 192.168.0.1/24 dev net0 | |
- cmd: ip route add default via 192.168.0.2 | |
- name: C2 | |
cmds: | |
- cmd: ip addr add 192.168.100.1/24 dev net3 | |
- cmd: ip route add default via 192.168.100.10 | |
- name: C3 | |
cmds: | |
- cmd: ip addr add 192.168.100.1/24 dev net4 | |
- cmd: ip route add default via 192.168.100.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment