This is the documentation for the v21.03 version. Looking for the documentation of the latest version? Have a look here.

BGP Example with Loopback

BGP on TNSR can also be used with loopback interfaces for more advanced routing scenarios. Using a loopback for a BGP update source allows the path to the routing peer to be handled in some other way. It may be static, or it may involve multiple paths to the peer, for example.

This scenario is based on the previous example, but uses a loopback interface for the update source.

Configure Loopback

First, setup the loopback interface and address:

tnsr(config)# interface loopback bgploop
tnsr(config-loopback)# instance 1
tnsr(config-loopback)# exit
tnsr(config)# interface loop1
tnsr(config-interface)# ip address
tnsr(config-interface)# enable
tnsr(config-interface)# exit

Since the loopback is not on an interface, the address must be routed to TNSR somehow. This could be an address in a routed block, or there could be another method of handling routes between the peers.

Route to Peer

Likewise, TNSR must know how to reach the remote peer,, which in this case the example also assumes is a loopback address configured in a similar manner. In this example, the peer is reachable at which is in a network directly connected to TenGigabitEthernet6/0/0. For simplicity, this will only be a static route:

tnsr(config)# route table ipv4-VRF:0
tnsr(config-route-table)# route
tnsr(config-rttbl4-next-hop)# next-hop 0 via

Setup BGP with Loopback Address

Now setup the BGP service, using the new neighbor address and with the loopback address as an update source:

tnsr(config)# route dynamic bgp
tnsr(config-frr-bgp)# server vrf default
tnsr(config-bgp)# as-number 65002
tnsr(config-bgp)# router-id
tnsr(config-bgp)# neighbor
tnsr(config-bgp-neighbor)# remote-as 65005
tnsr(config-bgp-neighbor)# update-source
tnsr(config-bgp-neighbor)# enable
tnsr(config-bgp-neighbor)# exit
tnsr(config-bgp)# address-family ipv4 unicast
tnsr(config-bgp-ip4uni)# network
tnsr(config-bgp-ip4uni)# exit
tnsr(config-bgp)# exit
tnsr(config-frr-bgp)# enable
tnsr(config-frr-bgp)# exit