Skip to content

Commit

Permalink
Merge pull request #242 from srl-wim/frr
Browse files Browse the repository at this point in the history
added FRR example
  • Loading branch information
hellt committed Jan 24, 2021
2 parents cffca9b + 4a17996 commit 2a8fd63
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 3 deletions.
33 changes: 33 additions & 0 deletions docs/lab-examples/srl-frr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
| | |
| ----------------------------- | ---------------------------------------------------------------------------------------- |
| **Description** | A Nokia SR Linux connected back-to-back FRR router |
| **Components** | [Nokia SR Linux][srl], [FRR](http://docs.frrouting.org/en/latest/overview.html) |
| **Resource requirements**[^1] | :fontawesome-solid-microchip: 1 <br/>:fontawesome-solid-memory: 2 GB |
| **Topology file** | [srlfrr01.yml][topofile] |
| **Name** | srlfrr01 |
| **Version information**[^2] | `containerlab:0.9.0`, `srlinux:20.6.3-145`, `frrouting/frr:v7.5.0`, `docker-ce:19.03.13` |

## Description
A lab consists of an SR Linux node connected with FRR router via a point-to-point ethernet link. Both nodes are also connected with their management interfaces to the `clab` docker network.

<div class="mxgraph" style="max-width:100%;border:1px solid transparent;margin:0 auto; display:block;" data-mxgraph="{&quot;page&quot;:2,&quot;zoom&quot;:1.5,&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;check-visible-state&quot;:true,&quot;resize&quot;:true,&quot;url&quot;:&quot;https://raw.githubusercontent.com/srl-wim/container-lab/diagrams/srlsonic01.drawio&quot;}"></div>

## Use cases
This lab allows users to launch basic control plane interoperability scenarios between Nokia SR Linux and FRR network operating systems.

The lab directory [contains](https://github.com/srl-wim/container-lab/tree/master/lab-examples/srlfrr01) files with essential configurations which can be used to jumpstart the interop demonstration. There you will find the config files to demonstrate a classic iBGP peering use case:

<div class="mxgraph" style="max-width:100%;border:1px solid transparent;margin:0 auto; display:block;" data-mxgraph="{&quot;page&quot;:3,&quot;zoom&quot;:1.5,&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;check-visible-state&quot;:true,&quot;resize&quot;:true,&quot;url&quot;:&quot;https://raw.githubusercontent.com/srl-wim/container-lab/diagrams/srlsonic01.drawio&quot;}"></div>


- `daemons`: frr daemons config that is bind mounted to the frr container to trigger the start of the relevant FRR services
- `frr.cfg`: vtysh config lines to configure a basic iBGP peering
- `srl.cfg`: sr_cli config lines to configure a basic iBGP peering

[srl]: https://www.nokia.com/networks/products/service-router-linux-NOS/
[topofile]: https://github.com/srl-wim/container-lab/tree/master/lab-examples/srlfrr01/srlfrr01.yml

[^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.

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/hellt/drawio-js@main/embed2.js" async></script>
85 changes: 85 additions & 0 deletions lab-examples/srlfrr01/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# This file tells the frr package which daemons to start.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/frr/examples/.
#
# ATTENTION:
#
# When activating a daemon for the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
#
# The watchfrr, zebra and staticd daemons are always started.
#
bgpd=yes
ospfd=yes
ospf6d=yes
ripd=no
ripngd=no
isisd=yes
pimd=yes
ldpd=yes
nhrpd=yes
eigrpd=no
babeld=no
sharpd=no
pbrd=no
bfdd=yes
fabricd=no
vrrpd=no

#
# If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -A 127.0.0.1 -s 90000000"
bgpd_options=" -A 127.0.0.1"
ospfd_options=" -A 127.0.0.1"
ospf6d_options=" -A ::1"
ripd_options=" -A 127.0.0.1"
ripngd_options=" -A ::1"
isisd_options=" -A 127.0.0.1"
pimd_options=" -A 127.0.0.1"
ldpd_options=" -A 127.0.0.1"
nhrpd_options=" -A 127.0.0.1"
eigrpd_options=" -A 127.0.0.1"
babeld_options=" -A 127.0.0.1"
sharpd_options=" -A 127.0.0.1"
pbrd_options=" -A 127.0.0.1"
staticd_options="-A 127.0.0.1"
bfdd_options=" -A 127.0.0.1"
fabricd_options="-A 127.0.0.1"
vrrpd_options=" -A 127.0.0.1"

# configuration profile
#
#frr_profile="traditional"
#frr_profile="datacenter"

#
# This is the maximum number of FD's that will be available.
# Upon startup this is read by the control files and ulimit
# is called. Uncomment and use a reasonable value for your
# setup if you are expecting a large number of peers in
# say BGP.
#MAX_FDS=1024

# The list of daemons to watch is automatically generated by the init script.
#watchfrr_options=""

# To make watchfrr create/join the specified netns, use the following option:
#watchfrr_options="--netns"
# This only has an effect in /etc/frr/<somename>/daemons, and you need to
# start FRR with "/usr/lib/frr/frrinit.sh start <somename>".

# for debugging purposes, you can specify a "wrap" command to start instead
# of starting the daemon directly, e.g. to use valgrind on ospfd:
# ospfd_wrap="/usr/bin/valgrind"
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
# all_wrap="/usr/bin/perf record --call-graph -"
# the normal daemon command is added to this at the end.
13 changes: 13 additions & 0 deletions lab-examples/srlfrr01/frr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
interface eth1
ip address 192.168.1.2/24
!
interface lo
ip address 10.10.10.2/32
!
router bgp 65001
bgp router-id 10.10.10.2
neighbor 192.168.1.1 remote-as 65001
!
address-family ipv4 unicast
network 10.10.10.2/32
exit-address-family
29 changes: 29 additions & 0 deletions lab-examples/srlfrr01/srl.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# enter candidate datastore
enter candidate

# configure loopback and data interfaces
set / interface ethernet-1/1 admin-state enable
set / interface ethernet-1/1 subinterface 0 admin-state enable
set / interface ethernet-1/1 subinterface 0 ipv4 address 192.168.1.1/24

set / interface lo0 subinterface 0 admin-state enable
set / interface lo0 subinterface 0 ipv4 address 10.10.10.1/32
set / network-instance default interface ethernet-1/1.0
set / network-instance default interface lo0.0

# configure BGP
set / network-instance default protocols bgp admin-state enable
set / network-instance default protocols bgp router-id 10.10.10.1
set / network-instance default protocols bgp autonomous-system 65001
set / network-instance default protocols bgp group ibgp ipv4-unicast admin-state enable
set / network-instance default protocols bgp group ibgp export-policy export-lo
set / network-instance default protocols bgp neighbor 192.168.1.2 admin-state enable
set / network-instance default protocols bgp neighbor 192.168.1.2 peer-group ibgp
set / network-instance default protocols bgp neighbor 192.168.1.2 peer-as 65001

# create export policy
set / routing-policy policy export-lo statement 10 match protocol local
set / routing-policy policy export-lo statement 10 action accept

# commit config
commit now
16 changes: 16 additions & 0 deletions lab-examples/srlfrr01/srlfrr01.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: srlfrr01

topology:
nodes:
srl:
kind: srl
image: srlinux:20.6.3-145
license: license.key
frr:
kind: linux
image: frrouting/frr:latest
binds:
- daemons:/etc/frr/daemons

links:
- endpoints: ["srl:e1-1", "frr:eth1"]
7 changes: 4 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ nav:
- Nokia SR Linux and SONiC: lab-examples/srl-sonic.md
- External bridge capability: lab-examples/ext-bridge.md
- WAN topology: lab-examples/wan.md
- SR Linux and Nokia SR OS: lab-examples/vr-sros.md
- SR Linux and Juniper vMX: lab-examples/vr-vmx.md
- SR Linux and Cisco XRv: lab-examples/vr-xrv.md
- Nokia SR Linux and Nokia SR OS: lab-examples/vr-sros.md
- Nokia SR Linux and Juniper vMX: lab-examples/vr-vmx.md
- Nokia SR Linux and Cisco XRv: lab-examples/vr-xrv.md
- Nokia SR Linux and FRR: lab-examples/srl-frr.md

site_author: Roman Dodin
site_description: >-
Expand Down

0 comments on commit 2a8fd63

Please sign in to comment.