init(): initial commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Backup of containerlab topology
|
||||
*.bak
|
||||
|
||||
# containerlab files
|
||||
clab-*
|
||||
@@ -0,0 +1,43 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
bash \
|
||||
vim \
|
||||
git \
|
||||
bind9-dnsutils \
|
||||
bridge-utils \
|
||||
conntrack \
|
||||
ethtool \
|
||||
ipset \
|
||||
iptables \
|
||||
openssh-server \
|
||||
strace \
|
||||
jq \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
iputils-arping \
|
||||
mtr \
|
||||
traceroute \
|
||||
tcptraceroute \
|
||||
net-tools \
|
||||
tcpdump \
|
||||
tshark \
|
||||
frr \
|
||||
frr-pythontools && \
|
||||
apt clean
|
||||
|
||||
USER root
|
||||
WORKDIR /root
|
||||
ENV HOSTNAME=ya-kit
|
||||
|
||||
COPY motd motd
|
||||
|
||||
RUN chmod -R g=u /root
|
||||
RUN chown root:root /usr/bin/dumpcap
|
||||
|
||||
CMD ["bash"]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 355 KiB |
@@ -0,0 +1,36 @@
|
||||
zebra=yes
|
||||
bgpd=yes
|
||||
ospfd=yes
|
||||
ospf6d=no
|
||||
ripd=yes
|
||||
ripngd=no
|
||||
isisd=no
|
||||
pimd=no
|
||||
ldpd=no
|
||||
nhrpd=no
|
||||
eigrpd=no
|
||||
babeld=no
|
||||
sharpd=no
|
||||
staticd=yes
|
||||
pbrd=no
|
||||
bfdd=no
|
||||
fabricd=no
|
||||
|
||||
vtysh_enable=yes
|
||||
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
|
||||
bgpd_options=" --daemon -A 127.0.0.1"
|
||||
ospfd_options=" --daemon -A 127.0.0.1"
|
||||
ospf6d_options=" --daemon -A ::1"
|
||||
ripd_options=" --daemon -A 127.0.0.1"
|
||||
ripngd_options=" --daemon -A ::1"
|
||||
isisd_options=" --daemon -A 127.0.0.1"
|
||||
pimd_options=" --daemon -A 127.0.0.1"
|
||||
ldpd_options=" --daemon -A 127.0.0.1"
|
||||
nhrpd_options=" --daemon -A 127.0.0.1"
|
||||
eigrpd_options=" --daemon -A 127.0.0.1"
|
||||
babeld_options=" --daemon -A 127.0.0.1"
|
||||
sharpd_options=" --daemon -A 127.0.0.1"
|
||||
staticd_options=" --daemon -A 127.0.0.1"
|
||||
pbrd_options=" --daemon -A 127.0.0.1"
|
||||
bfdd_options=" --daemon -A 127.0.0.1"
|
||||
fabricd_options=" --daemon -A 127.0.0.1"
|
||||
@@ -0,0 +1,87 @@
|
||||
# Router A
|
||||
10.10.10.1 A-eth1
|
||||
192.168.1.254 A-eth2
|
||||
10.10.0.1 A
|
||||
|
||||
# Router B
|
||||
10.10.10.2 B-eth1
|
||||
10.10.10.9 B-eth2
|
||||
10.10.10.13 B-eth3
|
||||
10.10.0.2 B
|
||||
|
||||
# Router C
|
||||
10.10.10.17 C-eth1
|
||||
192.168.4.254 C-eth2
|
||||
10.10.10.21 C-eth3
|
||||
10.10.0.3 C
|
||||
|
||||
# Router D
|
||||
10.10.10.10 D-eth1
|
||||
10.10.10.18 D-eth2
|
||||
10.10.10.25 D-eth3
|
||||
10.10.10.28 D-eth4
|
||||
10.10.0.4 D
|
||||
|
||||
# Router F
|
||||
10.10.10.14 F-eth1
|
||||
10.10.10.26 F-eth2
|
||||
203.0.113.1 F-eth3
|
||||
203.0.113.5 F-eth4
|
||||
10.10.0.5 F
|
||||
|
||||
# Router G
|
||||
10.10.10.22 G-eth1
|
||||
10.10.10.30 G-eth2
|
||||
203.0.113.9 G-eth3
|
||||
10.10.0.6 G
|
||||
|
||||
# Router R1
|
||||
10.30.30.1 R1-eth1
|
||||
10.30.30.5 R1-eth2
|
||||
203.0.113.10 R1-eth3
|
||||
203.0.113.6 R1-eth4
|
||||
203.0.113.14 R1-eth5
|
||||
10.30.0.1 R1
|
||||
|
||||
# Router R2
|
||||
10.30.30.2 R2-eth1
|
||||
10.30.30.9 R2-eth3
|
||||
10.30.0.2 R2
|
||||
|
||||
# Router R3
|
||||
10.30.30.6 R3-eth1
|
||||
192.168.3.254 R3-eth2
|
||||
10.30.30.10 R3-eth3
|
||||
10.30.0.3 R3
|
||||
|
||||
# Router Frodo
|
||||
10.20.20.2 Frodo-eth1
|
||||
192.168.2.254 Frodo-eth2
|
||||
10.20.20.9 Frodo-eth3
|
||||
192.168.5.254 Frodo-eth4
|
||||
10.20.0.2 Frodo
|
||||
|
||||
# Router Gandalf
|
||||
10.20.20.1 Gandalf-eth1
|
||||
10.20.20.5 Gandalf-eth2
|
||||
203.0.113.2 Gandalf-eth3
|
||||
203.0.113.13 Gandalf-eth5
|
||||
10.20.0.1 Gandalf
|
||||
|
||||
# Router Sam
|
||||
10.20.20.6 Sam-eth1
|
||||
10.20.20.10 Sam-eth3
|
||||
10.20.0.3 Sam
|
||||
|
||||
# Host 1
|
||||
192.168.1.1 host1
|
||||
|
||||
# Host 2
|
||||
192.168.2.1 host2
|
||||
|
||||
# Host 3
|
||||
192.168.3.1 host3
|
||||
192.168.5.1 host3-alt
|
||||
|
||||
# Host 4
|
||||
192.168.4.1 host4
|
||||
@@ -0,0 +1,13 @@
|
||||
███████████ █████ ███
|
||||
░░███░░░░░███ ░░███ ░░░
|
||||
░███ ░███ ██████ █████ ████ ███████ ████ ████████ ███████
|
||||
░██████████ ███░░███░░███ ░███ ░░░███░ ░░███ ░░███░░███ ███░░███
|
||||
░███░░░░░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███
|
||||
░███ ░███ ░███ ░███ ░███ ░███ ░███ ███ ░███ ░███ ░███ ░███ ░███
|
||||
█████ █████░░██████ ░░████████ ░░█████ █████ ████ █████░░███████
|
||||
░░░░░ ░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░███
|
||||
███ ░███
|
||||
░░██████
|
||||
░░░░░░
|
||||
|
||||
Routing information exchange protocols lab
|
||||
@@ -0,0 +1,27 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname A
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.10.10.1/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 192.168.1.254/24
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.1/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.1
|
||||
network 10.10.0.1/32 area 1
|
||||
network 10.10.10.0/30 area 1
|
||||
network 192.168.1.0/24 area 1
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,32 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname B
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.10.10.2/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 10.10.10.9/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.10.10.13/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.2/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.2
|
||||
network 10.10.0.2/32 area 0
|
||||
network 10.10.10.0/30 area 1
|
||||
network 10.10.10.8/30 area 0
|
||||
network 10.10.10.12/30 area 0
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,32 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname C
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.10.10.17/30
|
||||
ip ospf cost 1
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 192.168.4.254/24
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.10.10.21/30
|
||||
ip ospf cost 100
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.3/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.3
|
||||
network 10.10.0.3/32 area 2
|
||||
network 10.10.10.0/27 area 2
|
||||
network 192.168.4.0/24 area 2
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,39 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname D
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.10.10.10/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 10.10.10.18/30
|
||||
ip ospf cost 1
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.10.10.25/30
|
||||
ip ospf cost 1
|
||||
exit
|
||||
!
|
||||
interface eth4
|
||||
ip address 10.10.10.28/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.4/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.4
|
||||
network 10.10.0.4/32 area 0
|
||||
network 10.10.10.8/30 area 0
|
||||
network 10.10.10.16/30 area 2
|
||||
network 10.10.10.24/30 area 0
|
||||
network 10.10.10.28/30 area 2
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,81 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname F
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
description B-eth3
|
||||
ip address 10.10.10.14/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
description D-eth3
|
||||
ip address 10.10.10.26/30
|
||||
ip ospf cost 1
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
description Gandalf-eth3
|
||||
ip address 203.0.113.1/30
|
||||
exit
|
||||
!
|
||||
interface eth4
|
||||
description R1-eth4
|
||||
ip address 203.0.113.5/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.5/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router bgp 65501
|
||||
bgp router-id 10.10.0.5
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 10.10.0.6 remote-as 65501
|
||||
neighbor 10.10.0.6 update-source lo
|
||||
neighbor 203.0.113.2 remote-as 65502
|
||||
neighbor 203.0.113.2 update-source eth3
|
||||
neighbor 203.0.113.6 remote-as 65503
|
||||
neighbor 203.0.113.6 update-source eth4
|
||||
!
|
||||
address-family ipv4 unicast
|
||||
redistribute ospf metric 10 route-map BGP4-OSPF
|
||||
neighbor 10.10.0.6 next-hop-self
|
||||
neighbor 203.0.113.2 route-map PREFER-ROUTE in
|
||||
neighbor 203.0.113.6 route-map PREFER-ROUTE2 in
|
||||
exit-address-family
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.5
|
||||
redistribute bgp metric 20 metric-type 1 route-map BGP4-OSPF
|
||||
network 10.10.0.5/32 area 0
|
||||
network 10.10.10.0/27 area 0
|
||||
exit
|
||||
!
|
||||
ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32
|
||||
ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24
|
||||
ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32
|
||||
ip prefix-list PREFER-ROUTE seq 5 permit 192.168.2.0/24
|
||||
ip prefix-list PREFER-ROUTE seq 10 deny any
|
||||
ip prefix-list PREFER-ROUTE2 seq 5 permit 192.168.3.0/24
|
||||
ip prefix-list PREFER-ROUTE2 seq 10 deny any
|
||||
!
|
||||
route-map BGP4-OSPF permit 10
|
||||
match ip address prefix-list ALLOWED_ROUTES
|
||||
exit
|
||||
!
|
||||
route-map PREFER-ROUTE permit 10
|
||||
match ip address prefix-list PREFER-ROUTE
|
||||
set local-preference 200
|
||||
set weight 32768
|
||||
exit
|
||||
!
|
||||
route-map PREFER-ROUTE2 permit 10
|
||||
match ip address prefix-list PREFER-ROUTE2
|
||||
set local-preference 200
|
||||
set weight 32768
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,62 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname G
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
description C-eth3
|
||||
ip address 10.10.10.22/30
|
||||
ip ospf cost 100
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
description D-eth4
|
||||
ip address 10.10.10.30/30
|
||||
ip ospf cost 10
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
description R1-eth3
|
||||
ip address 203.0.113.9/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.10.0.6/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router bgp 65501
|
||||
bgp router-id 10.10.0.6
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 10.10.0.5 remote-as 65501
|
||||
neighbor 10.10.0.5 shutdown
|
||||
neighbor 10.10.0.5 update-source lo
|
||||
neighbor 203.0.113.10 remote-as 65503
|
||||
neighbor 203.0.113.10 update-source eth3
|
||||
!
|
||||
address-family ipv4 unicast
|
||||
redistribute ospf metric 10 route-map BGP-to-OSPF
|
||||
neighbor 10.10.0.5 next-hop-self
|
||||
neighbor 203.0.113.10 route-map PREPEND out
|
||||
exit-address-family
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.10.0.6
|
||||
redistribute bgp metric 20 metric-type 1 route-map BGP-to-OSPF
|
||||
network 10.10.0.6/32 area 2
|
||||
network 10.10.10.0/27 area 2
|
||||
exit
|
||||
!
|
||||
ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32
|
||||
ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24
|
||||
ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32
|
||||
!
|
||||
route-map BGP-to-OSPF permit 10
|
||||
match ip address prefix-list ALLOWED_ROUTES
|
||||
exit
|
||||
!
|
||||
route-map PREPEND permit 10
|
||||
set as-path prepend 65501 65501
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,64 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname R1
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.30.30.1/30
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
description R3-eth1
|
||||
ip address 10.30.30.5/30
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 203.0.113.10/30
|
||||
exit
|
||||
!
|
||||
interface eth4
|
||||
ip address 203.0.113.6/30
|
||||
exit
|
||||
!
|
||||
interface eth5
|
||||
ip address 203.0.113.14/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.30.0.1/32
|
||||
exit
|
||||
!
|
||||
router rip
|
||||
network 10.30.0.1/32
|
||||
network 10.30.30.0/28
|
||||
passive-interface lo
|
||||
passive-interface eth3
|
||||
passive-interface eth4
|
||||
passive-interface eth5
|
||||
redistribute bgp metric 5 route-map BGP4-rip
|
||||
version 2
|
||||
exit
|
||||
!
|
||||
router bgp 65503
|
||||
bgp router-id 10.30.0.1
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 203.0.113.5 remote-as 65501
|
||||
neighbor 203.0.113.5 update-source lo
|
||||
neighbor 203.0.113.9 remote-as 65501
|
||||
neighbor 203.0.113.9 update-source eth3
|
||||
neighbor 203.0.113.13 remote-as 65502
|
||||
neighbor 203.0.113.13 update-source eth5
|
||||
!
|
||||
address-family ipv4 unicast
|
||||
redistribute rip route-map BGP4-rip
|
||||
exit-address-family
|
||||
exit
|
||||
!
|
||||
ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32
|
||||
ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24
|
||||
ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32
|
||||
!
|
||||
route-map BGP4-rip permit 10
|
||||
match ip address prefix-list ALLOWED_ROUTES
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,24 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname R2
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.30.30.2/30
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.30.30.9/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.30.0.2/32
|
||||
exit
|
||||
!
|
||||
router rip
|
||||
network 10.30.0.2/32
|
||||
network 10.30.30.0/28
|
||||
passive-interface lo
|
||||
version 2
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,30 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname R3
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.30.30.6/30
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 192.168.3.254/24
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.30.30.10/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.30.0.3/32
|
||||
exit
|
||||
!
|
||||
router rip
|
||||
network 10.30.0.3/32
|
||||
network 10.30.30.0/28
|
||||
network 192.168.3.0/24
|
||||
passive-interface lo
|
||||
passive-interface eth2
|
||||
version 2
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,45 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname Frodo
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
description Gandalf-eth1
|
||||
ip address 10.20.20.2/30
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
description usernet2
|
||||
ip address 192.168.2.254/24
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
description Sam-eth3
|
||||
ip address 10.20.20.9/30
|
||||
exit
|
||||
!
|
||||
interface eth4
|
||||
description usernet3
|
||||
ip address 192.168.5.254/24
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.20.0.2/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.20.0.2
|
||||
network 10.20.0.2/32 area 1
|
||||
network 10.20.20.0/30 area 0
|
||||
network 10.20.20.8/30 area 0
|
||||
network 192.168.2.0/24 area 1
|
||||
network 192.168.5.0/24 area 1
|
||||
area 0 filter-list prefix RESTRICT_5_SUBNET in
|
||||
exit
|
||||
!
|
||||
ip prefix-list RESTRICT_5_SUBNET seq 5 deny 192.168.5.0/24
|
||||
ip prefix-list RESTRICT_5_SUBNET seq 10 permit any
|
||||
!
|
||||
@@ -0,0 +1,55 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname Gandalf
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.20.20.1/30
|
||||
exit
|
||||
!
|
||||
interface eth2
|
||||
ip address 10.20.20.5/30
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 203.0.113.2/30
|
||||
exit
|
||||
!
|
||||
interface eth5
|
||||
ip address 203.0.113.13/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.20.0.1/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router bgp 65502
|
||||
bgp router-id 10.20.0.1
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 203.0.113.1 remote-as 65501
|
||||
neighbor 203.0.113.1 update-source eth3
|
||||
neighbor 203.0.113.14 remote-as 65503
|
||||
neighbor 203.0.113.14 update-source eth5
|
||||
!
|
||||
address-family ipv4 unicast
|
||||
redistribute ospf metric 10 route-map BGP4-OSPF
|
||||
exit-address-family
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.20.0.1
|
||||
redistribute bgp metric 20 metric-type 1 route-map BGP4-OSPF
|
||||
network 10.20.0.1/32 area 0
|
||||
network 10.20.20.0/30 area 0
|
||||
network 10.20.20.4/30 area 0
|
||||
exit
|
||||
!
|
||||
ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32
|
||||
ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24
|
||||
ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32
|
||||
!
|
||||
route-map BGP4-OSPF permit 10
|
||||
match ip address prefix-list ALLOWED_ROUTES
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,25 @@
|
||||
frr version 8.1
|
||||
frr defaults traditional
|
||||
hostname Sam
|
||||
no ipv6 forwarding
|
||||
!
|
||||
interface eth1
|
||||
ip address 10.20.20.6/30
|
||||
exit
|
||||
!
|
||||
interface eth3
|
||||
ip address 10.20.20.10/30
|
||||
exit
|
||||
!
|
||||
interface lo
|
||||
ip address 10.20.0.3/32
|
||||
ip ospf passive
|
||||
exit
|
||||
!
|
||||
router ospf
|
||||
ospf router-id 10.20.0.3
|
||||
network 10.20.0.3/32 area 0
|
||||
network 10.20.20.4/30 area 0
|
||||
network 10.20.20.8/30 area 0
|
||||
exit
|
||||
!
|
||||
@@ -0,0 +1,187 @@
|
||||
name: routing
|
||||
prefix: net
|
||||
|
||||
topology:
|
||||
kinds:
|
||||
linux:
|
||||
image: docker.io/itqdev/netops:routing
|
||||
|
||||
defaults:
|
||||
network-mode: none
|
||||
|
||||
nodes:
|
||||
A:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/A/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
B:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/B/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
C:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/C/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
D:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/D/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
F:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/F/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
G:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- ospf/G/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
Gandalf:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- static/Gandalf/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
Frodo:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- static/Frodo/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
Sam:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- static/Sam/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
R1:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- rip/R1/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
R2:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- rip/R2/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
R3:
|
||||
kind: linux
|
||||
binds:
|
||||
- common/daemons:/etc/frr/daemons
|
||||
- common/vtysh.conf:/etc/frr/vtysh.conf
|
||||
- rip/R3/frr.conf:/etc/frr/frr.conf
|
||||
exec:
|
||||
- service frr start
|
||||
|
||||
host1:
|
||||
kind: linux
|
||||
image: docker.io/itqdev/netops:latest
|
||||
binds:
|
||||
- hosts:/etc/hosts
|
||||
exec:
|
||||
- ip addr add 192.168.1.1/24 dev eth2
|
||||
- ip link set eth2 up
|
||||
- ip route add 192.168.0.0/16 via 192.168.1.254 dev eth2
|
||||
|
||||
host4:
|
||||
kind: linux
|
||||
image: docker.io/itqdev/netops:latest
|
||||
binds:
|
||||
- hosts:/etc/hosts
|
||||
exec:
|
||||
- ip addr add 192.168.4.1/24 dev eth2
|
||||
- ip link set eth2 up
|
||||
- ip route add 192.168.0.0/16 via 192.168.4.254 dev eth2
|
||||
|
||||
host2:
|
||||
kind: linux
|
||||
image: docker.io/itqdev/netops:latest
|
||||
binds:
|
||||
- hosts:/etc/hosts
|
||||
exec:
|
||||
- ip addr add 192.168.2.1/24 dev eth2
|
||||
- ip link set eth2 up
|
||||
- ip route add 192.168.0.0/16 via 192.168.2.254 dev eth2
|
||||
|
||||
host3:
|
||||
kind: linux
|
||||
image: docker.io/itqdev/netops:latest
|
||||
binds:
|
||||
- hosts:/etc/hosts
|
||||
exec:
|
||||
- ip addr add 192.168.3.1/24 dev eth2
|
||||
- ip link set eth2 up
|
||||
- ip route add 192.168.0.0/16 via 192.168.3.254 dev eth2
|
||||
- ip addr add 192.168.5.1/24 dev eth4
|
||||
- ip link set eth4 up
|
||||
- ip route add 192.168.2.0/24 via 192.168.5.254 dev eth4
|
||||
|
||||
links:
|
||||
- endpoints: ["A:eth1","B:eth1"]
|
||||
- endpoints: ["B:eth2","D:eth1"]
|
||||
- endpoints: ["B:eth3","F:eth1"]
|
||||
- endpoints: ["C:eth1","D:eth2"]
|
||||
- endpoints: ["C:eth3","G:eth1"]
|
||||
- endpoints: ["D:eth3","F:eth2"]
|
||||
- endpoints: ["D:eth4","G:eth2"]
|
||||
- endpoints: ["Gandalf:eth3","F:eth3"]
|
||||
- endpoints: ["Gandalf:eth1","Frodo:eth1"]
|
||||
- endpoints: ["Gandalf:eth2","Sam:eth1"]
|
||||
- endpoints: ["Frodo:eth3","Sam:eth3"]
|
||||
- endpoints: ["R1:eth3","G:eth3"]
|
||||
- endpoints: ["R1:eth4","F:eth4"]
|
||||
- endpoints: ["R1:eth1","R2:eth1"]
|
||||
- endpoints: ["R1:eth2","R3:eth1"]
|
||||
- endpoints: ["R1:eth5","Gandalf:eth5"]
|
||||
- endpoints: ["R2:eth3","R3:eth3"]
|
||||
- endpoints: ["A:eth2","host1:eth2"]
|
||||
- endpoints: ["C:eth2","host4:eth2"]
|
||||
- endpoints: ["Frodo:eth2","host2:eth2"]
|
||||
- endpoints: ["R3:eth2","host3:eth2"]
|
||||
- endpoints: ["Frodo:eth4","host3:eth4"]
|
||||
|
||||
Reference in New Issue
Block a user