This section explains how to configure VRF with BGP peers.

Consider an example where VS1 is a BGP-virtual service with a VSVIP vs1-vsvsip. Global VRF has one peer without any labels.

To enable selective VIP advertisement, add label Peer1 for the Peer, and add the Peer 1 label in VsVip.bgp_peer_labels.

Configuring VRF with BGP Peers

The following are the steps to configure BGP peer labels, from the Avi Load Balancer UI:

  1. Navigate to Infrastructure > Cloud Resources > VRF Context. Click CREATE.

  2. In the BGP Peering tab, select Enable BGP Peering check box to specify BGP related details, such as,

    1. BGP Autonomous System ID

    2. BGP Peer Type

    3. Keepalive Intervals for peers

    4. Hold Time for peers

    5. Local Preference to be used for routes advertised.

    6. Number of AS-Path Prepend- Number of times the local AS must be considered.

  3. Under Routing Options section, click ADD. Enter the Label used for advertisement of routes to this peer.

  4. Under Subnets click ADD to add the Gateway Subnet and Next Hop.

  5. Under Peers, click ADD. Select the Advertise VIP to Peer check box.



  6. Click SAVE.

Alternatively, BGP peer can be configured using the CLI as shown below:

configure vrfcontext global
Updating an existing object. Currently, the object is:
+----------------------------+------------------------------------------+
| Field                      | Value                                                        |
+----------------------------+------------------------------------------+
| uuid                       | vrfcontext-a1c097dd-f58e-45ca-b90a-6de72a4fd19d              |
| name                       | global                                                       |
| bgp_profile                |                                                              |
|   local_as                 | 65000                                                        |
|   ibgp                     | True                                                         |
|   peers[1]                 |                                                              |
|     remote_as              | 65000                                                        |
|     peer_ip                | 10.10.114.19/24                                              |
|     subnet                 | 10.10.114.0/24                                               |
|     bfd                    | True                                                         |
|     network_ref            | vxw-dvs-34-virtualwire-15-sid-1060014-blr-01-vc06-avi-dev010 |
|     advertise_vip          | True                                                         |
|     advertise_snat_ip      | True                                                         |
|     advertisement_interval | 5                                                            |
|     connect_timer          | 10                                                           |
|     ebgp_multihop          | 0                                                            |
|     shutdown               | False                                                        |
|   keepalive_interval       | 60                                                           |
|   hold_time                | 180                                                          |
|   send_community           | True                                                         |
|   shutdown                 | False                                                        |
| system_default             | True                                                         |
| lldp_enable                | True                                                         |
| tenant_ref                 | admin                                                        |
| cloud_ref                  | Default-Cloud                                                |
+----------------------------+------------------------------------------+
[admin:]: vrfcontext> bgp_profile
[admin:]: vrfcontext:bgp_profile> peers index 1
[admin:]: vrfcontext:bgp_profile:peers> label Peer1
[admin:]: vrfcontext:bgp_profile:peers> save
[admin:]: vrfcontext:bgp_profile> save
[admin:]: vrfcontext> save

Configuring VSVIP 1 through UI

Navigate to Applications > VSVIPs and click CREATE. You can select BGP peer labels for VSVIP advertisement.



Configuring VSVIP 1 through CLI

BGP Peer labels can be configured in the VSVIP using the CLI as shown below:

configure vsvip vs1-vsvip
Updating an existing object. Currently, the object is:
+-----------------------------+--------------------------------------------+
| Field                       | Value                                      |
+-----------------------------+--------------------------------------------+
| uuid                        | vsvip-0cab1bbb-d474-4365-8ba4-9d6a3f0add34 |
| name                        | vs1-vsvip                                  |
| vip[1]                      |                                            |
|   vip_id                    | 0                                          |
|   ip_address                | 1.1.1.1                                    |
|   enabled                   | True                                       |
|   auto_allocate_ip          | False                                      |
|   auto_allocate_floating_ip | False                                      |
|   avi_allocated_vip         | False                                      |
|   avi_allocated_fip         | False                                      |
|   auto_allocate_ip_type     | V4_ONLY                                    |
|   prefix_length             | 32                                         |
| vrf_context_ref             | global                                     |
| east_west_placement         | False                                      |
| tenant_ref                  | admin                                      |
| cloud_ref                   | Default-Cloud                              |
+-----------------------------+--------------------------------------------+
[admin:]: vsvip> bgp_peer_labels Peer1
[admin:]: vsvip> save

Caveats

  • This feature is only applicable to BGP-virtual services. For virtual services that do not use BGP, the field bgp_peer_labels cannot be enabled.

  • When selective VIP advertisement is configured, the option use_vip_as_snat cannot be enabled.