Multihop BGP

Overview

Avi Vantage supports multihop BGP. A plain peer configuration is supported in all its variations, including iBGP multihop.

This article explains the following:

  • eBGP multihop: BGP peers are more than one hop away and in a different autonomous system. BGP peers are not directly connected.
  • iBGP multihop: BGP peers are in the same autonomous system but more than one hop away.


Note: This feature is supported for IPv6 in Avi Vantage.

Configuring eBGP

To configure eBGP multihop, a per-peer configuration parameter, i.e., ebgp_multihop, specifies the number of next hops. The following are the two main configuration sections:

  • Configuring Avi Controller:
    • The eBGP-multihop peer. The multihop peer must be configured with the same subnet as that of the interface network.
    • Static/default route to reach the BGP peer
  • Configuring BGP peer and intermediate routers: Static or default route configuration on the Avi Controller, intermediate router, and BGP peer.

Configuring Avi Controller (Configuring eBGP-multihop Peer)

Using Avi CLI

  1. Peer Configuration — Enable BGP, set the following attributes:
    • AS – 65000
    • Type – eBGP
    • Remote AS – 1
    • BFD – Yes
    • Advertise VIP – Yes
    • Advertise SNAT – Yes

    Configuring Avi Controller. Use vrfcontext sub-mode to configure the required attributes.

    
    [admin-controller]: > configure vrfcontext global
    [admin:controller]: vrfcontext:bgp_profile> peers index 1
    [admin:controller]: vrfcontext:bgp_profile> peers ebgp_multihop 2
    [admin-controller]: vrfcontext:bgp_profile > peers peer_ip 10.116.0.1 subnet 10.115.0.0/16 md5_secret abcd
    [admin:controller]: vrfcontext:bgp_profile:peers> save
    [admin:controller]: vrfcontext:bgp_profile> save
    [admin:controller]: vrfcontext> save
    [admin:controller]: > 
    

    For detailed information on configuring BGP on Avi Vantage, refer to BGP Support for Scaling Virtual Services.

  2. The below diagram explains all the required configuration for configuring mulithop eBGP peer.

    ebgp multihop configuration


    Configure static route or default route to reach peer network (10.10.3.0/24) via router R1 (10.10.116.12). 10.10.3.0/24 next hop 10.10.116.12

  3. Configure two virtual service IP address:
    • VIP (10.10.116.88) is configured in the same subnet as the interface network (10.10.116.0/24).
    • VIP (10.10.226.88) is configured in some random subnet.

Using Avi UI

Login to Avi UI and navigate to Infrastructure > Routing > BGP Peering, provide the valur for BGP AS,and select the eBGP option.
Provide the value for BGP, IPv4 Prefix, IPv4 Peer, Remote AS, and Multihop as shown below.

ebgp

Configuring the BGP Peer (Router R2)

Multihop BGP peer (two hops away from the Avi SE) configured with the following static route to reach to SE network via router R1 for peering with the SE: 10.10.116.0/24 next hop 10.10.3.16 If no static route is specified, there needs to be some default route via which to reach SE interface network.

Configure the following additional neighbor configuration to peer with Avi SE which is two hops apart: neighbor 10.10.116.17 ebgp-multihop 2

VIP routes on the router R2 are learned as follows:

  • 10.10.116.88/32 next hop 10.10.3.16
  • 10.10.226.88/32 next hop 10.10.3.16

Configuration of the Intermediate Router(R1)

For VIP configured in a random subnet, intermediate router(s) need(s) to have static route (or some default route) configured to it as follows: 10.10.226.0/24 next hop 10.10.116.17

Configuring iBGP

A multihop iBGP configuration is similar to that of a normal iBGP peer. Once the proper peer placement subnet, peer IP and other details are provided, the Service Engine will initiate peering with the router.

Using Avi UI

Login to Avi UI and navigate to Infrastructure > Routing > BGP Peering.
Provide the value for BGP AS, IPv4 Prefix, and IPv4 Peer, and select iBGP as shown below.

ibgp

Using Avi CLI Configuration


[admin-controller]: > configure vrfcontext management
Multiple objects found for this query.
        [0]: vrfcontext-52d6cf4f-55fa-4f32-b774-9ed53f736902#management in tenant admin, Cloud AWS-Cloud
        [1]: vrfcontext-9ff610a4-98fa-4798-8ad9-498174fef333#management in tenant admin, Cloud Default-Cloud
Select one: 1
Updating an existing object. Currently, the object is:
+----------------+-------------------------------------------------+
| Field          | Value                                           |
+----------------+-------------------------------------------------+
| uuid           | vrfcontext-9ff610a4-98fa-4798-8ad9-498174fef333 |
| name           | management                                      |
| system_default | True                                            |
| tenant_ref     | admin                                           |
| cloud_ref      | Default-Cloud                                   |
+----------------+-------------------------------------------------+
[admin-controller]: >: vrfcontext > bgp_profile
[admin-controller]: >: vrfcontext:bgp_profile > local_as 100
[admin-controller]: >: vrfcontext:bgp_profile > ibgp
[admin-controller]: >: vrfcontext:bgp_profile > peers peer_ip 10.116.0.1 subnet 10.115.0.0/16 md5_secret abcd
: vrfcontext:bgp_profile:peers > save
: vrfcontext:bgp_profile > save
: vrfcontext > save