Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFRouting lab 01 #417

Merged
merged 2 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/lab-examples/frr01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
| | |
| ----------------------------- | -------------------------------------------------------------------- |
| **Description** | A 3-node ring of FRR routers with OSPF IGP |
| **Components** | [FRR](http://docs.frrouting.org/en/latest/overview.html) |
| **Resource requirements**[^1] | :fontawesome-solid-microchip: 2 <br/>:fontawesome-solid-memory: 2 GB |
| **Topology file** | [frr01.clab.yml][topofile] |
| **Name** | frr01 |
| **Version information**[^2] | `containerlab:0.13.0`, `frrouting/frr:v7.5.1`, `docker-ce:19.03.13` |

## Description
This lab example consists of three FRR routers connected in a ring topology. Each router has one PC connected to it.

This is also an example of how to pre-configure lab nodes of `linux` kind in containerlab.

To start this lab, run the [`run.sh`][run] script, which will run the containerlab deploy commands, and then configure the PC interfaces.

The lab configuration is documented in detail at: https://www.brianlinkletter.com/2021/05/use-containerlab-to-emulate-open-source-routers/

[topofile]: https://github.com/srl-labs/containerlab/tree/master/lab-examples/frr01/frr01.clab.yml
[run]: https://github.com/srl-labs/containerlab/tree/master/lab-examples/frr01/run.sh

[^1]: Resource requirements are provisional. Consult with the installation guides for additional information.
[^2]: The lab has been validated using these versions of the required tools/components. Using versions other than stated might lead to a non-operational setup process.
15 changes: 15 additions & 0 deletions lab-examples/frr01/PC-interfaces.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
sudo docker exec -d clab-frrlab-PC1 ip link set eth1 up
sudo docker exec -d clab-frrlab-PC1 ip addr add 192.168.11.2/24 dev eth1
sudo docker exec -d clab-frrlab-PC1 ip route add 192.168.0.0/16 via 192.168.11.1 dev eth1
sudo docker exec -d clab-frrlab-PC1 ip route add 10.10.10.0/24 via 192.168.11.1 dev eth1

sudo docker exec -d clab-frrlab-PC2 ip link set eth1 up
sudo docker exec -d clab-frrlab-PC2 ip addr add 192.168.12.2/24 dev eth1
sudo docker exec -d clab-frrlab-PC2 ip route add 192.168.0.0/16 via 192.168.12.1 dev eth1
sudo docker exec -d clab-frrlab-PC2 ip route add 10.10.10.0/24 via 192.168.12.1 dev eth1

sudo docker exec -d clab-frrlab-PC3 ip link set eth1 up
sudo docker exec -d clab-frrlab-PC3 ip addr add 192.168.13.2/24 dev eth1
sudo docker exec -d clab-frrlab-PC3 ip route add 192.168.0.0/16 via 192.168.13.1 dev eth1
sudo docker exec -d clab-frrlab-PC3 ip route add 10.10.10.0/24 via 192.168.13.1 dev eth1
10 changes: 10 additions & 0 deletions lab-examples/frr01/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Simple OSPF lab using FRR

This lab example consists of three FRR routers connected in a ring topology. Each router has one PC connected to it.

This is also an example of how to pre-configure lab nodes on "linux" node types in Containerlab.

To start this lab, run the *run.sh* script, which will run the containerlab deploy commands, and then configure the PC interfaces.

The lab configuration is documented in detail at: https://www.brianlinkletter.com/2021/05/use-containerlab-to-emulate-open-source-routers/

39 changes: 39 additions & 0 deletions lab-examples/frr01/frr01.clab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: frr01

topology:
nodes:
router1:
kind: linux
image: frrouting/frr:v7.5.1
binds:
- router1/daemons:/etc/frr/daemons
- router1/frr.conf:/etc/frr/frr.conf
router2:
kind: linux
image: frrouting/frr:v7.5.1
binds:
- router2/daemons:/etc/frr/daemons
- router2/frr.conf:/etc/frr/frr.conf
router3:
kind: linux
image: frrouting/frr:v7.5.1
binds:
- router3/daemons:/etc/frr/daemons
- router3/frr.conf:/etc/frr/frr.conf
PC1:
kind: linux
image: praqma/network-multitool:latest
PC2:
kind: linux
image: praqma/network-multitool:latest
PC3:
kind: linux
image: praqma/network-multitool:latest

links:
- endpoints: ["router1:eth1", "router2:eth1"]
- endpoints: ["router1:eth2", "router3:eth1"]
- endpoints: ["router2:eth2", "router3:eth2"]
- endpoints: ["PC1:eth1", "router1:eth3"]
- endpoints: ["PC2:eth1", "router2:eth3"]
- endpoints: ["PC3:eth1", "router3:eth3"]
36 changes: 36 additions & 0 deletions lab-examples/frr01/router1/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
ldpd=yes
nhrpd=no
eigrpd=no
babeld=no
sharpd=no
staticd=no
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"
25 changes: 25 additions & 0 deletions lab-examples/frr01/router1/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
frr version 7.5.1_git
frr defaults traditional
hostname router1
no ipv6 forwarding
!
interface eth1
ip address 192.168.1.1/24
!
interface eth2
ip address 192.168.2.1/24
!
interface eth3
ip address 192.168.11.1/24
!
interface lo
ip address 10.10.10.1/32
!
router ospf
passive-interface eth3
network 192.168.1.0/24 area 0.0.0.0
network 192.168.2.0/24 area 0.0.0.0
network 192.168.11.0/24 area 0.0.0.0
!
line vty
!
36 changes: 36 additions & 0 deletions lab-examples/frr01/router2/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
ldpd=yes
nhrpd=no
eigrpd=no
babeld=no
sharpd=no
staticd=no
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"
26 changes: 26 additions & 0 deletions lab-examples/frr01/router2/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
frr version 7.5.1_git
frr defaults traditional
hostname router2
no ipv6 forwarding
!
interface eth1
ip address 192.168.1.2/24
!
interface eth2
ip address 192.168.3.1/24
!
interface eth3
ip address 192.168.12.1/24
!
interface lo
ip address 10.10.10.2/32
!
router ospf
passive-interface eth3
network 192.168.1.0/24 area 0.0.0.0

network 192.168.3.0/24 area 0.0.0.0
network 192.168.12.0/24 area 0.0.0.0
!
line vty
!
36 changes: 36 additions & 0 deletions lab-examples/frr01/router3/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
ldpd=yes
nhrpd=no
eigrpd=no
babeld=no
sharpd=no
staticd=no
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"
25 changes: 25 additions & 0 deletions lab-examples/frr01/router3/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
frr version 7.5.1_git
frr defaults traditional
hostname router3
no ipv6 forwarding
!
interface eth1
ip address 192.168.2.2/24
!
interface eth2
ip address 192.168.3.2/24
!
interface eth3
ip address 192.168.13.1/24
!
interface lo
ip address 10.10.10.3/32
!
router ospf
passive-interface eth3
network 192.168.2.0/24 area 0.0.0.0
network 192.168.3.0/24 area 0.0.0.0
network 192.168.13.0/24 area 0.0.0.0
!
line vty
!
3 changes: 3 additions & 0 deletions lab-examples/frr01/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
clab deploy --topo frrlab.yml
./PC-interfaces.sh
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ nav:
- Nokia SR Linux and Cisco XRv9k: lab-examples/vr-xrv9k.md
- Nokia SR Linux and Cisco XRv: lab-examples/vr-xrv.md
- Nokia SR Linux and FRR: lab-examples/srl-frr.md
- FRR: lab-examples/frr01.md
- BGP VPLS between Nokia and Juniper: lab-examples/bgp-vpls-nok-jun.md
- Multi-node labs: lab-examples/multinode.md
- Release notes:
Expand Down