Wednesday, June 3, 2020

Cumulus BGP Routing




This is a demo config that I did to set up BGP between cumulus routers.  I was having issues trying being able to ping a advertised network from BGP2 over to BGP1.  The network was advertising correctly but i just was not able to ping from BGP1 to the interface on BGP2.  After a while I found that i needed to advertise an interface on BGP1 so that BGP2 would know where to send back the reply. 

BGP2

cumulus@cumulus:~$ sudo cat /etc/network/interfaces
source /etc/network/interfaces.d/*.intf

auto eth0
iface eth0 inet dhcp

auto swp1
iface swp1
        bridge-vids 10
        bridge-stp on

auto swp3
iface swp3

auto swp5
iface swp5

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports swp1 swp3 swp5
        bridge-vids 10 300
        bridge-pvid 1
        bridge-stp on

auto bridge.10
iface bridge.10
        address 110.10.10.253/24

auto bridge.300
iface bridge.300
        address 130.100.100.253/24

auto bridge.500
iface bridge.500
        address 150.100.100.254/24

cumulus@cumulus:~$ sudo cat /etc/frr/frr.conf

router bgp 65101
 bgp router-id 150.100.100.254
 neighbor 110.10.10.254 remote-as external
 neighbor 130.100.100.254 remote-as 65103
 
 address-family ipv4 unicast
  network 150.100.100.0/24
 exit-address-family

cumulus@cumulus:~$

BGP4

cumulus@cumulus:~$ sudo cat /etc/network/interfaces

auto swp3
iface swp3

auto swp4
iface swp4
        bridge-vids 400
        bridge-stp on

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports swp3 swp4
        bridge-vids 300 400
        bridge-pvid 1
        bridge-stp on

auto bridge.300
iface bridge.300
        address 130.100.100.254/24

auto bridge.400
iface bridge.400
        address 140.100.100.254/24

cumulus@cumulus:~$ sudo cat /etc/frr/frr.conf

router bgp 65103
 bgp router-id 140.100.100.254
 neighbor 130.100.100.253 remote-as 65101
 neighbor 140.100.100.253 remote-as 65102

cumulus@cumulus:~$

BGP3

cumulus@cumulus:~$ sudo cat /etc/network/interfaces

auto swp1
iface swp1

auto swp2
iface swp2
         bridge-vids 100
         bridge-stp on

auto swp4
iface swp4
        bridge-vids 400
        bridge-stp on

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports swp2 swp4
        bridge-vids 100 400
        bridge-pvid 1
        bridge-stp on

auto bridge.100
iface bridge.100
        address 100.100.100.253/24

auto bridge.400
iface bridge.400
        address 140.100.100.253/24

auto bridge.600
iface bridge.600
        address 160.100.100.254/24
cumulus@cumulus:~$ sudo cat /etc/frr/fr

router bgp 65102
 bgp router-id 160.100.100.254
 neighbor 100.100.100.254 remote-as external
 neighbor 140.100.100.254 remote-as 65103
 
 address-family ipv4 unicast
  network 140.100.100.0/24
  network 160.100.100.0/24
 exit-address-family

cumulus@cumulus:~$

BGP1

cumulus@cumulus:~$ sudo cat /etc/network/interfaces

auto swp1
iface swp1
        bridge-vids 10
        bridge-stp on

auto swp2
iface swp2
        bridge-vids 100
        bridge-stp on

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports swp1 swp2
        bridge-vids 10 100
        bridge-pvid 1
        bridge-stp on

auto bridge.10
iface bridge.10
        address 110.10.10.254/24

auto bridge.100
iface bridge.100
        address 100.100.100.254/24

cumulus@cumulus:~$ sudo cat /etc/frr/frr.conf

router bgp 65000
 bgp router-id 100.100.100.254
 neighbor 100.100.100.253 remote-as external
 neighbor 110.10.10.253 remote-as external
 
 address-family ipv4 unicast
  network 100.100.100.0/24
 exit-address-family

line vty

cumulus@cumulus:~$