-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from srl-wim/frr
added FRR example
- Loading branch information
Showing
6 changed files
with
180 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
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="{"page":2,"zoom":1.5,"highlight":"#0000ff","nav":true,"check-visible-state":true,"resize":true,"url":"https://raw.githubusercontent.com/srl-wim/container-lab/diagrams/srlsonic01.drawio"}"></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="{"page":3,"zoom":1.5,"highlight":"#0000ff","nav":true,"check-visible-state":true,"resize":true,"url":"https://raw.githubusercontent.com/srl-wim/container-lab/diagrams/srlsonic01.drawio"}"></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> |
This file contains 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
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. |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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"] |
This file contains 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