Nokia SR Linux and SONiC
Description | A Nokia SR Linux connected back-to-back with SONiC-VS |
Components | Nokia SR Linux, SONiC |
Resource requirements1 | 2 2 GB |
Topology file | sonic01.clab.yml |
Name | sonic01 |
Version information2 | containerlab:0.9.0 , srlinux:20.6.3-145 , docker-sonic-vs:202012 , docker-ce:19.03.13 |
Description#
A lab consists of an SR Linux node connected with Azure SONiC via a point-to-point ethernet link. Both nodes are also connected with their management interfaces to the containerlab
docker network.
Use cases#
This lab allows users to launch basic interoperability scenarios between Nokia SR Linux and SONiC operating systems.
BGP#
This lab demonstrates a simple iBGP peering scenario between Nokia SR Linux and SONiC. Both nodes exchange NLRI with their loopback prefix making it reachable.
Configuration#
Once the lab is deployed with containerlab, use the following configuration instructions to make interfaces configuration and enable BGP on both nodes.
Get into SR Linux CLI with docker exec -it clab-sonic01-srl sr_cli
and start configuration
# 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
Get into sonic container shell with docker exec -it clab-sonic01-sonic bash
and configure the so-called front-panel ports.
Since we defined only one data interface for our sonic/srl nodes, we need to confgure a single port and a loopback interface:
config interface ip add Ethernet0 192.168.1.2/24
config interface startup Ethernet0
config loopback add Loopback0
config interface ip add Loopback0 10.10.10.2/32
config interface startup Loopback0
root@sonic:/# service frr restart
[ ok ] Stopped watchfrr.
[ ok . Stopped staticd[....] Stopped zebra[....] Stopped bgpd
.
.
[ ok ] Started watchfrr.
root@sonic:/# service frr status
[ ok ] Status of watchfrr: running.
[ ok ] Status of zebra: running.
[ ok ] Status of bgpd: running.
[ ok ] Status of staticd: running.
vtysh
command inside the sonic container. Verification#
Once BGP peering is established, the routes can be seen in GRT of both nodes:
sonic# sh ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued route, r - rejected route
K>* 0.0.0.0/0 [0/0] via 172.20.20.1, eth0, 00:20:55
B>* 10.10.10.1/32 [200/0] via 192.168.1.1, Ethernet0, 00:01:51
C>* 10.10.10.2/32 is directly connected, Loopback0, 00:00:53
C>* 172.20.20.0/24 is directly connected, eth0, 00:20:55
B 192.168.1.0/24 [200/0] via 192.168.1.0 inactive, 00:01:51
C>* 192.168.1.0/24 is directly connected, Ethernet0, 00:03:50
Data plane confirms that routes have been programmed to FIB: