Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add example configs
Warning
titleEarly Access Feature

Segment routing is an early access feature in Cumulus Linux and is supported only on Mellanox switches.

Cumulus Linux supports segment routing, also known as source routing, which provides the ability for a source node to specify the path a packet should take (traffic engineering). In some more advanced cases, you can use segment routing to have offline multiprotocol label switching (MPLS) controllers program labels into the network for traffic engineering.

Cumulus Linux provides full label-based forwarding, relying on BGP for label exchange. However, Cumulus Linux does not provide LDP interoperability for MPLS and it does not support VRFs for tenant isolation.

Note

Segment routing is an early access feature in Cumulus Linux and is supported only on Mellanox switches.

Contents

Expand
titleThis topic describes ...

Table of Contents
excludeContents

...

Switches r1 through r5 announce their loopbacks (the 10.1.1.* addresses above) in BGP with a label-index

The table below contains the configuration for all five nodes. 

Node/etc/network/interfaces/etc/frr/frr.conf
r1
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/network/interfaces
auto lo
iface lo inet loopback
    address 10.1.1.1/32

auto swp2
iface swp2
    mpls-enable yes

auto swp4
iface swp4
    mpls-enable yes

auto swp10
iface swp10
    address 192.168.11.1/24
    mpls-enable yes

auto vagrant
iface vagrant inet dhcp

auto eth0
iface eth0 inet dhcp
 vrf mgmt

auto mgmt
iface mgmt
  address 127.0.0.1/8
  vrf-table auto
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/frr/frr.conf
frr version 4.0+cl3u9
frr defaults datacenter
hostname r1
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
router bgp 65111
 bgp router-id 10.1.1.1
 no bgp default ipv4-unicast
 neighbor EBGP peer-group
 neighbor EBGP remote-as external
 neighbor swp2 interface peer-group EBGP
 neighbor swp4 interface peer-group EBGP
 !
 address-family ipv4 unicast
  network 10.1.1.1/32 label-index 1
  network 10.1.1.2/32 label-index 2
  network 10.1.1.3/32 label-index 3
  network 10.1.1.4/32 label-index 4
  network 10.1.1.5/32 label-index 5
 exit-address-family
 !
 address-family ipv4 labeled-unicast
  neighbor EBGP activate
 exit-address-family
!
mpls label global-block 100 200
!
line vty
!
r2
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/network/interfaces
auto lo
iface lo inet loopback
    address 10.1.1.2/32

auto swp1
iface swp1
    mpls-enable yes

auto swp3
iface swp3
    mpls-enable yes

auto swp5
iface swp5
    mpls-enable yes

auto vagrant
iface vagrant inet dhcp

auto eth0
iface eth0 inet dhcp
 vrf mgmt

auto mgmt
iface mgmt
  address 127.0.0.1/8
  vrf-table auto
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/frr/frr.conf
frr version 4.0+cl3u9
frr defaults datacenter
hostname r2
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
router bgp 65222
 bgp router-id 10.1.1.2
 no bgp default ipv4-unicast
 neighbor EBGP peer-group
 neighbor EBGP remote-as external
 neighbor swp1 interface peer-group EBGP
 neighbor swp3 interface peer-group EBGP
 neighbor swp5 interface peer-group EBGP
 !
 address-family ipv4 unicast
  network 10.1.1.1/32 label-index 1
  network 10.1.1.2/32 label-index 2
  network 10.1.1.3/32 label-index 3
  network 10.1.1.4/32 label-index 4
  network 10.1.1.5/32 label-index 5
 exit-address-family
 !
 address-family ipv4 labeled-unicast
  neighbor EBGP activate
 exit-address-family
!
mpls label global-block 100 200
!
line vty
!
r3
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/network/interfaces
auto lo
iface lo inet loopback
    address 10.1.1.3/32

auto swp2
iface swp2
    mpls-enable yes

auto swp5
iface swp5
    mpls-enable yes

auto swp10
iface swp10
    address 192.168.22.1/24
    mpls-enable yes

auto vagrant
iface vagrant inet dhcp

auto eth0
iface eth0 inet dhcp
 vrf mgmt

auto mgmt
iface mgmt
  address 127.0.0.1/8
  vrf-table auto
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/frr/frr.conf
frr version 4.0+cl3u9
frr defaults datacenter
hostname r3
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
router bgp 65333
 bgp router-id 10.1.1.3
 no bgp default ipv4-unicast
 neighbor EBGP peer-group
 neighbor EBGP remote-as external
 neighbor swp2 interface peer-group EBGP
 neighbor swp5 interface peer-group EBGP
 !
 address-family ipv4 unicast
  network 10.1.1.1/32 label-index 1
  network 10.1.1.2/32 label-index 2
  network 10.1.1.3/32 label-index 3
  network 10.1.1.4/32 label-index 4
  network 10.1.1.5/32 label-index 5
 exit-address-family
 !
 address-family ipv4 labeled-unicast
  neighbor EBGP activate
 exit-address-family
!
mpls label global-block 100 200
!
line vty
!
r4
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/network/interfaces
auto lo
iface lo inet loopback
    address 10.1.1.4/32

auto swp1
iface swp1
    mpls-enable yes

auto swp5
iface swp5
    mpls-enable yes

auto vagrant
iface vagrant inet dhcp

auto eth0
iface eth0 inet dhcp
 vrf mgmt

auto mgmt
iface mgmt
  address 127.0.0.1/8
  vrf-table auto
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/frr/frr.conf
frr version 4.0+cl3u9
frr defaults datacenter
hostname r4
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
router bgp 65444
 bgp router-id 10.1.1.4
 no bgp default ipv4-unicast
 neighbor EBGP peer-group
 neighbor EBGP remote-as external
 neighbor swp1 interface peer-group EBGP
 neighbor swp5 interface peer-group EBGP
 !
 address-family ipv4 unicast
  network 10.1.1.1/32 label-index 1
  network 10.1.1.2/32 label-index 2
  network 10.1.1.3/32 label-index 3
  network 10.1.1.4/32 label-index 4
  network 10.1.1.5/32 label-index 5
 exit-address-family
 !
 address-family ipv4 labeled-unicast
  neighbor EBGP activate
 exit-address-family
!
mpls label global-block 100 200
!
line vty
!
r5
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/network/interfaces
auto lo
iface lo inet loopback
    address 10.1.1.5/32

auto swp2
iface swp2
    mpls-enable yes

auto swp5
iface swp5
    mpls-enable yes

auto swp10
iface swp10
    address 192.168.22.1/24
    mpls-enable yes

auto vagrant
iface vagrant inet dhcp

auto eth0
iface eth0 inet dhcp
 vrf mgmt

auto mgmt
iface mgmt
  address 127.0.0.1/8
  vrf-table auto
Expand
titleClick to see the config ...
Code Block
languagetext
title/etc/frr/frr.conf
frr version 4.0+cl3u9
frr defaults datacenter
hostname r5
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
router bgp 65555
 bgp router-id 10.1.1.5
 no bgp default ipv4-unicast
 neighbor EBGP peer-group
 neighbor EBGP remote-as external
 neighbor swp2 interface peer-group EBGP
 neighbor swp3 interface peer-group EBGP
 neighbor swp5 interface peer-group EBGP
 !
 address-family ipv4 unicast
  network 10.1.1.1/32 label-index 1
  network 10.1.1.2/32 label-index 2
  network 10.1.1.3/32 label-index 3
  network 10.1.1.4/32 label-index 4
  network 10.1.1.5/32 label-index 5
 exit-address-family
 !
 !
 address-family ipv4 labeled-unicast
  neighbor EBGP activate
 exit-address-family
!
mpls label global-block 100 200
!
line vty
!

 

Configure Segment Routing

...