Created
July 18, 2022 15:10
-
-
Save Shikugawa/be655d42eccf6bd4a892164eb4f0c15f 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: C1 | |
image: alpine:latest | |
interfaces: | |
- { name: net1, type: direct, args: CE#net1 } | |
- name: CE | |
image: frrouting/frr:v8.1.0 | |
docker_run_extra_args: --entrypoint bash | |
interfaces: | |
- { name: net1, type: direct, args: C1#net1 } | |
- { name: net5, type: direct, args: PE#net5 } | |
sysctls: | |
- sysctl: net.ipv6.conf.all.disable_ipv6=0 | |
- sysctl: net.ipv6.conf.default.disable_ipv6=0 | |
- sysctl: net.ipv4.ip_forward=1 | |
- name: PE | |
image: frrouting/frr:v8.1.0 | |
docker_run_extra_args: --entrypoint bash | |
interfaces: | |
- { name: net5, type: direct, args: CE#net5 } | |
sysctls: | |
- sysctl: net.ipv6.conf.all.disable_ipv6=0 | |
- sysctl: net.ipv6.conf.default.disable_ipv6=0 | |
- sysctl: net.ipv4.ip_forward=1 | |
- sysctl: net.mpls.platform_labels=1024 | |
node_configs: | |
- name: C1 | |
cmds: | |
- cmd: ip addr add 192.168.0.1/24 dev net1 | |
- cmd: ip route add default via 192.168.0.2 | |
- name: CE | |
cmds: | |
- cmd: touch /etc/frr/vtysh.conf | |
- cmd: sed -i -e 's/ospfd=no/ospfd=yes/g' /etc/frr/daemons | |
- cmd: /usr/lib/frr/frrinit.sh start | |
- cmd: >- | |
vtysh -c 'conf t' | |
-c 'interface net1' | |
-c ' ip address 192.168.0.2/24' | |
-c '!' | |
-c 'interface net5' | |
-c ' ip address 10.0.1.1/24' | |
-c '!' | |
-c 'router ospf' | |
-c ' network 10.0.1.0/24 area 0' | |
-c ' network 192.168.0.0/24 area 0' | |
-c '!' | |
- name: PE | |
cmds: | |
- cmd: touch /etc/frr/vtysh.conf | |
- cmd: sed -i -e 's/ospfd=no/ospfd=yes/g' /etc/frr/daemons | |
- cmd: /usr/lib/frr/frrinit.sh start | |
- cmd: >- | |
vtysh -c 'conf t' | |
-c 'interface net5' | |
-c ' ip address 10.0.1.2/24' | |
-c '!' | |
-c 'router ospf' | |
-c ' network 10.0.1.0/24 area 0' | |
-c '!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment