diff --git a/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/.gitignore b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4ba611c677b4e93c00f2ad4f5efe822ec183c74e --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/.gitignore @@ -0,0 +1,3 @@ + +clab-rtr005 + diff --git a/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/README.md b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9153515b3d3fac86c1b3a2a7fb026ff40900e6cc --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/README.md @@ -0,0 +1 @@ + diff --git a/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr-sw.txt b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr-sw.txt new file mode 100644 index 0000000000000000000000000000000000000000..0924f5fdde590a07c80b2b5a6511aef426250bf0 --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr-sw.txt @@ -0,0 +1,195 @@ +hostname rtr1 +buggy +! +logging buffered debug 10240 +logging file debug /rtr/run/logs/freertr.log +logging rotate 655360000 /rtr/run/logs/freertr.old +! +crypto rsakey rsa import $v10$TUlJRW9nSUJBQUtDQVFFQXAxc0tpdnhHUXN3VkhwT09vVEYxc2NHU29CcUJxSVVIQTF1cjZrMkkzc1UyNk1ncmlHT0Y5U0dRNFA4aytna3czMkRYTkprNnZLUTdQU1NCYXl5dWduQ2pYYW9PZ0tqR1ZKK0xFYkFpWUJING10M00xUThiZXJBTFVXVU5hdGVhNFVXckFBSGhDb1pISm03RloxTUdQQXZndG1GR1BsZE5Fbk8vazR2eEE0eWZ1WUhjeG5SeExrSlVDS1BldGx2b1RWTzIvdXhEMVpBUVFQd2UrVDFxNzlZaEkrVUh6UWJDQmI1UTlTODRya3JUdW05WjFsTzJEcFV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cxZE1aTDUxQnNabEJJOTBod3YvczRjQVAvT2p0TUROZHo4ZFp2TnhDZi8rZnFtKzN5V1MrRHRSaXhLNDJyaGZzQ3VrNTRmcVdpbU5obm1ZT3VYcDRSeDE0SjQ4bEVpUHNVQXJxV3crZUpCakVGU2dFUXo0elBNUFRQaUFPRE1IV2ZSM2Vsa1hUdnhxRExuQ1Z3S0JnQTY0SFlBT0RJL0x6VlNTMjRUVmlZQ05ZZGE5REhicU5RTVExYTdiTXlkdG5wMUVQWVFBRk5UU05iM2d6WDNHSFBuYTYweHlBb29XVWQ1RE9kcW9FQS91RjErL0pkL0Z5TnFURXBaV0FFZXY5UEErT04veUVhWnJ0SUpTaENqWnNpSmk0d1RtTVFRUndReVFPSDNiNHhRanFvb25keDhvR0kwcVJ0ZmxVTVZLQWhVQW1Rb2k3L2ZoVjNNY0NGaU5scVk3MkhYanQzUT0= +! +crypto ecdsakey ecdsa import $v10$TUhRQ0FRRUVJQUQrK3F1emZsLzUxclVISXBKZHd3WXE1NXVUT2UzKzNDdFdVZXMyYlFLUW9BY0dCU3VCQkFBS29VUURRZ0FFQlZQb3lZSllSS0JJVE9YdUV1RTlMN0g4azVVUkJXVW4vRkh0czB6K0RBODlyazhMa3ZoQjlnTnBWTW1NbU9wWXVRWWlqZEFNSlphQzI4UE1DRU5RWlE9PQ== +! +aaa userlist usr + username rare + username rare password $v10$cmFyZQ== + exit +! +scheduler errors + time 600000 + delay 30000 + command clear errors freerror@nop.hu + start + exit +! +access-list flowspec-rules + sequence 10 permit 6 10.10.10.1 255.255.255.255 123-129 20.20.20.1 255.255.255.255 200-400 + sequence 20 permit 7 10.10.10.1 255.255.255.255 123-129 20.20.20.1 255.255.255.255 200-400 + sequence 30 permit 6 12.12.12.1 255.255.255.255 123-129 20.20.20.1 255.255.255.255 200-400 + sequence 40 permit 6 12.12.12.1 255.255.255.255 123-129 22.20.20.1 255.255.255.255 200-400 + sequence 50 permit 1 10.1.10.1 255.255.255.255 all 10.2.10.2 255.255.255.255 all + exit +! +prefix-list ALL4 + sequence 10 permit 0.0.0.0/0 ge 0 le 0 + exit +! +prefix-list ALL6 + sequence 10 permit ::/0 ge 0 le 0 + exit +! +policy-map flowspec-pmap + sequence 10 action drop + sequence 10 match access-group flowspec-rules + ! + exit +! +vrf definition CORE + exit +! +vrf definition OOB + exit +! +vrf definition v1 + rd 1:1 + exit +! +vrf definition v9 + rd 1:1 + exit +! +interface ethernet1 + vrf forwarding CORE + ipv4 address 10.1.10.10 255.255.255.0 + no shutdown + no log-link-change + exit +! +interface ethernet2 + vrf forwarding CORE + ipv4 address 10.2.10.10 255.255.255.0 + no shutdown + no log-link-change + exit +! +interface ethernet255 + vrf forwarding OOB + ipv4 address 172.20.20.3 255.255.255.0 + ipv6 address 2001:172:20:20::3 ffff:ffff:ffff:ffff:: + no shutdown + no log-link-change + exit +! +interface ethernet3 + lldp enable + vrf forwarding CORE + ipv4 address 10.3.10.10 255.255.255.0 + no shutdown + no log-link-change + exit +! +router bgp4 1 + vrf CORE + local-as 2001 + router-id 172.20.20.3 + no safe-ebgp + address-family unicast flowspec + flowspec-install + flowspec-advert flowspec-pmap + ! + neighbor 10.3.10.3 remote-as 1001 + neighbor 10.3.10.3 local-as 2001 + neighbor 10.3.10.3 address-family unicast flowspec + neighbor 10.3.10.3 distance 20 + neighbor 10.3.10.3 send-community standard extended + ! + neighbor 172.20.20.1 remote-as 1001 + neighbor 172.20.20.1 local-as 2001 + neighbor 172.20.20.1 address-family unicast flowspec + neighbor 172.20.20.1 distance 20 + neighbor 172.20.20.1 send-community standard extended + ! + ! + redistribute connected + redistribute uni2flow4 1 + exit +! +console0 + no exec authorization + no login authentication + exit +! +proxy-profile OOB + vrf OOB + exit +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +server telnet OOB + security protocol telnet + exec height -1 + exec logging + no exec authorization + no login authentication + login logging + vrf OOB + exit +! +client proxy OOB +client capture-path /rtr/run/pcap/ +client name-server 1.1.1.1 +client time-server europe.pool.ntp.org +client time-zone CET +! +end diff --git a/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..7ed835d62498277b47fe31bb11b251ba69dc2e6c --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml @@ -0,0 +1,39 @@ +name: rtr005 + +topology: + nodes: + fod1: + kind: linux + #image: ghcr.io/geant/fod:latest + image: fodexabgp-containerlab1:latest + publish: + - tcp/8000 + rtr1: + kind: rare + image: ghcr.io/rare-freertr/freertr-containerlab:latest + host1: + kind: linux + image: floui/tiny-net-tools:latest + host2: + kind: linux + image: floui/tiny-net-tools:latest + + # adding mysocketio container which has border0 client packaged + #border0: + # kind: border0 + + links: + # 10.1.10.1 /24 <-> 10.1.10.10 /24 + - endpoints: + - host1:eth1 + - rtr1:eth1 + # 10.2.10.2 /24 <-> 10.2.10.10 /24 + - endpoints: + - host2:eth1 + - rtr1:eth2 + # 10.3.10.3 /24 <-> 10.3.10.10 /24 + - endpoints: + - fod1:eth1 + - rtr1:eth3 + + diff --git a/inst/testing/fodexabgp-containerlab1/README.md b/inst/testing/fodexabgp-containerlab1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e2668273d1e84e551295ee6486f669466c8122d1 --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/README.md @@ -0,0 +1,18 @@ + +===== HowTo run FoD-exabgp container and freertr container in containerlab + +0 prerequiste: have containerlab installed + https://containerlab.dev/ +1 clone FoD repo + $ git clone https://github.com/GEANT/FOD/tree/feature/exabgp_support2 && cd FOD +2.1 build FoD-exabgp container + in top dir of cloned FoD repo: + $ docker build -f inst/testing/fodexabgp-containerlab1/Dockerfile -t fodexabgp-containerlab1 . +2.2 run containerlab + for running: $ containerlab deploy --topo ./inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml + (for inspecting: $ containerlab inspect --topo ./inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml) + (for deleting: $ containerlab delete --topo ./inst/testing/fodexabgp-containerlab1/005-rare-hello-fod/rtr005.clab.yml) +2.3 in parallel to 2.2 + ./inst/testing/fodexabgp-containerlab1/docker_8000_redir + + diff --git a/inst/testing/fodexabgp-containerlab1/docker_8000_redir b/inst/testing/fodexabgp-containerlab1/docker_8000_redir new file mode 100755 index 0000000000000000000000000000000000000000..0cbe823cd992651dbffd95517043a812c5004617 --- /dev/null +++ b/inst/testing/fodexabgp-containerlab1/docker_8000_redir @@ -0,0 +1,11 @@ +#!/bin/bash + +set -x + +dockerlabel="clab-rtr005-rtr1" + +ip1="$(docker inspect "$dockerlabel" | awk '/IPAddress.*[0-9]/ { gsub(/[",]/, "", $2); if ($2!="") { print $2; } }')" +[ -n "$ip1" ] || exit 1 + +exec socat TCP-LISTEN:8000,fork TCP-CONNECT:"$ip1":8000 + diff --git a/inst/testing/fodexabgp-containerlab1/Dockerfile.supervisord b/inst/testing/fodexabgp-containerlab1/old/Dockerfile.supervisord similarity index 100% rename from inst/testing/fodexabgp-containerlab1/Dockerfile.supervisord rename to inst/testing/fodexabgp-containerlab1/old/Dockerfile.supervisord diff --git a/inst/testing/fodexabgp-containerlab1/Dockerfile.systemd b/inst/testing/fodexabgp-containerlab1/old/Dockerfile.systemd similarity index 100% rename from inst/testing/fodexabgp-containerlab1/Dockerfile.systemd rename to inst/testing/fodexabgp-containerlab1/old/Dockerfile.systemd diff --git a/inst/testing/fodexabgp-containerlab1/prep_fod_exabgp2_on_ubuntu.sh.old b/inst/testing/fodexabgp-containerlab1/old/prep_fod_exabgp2_on_ubuntu.sh.old similarity index 100% rename from inst/testing/fodexabgp-containerlab1/prep_fod_exabgp2_on_ubuntu.sh.old rename to inst/testing/fodexabgp-containerlab1/old/prep_fod_exabgp2_on_ubuntu.sh.old