BGP dynamic routing

BGP dynamic routing

BGP dynamic routing enables advertisement of self-service (private) network prefixes to physical network devices that support BGP such as routers, thus removing the conventional dependency on static routes. The feature relies on address scopes and requires knowledge of their operation for proper deployment.

BGP dynamic routing consists of a service plug-in and an agent. The service plug-in implements the Networking service extension and the agent manages BGP peering sessions. A cloud administrator creates and configures a BGP speaker using the CLI or API and manually schedules it to one or more hosts running the agent. Agents can reside on hosts with or without other Networking service agents. Prefix advertisement depends on the binding of external networks to a BGP speaker and the address scope of external and internal IP address ranges or subnets.

BGP dynamic routing overview

Note

Although self-service networks generally use private IP address ranges (RFC1918) for IPv4 subnets, BGP dynamic routing can advertise any IPv4 address ranges.

Example configuration

The example configuration involves the following components:

  • One BGP agent.
  • One address scope containing IP address range 203.0.113.0/24 for provider networks, and IP address ranges 10.0.1.0/24 and 10.0.2.0/24 for self-service networks.
  • One provider network using IP address range 203.0.113.0/24.
  • Three self-service networks.
    • Self-service networks 1 and 2 use IP address ranges inside of the address scope.
    • Self-service network 3 uses a unique IP address range 10.0.3.0/24 to demonstrate that the BGP speaker does not advertise prefixes outside of address scopes.
  • Three routers. Each router connects one self-service network to the provider network.
    • Router 1 contains IP addresses 203.0.113.11 and 10.0.1.1.
    • Router 2 contains IP addresses 203.0.113.12 and 10.0.2.1.
    • Router 3 contains IP addresses 203.0.113.13 and 10.0.3.1.

Note

The example configuration assumes sufficient knowledge about the Networking service, routing, and BGP. For basic deployment of the Networking service, consult one of the Deployment examples. For more information on BGP, see RFC 4271.

Controller node

  • In the neutron.conf file, enable the conventional layer-3 and BGP dynamic routing service plug-ins:

    [DEFAULT]
    service_plugins = neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin,neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
    

Agent nodes

  • In the bgp_dragent.ini file:

    • Configure the driver.

      [BGP]
      bgp_speaker_driver = neutron_dynamic_routing.services.bgp.agent.driver.ryu.driver.RyuBgpDriver
      

      Note

      The agent currently only supports the Ryu BGP driver.

    • Configure the router ID.

      [BGP]
      bgp_router_id = ROUTER_ID
      

      Replace ROUTER_ID with a suitable unique 32-bit number, typically an IPv4 address on the host running the agent. For example, 192.0.2.2.

Verify service operation

  1. Source the administrative project credentials.

  2. Verify presence and operation of each BGP dynamic routing agent.

    $ neutron agent-list --agent-type=="BGP dynamic routing agent"
    +--------------------------------------+---------------------------+------------+-------------------+-------+----------------+---------------------------+
    | id                                   | agent_type                | host       | availability_zone | alive | admin_state_up | binary                    |
    +--------------------------------------+---------------------------+------------+-------------------+-------+----------------+---------------------------+
    | 37729181-2224-48d8-89ef-16eca8e2f77e | BGP dynamic routing agent | controller |                   | :-)   | True           | neutron-bgp-dragent       |
    +--------------------------------------+---------------------------+------------+-------------------+-------+----------------+---------------------------+
    

Create the address scope and subnet pools

  1. Create an address scope. The provider (external) and self-service networks must belong to the same address scope for the agent to advertise those self-service network prefixes.

    $ neutron address-scope-create --shared bgp 4
    Created a new address_scope:
    +------------+--------------------------------------+
    | Field      | Value                                |
    +------------+--------------------------------------+
    | id         | c02c358a-9d35-43ea-8313-986b3e4a91c0 |
    | ip_version | 4                                    |
    | name       | bgp                                  |
    | shared     | True                                 |
    | tenant_id  | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +------------+--------------------------------------+
    
  2. Create subnet pools. The provider and self-service networks use different pools.

    • Create the provider network pool.

      $ neutron subnetpool-create --pool-prefix 203.0.113.0/24 \
        --address-scope bgp provider
      Created a new subnetpool:
      +-------------------+--------------------------------------+
      | Field             | Value                                |
      +-------------------+--------------------------------------+
      | address_scope_id  | c02c358a-9d35-43ea-8313-986b3e4a91c0 |
      | created_at        | 2016-03-17T23:11:12                  |
      | default_prefixlen | 8                                    |
      | default_quota     |                                      |
      | description       |                                      |
      | id                | 3771c0e7-7096-46d3-a3bd-699c58e70259 |
      | ip_version        | 4                                    |
      | is_default        | False                                |
      | max_prefixlen     | 32                                   |
      | min_prefixlen     | 8                                    |
      | name              | provider                             |
      | prefixes          | 203.0.113.0/24                       |
      | shared            | False                                |
      | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
      | updated_at        | 2016-03-17T23:11:12                  |
      +-------------------+--------------------------------------+
      
    • Create the self-service network pool.

      $ neutron subnetpool-create --pool-prefix 10.0.1.0/24 \
        --pool-prefix 10.0.2.0/24 --address-scope bgp \
        --shared selfservice
      Created a new subnetpool:
      +-------------------+--------------------------------------+
      | Field             | Value                                |
      +-------------------+--------------------------------------+
      | address_scope_id  | c02c358a-9d35-43ea-8313-986b3e4a91c0 |
      | created_at        | 2016-03-17T23:11:51                  |
      | default_prefixlen | 8                                    |
      | default_quota     |                                      |
      | description       |                                      |
      | id                | c7e9737a-cfd3-45b5-a861-d1cee1135a92 |
      | ip_version        | 4                                    |
      | is_default        | False                                |
      | max_prefixlen     | 32                                   |
      | min_prefixlen     | 8                                    |
      | name              | selfservice                          |
      | prefixes          | 10.0.1.0/24                          |
      |                   | 10.0.2.0/24                          |
      | shared            | True                                 |
      | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
      | updated_at        | 2016-03-17T23:11:51                  |
      +-------------------+--------------------------------------+
      

Create the provider and self-service networks

  1. Create the provider network.

    $ neutron net-create --router:external True --provider:physical_network provider \
      --provider:network_type flat provider
    Created a new network:
    +---------------------------+--------------------------------------+
    | Field                     | Value                                |
    +---------------------------+--------------------------------------+
    | admin_state_up            | True                                 |
    | id                        | 68ec148c-181f-4656-8334-8f4eb148689d |
    | name                      | provider                             |
    | provider:network_type     | flat                                 |
    | provider:physical_network | provider                             |
    | provider:segmentation_id  |                                      |
    | router:external           | True                                 |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tenant_id                 | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +---------------------------+--------------------------------------+
    
  2. Create a subnet on the provider network using an IP address range from the provider subnet pool.

    $ neutron subnet-create --name provider --subnetpool provider \
      --prefixlen 24 --allocation-pool start=203.0.113.11,end=203.0.113.254 \
      --gateway 203.0.113.1 provider
    Created a new subnet:
    +-------------------+---------------------------------------------------+
    | Field             | Value                                             |
    +-------------------+---------------------------------------------------+
    | allocation_pools  | {"start": "203.0.113.11", "end": "203.0.113.254"} |
    | cidr              | 203.0.113.0/24                                    |
    | created_at        | 2016-03-17T23:17:16                               |
    | description       |                                                   |
    | dns_nameservers   |                                                   |
    | enable_dhcp       | True                                              |
    | gateway_ip        | 203.0.113.1                                       |
    | host_routes       |                                                   |
    | id                | 8ed65d41-2b2a-4f3a-9f92-45adb266e01a              |
    | ip_version        | 4                                                 |
    | ipv6_address_mode |                                                   |
    | ipv6_ra_mode      |                                                   |
    | name              | provider                                          |
    | network_id        | 68ec148c-181f-4656-8334-8f4eb148689d              |
    | subnetpool_id     | 3771c0e7-7096-46d3-a3bd-699c58e70259              |
    | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d                  |
    | updated_at        | 2016-03-17T23:17:16                               |
    +-------------------+---------------------------------------------------+
    

    Note

    The IP address allocation pool starting at .11 improves clarity of the diagrams. You can safely omit it.

  3. Create the self-service networks.

    $ neutron net-create selfservice1
    Created a new network:
    +---------------------------+--------------------------------------+
    | Field                     | Value                                |
    +---------------------------+--------------------------------------+
    | admin_state_up            | True                                 |
    | id                        | be79de1e-5f56-11e6-9dfb-233e41cec48c |
    | name                      | selfservice1                         |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tenant_id                 | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +---------------------------+--------------------------------------+
    
    $ neutron net-create selfservice2
    Created a new network:
    +---------------------------+--------------------------------------+
    | Field                     | Value                                |
    +---------------------------+--------------------------------------+
    | admin_state_up            | True                                 |
    | id                        | c1fd9846-5f56-11e6-a8ac-0f998d9cc0a2 |
    | name                      | selfservice2                         |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tenant_id                 | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +---------------------------+--------------------------------------+
    
    $ neutron net-create selfservice3
    Created a new network:
    +---------------------------+--------------------------------------+
    | Field                     | Value                                |
    +---------------------------+--------------------------------------+
    | admin_state_up            | True                                 |
    | id                        | c283dc1c-5f56-11e6-bfb6-efc30e1eb73b |
    | name                      | selfservice3                         |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tenant_id                 | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +---------------------------+--------------------------------------+
    
  4. Create a subnet on the first two self-service networks using an IP address range from the self-service subnet pool.

    $ neutron subnet-create --name selfservice1 --subnetpool selfservice \
      --prefixlen 24 selfservice1
    Created a new subnet:
    +-------------------+--------------------------------------------+
    | Field             | Value                                      |
    +-------------------+--------------------------------------------+
    | allocation_pools  | {"start": "10.0.1.2", "end": "10.0.1.254"} |
    | cidr              | 10.0.1.0/24                                |
    | created_at        | 2016-03-17T23:20:20                        |
    | description       |                                            |
    | dns_nameservers   |                                            |
    | enable_dhcp       | True                                       |
    | gateway_ip        | 10.0.1.1                                   |
    | host_routes       |                                            |
    | id                | 8edd3dc2-df40-4d71-816e-a4586d61c809       |
    | ip_version        | 4                                          |
    | ipv6_address_mode |                                            |
    | ipv6_ra_mode      |                                            |
    | name              | selfservice1                               |
    | network_id        | be79de1e-5f56-11e6-9dfb-233e41cec48c       |
    | subnetpool_id     | c7e9737a-cfd3-45b5-a861-d1cee1135a92       |
    | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d           |
    | updated_at        | 2016-03-17T23:20:20                        |
    +-------------------+--------------------------------------------+
    
    $ neutron subnet-create --name selfservice2 --subnetpool selfservice \
      --prefixlen 24 selfservice2
    Created a new subnet:
    +-------------------+--------------------------------------------+
    | Field             | Value                                      |
    +-------------------+--------------------------------------------+
    | allocation_pools  | {"start": "10.0.2.2", "end": "10.0.2.254"} |
    | cidr              | 10.0.2.0/24                                |
    | created_at        | 2016-03-17T23:20:20                        |
    | description       |                                            |
    | dns_nameservers   |                                            |
    | enable_dhcp       | True                                       |
    | gateway_ip        | 10.0.2.1                                   |
    | host_routes       |                                            |
    | id                | 8edd3dc2-df40-4d71-816e-a4586d61c809       |
    | ip_version        | 4                                          |
    | ipv6_address_mode |                                            |
    | ipv6_ra_mode      |                                            |
    | name              | selfservice2                               |
    | network_id        | c1fd9846-5f56-11e6-a8ac-0f998d9cc0a2       |
    | subnetpool_id     | c7e9737a-cfd3-45b5-a861-d1cee1135a92       |
    | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d           |
    | updated_at        | 2016-03-17T23:20:20                        |
    +-------------------+--------------------------------------------+
    
  5. Create a subnet on the last self-service network using an IP address range outside of the address scope.

    $ neutron subnet-create --name subnet3 selfservice3 10.0.3.0/24
    Created a new subnet:
    +-------------------+--------------------------------------------+
    | Field             | Value                                      |
    +-------------------+--------------------------------------------+
    | allocation_pools  | {"start": "10.0.3.2", "end": "10.0.3.254"} |
    | cidr              | 10.0.3.0/24                                |
    | created_at        | 2016-03-17T23:20:20                        |
    | description       |                                            |
    | dns_nameservers   |                                            |
    | enable_dhcp       | True                                       |
    | gateway_ip        | 10.0.3.1                                   |
    | host_routes       |                                            |
    | id                | cd9f9156-5f59-11e6-aeec-172ec7ee939a       |
    | ip_version        | 4                                          |
    | ipv6_address_mode |                                            |
    | ipv6_ra_mode      |                                            |
    | name              | selfservice3                               |
    | network_id        | c283dc1c-5f56-11e6-bfb6-efc30e1eb73b       |
    | subnetpool_id     |                                            |
    | tenant_id         | b3ac05ef10bf441fbf4aa17f16ae1e6d           |
    | updated_at        | 2016-03-17T23:20:20                        |
    +-------------------+--------------------------------------------+
    

Create and configure the routers

  1. Create the routers.

    $ neutron router-create router1
    +-----------------------+--------------------------------------+
    | Field                 | Value                                |
    +-----------------------+--------------------------------------+
    | admin_state_up        | True                                 |
    | external_gateway_info |                                      |
    | id                    | 3f6f4ef8-63be-11e6-bbb3-2fbcef363ab8 |
    | name                  | router1                              |
    | status                | ACTIVE                               |
    | tenant_id             | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------+--------------------------------------+
    
    $ neutron router-create router2
    +-----------------------+--------------------------------------+
    | Field                 | Value                                |
    +-----------------------+--------------------------------------+
    | admin_state_up        | True                                 |
    | external_gateway_info |                                      |
    | id                    | 3fd21a60-63be-11e6-9c95-5714c208c499 |
    | name                  | router1                              |
    | status                | ACTIVE                               |
    | tenant_id             | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------+--------------------------------------+
    
    $ neutron router-create router3
    +-----------------------+--------------------------------------+
    | Field                 | Value                                |
    +-----------------------+--------------------------------------+
    | admin_state_up        | True                                 |
    | external_gateway_info |                                      |
    | id                    | 40069a4c-63be-11e6-9ecc-e37c1eaa7e84 |
    | name                  | router1                              |
    | status                | ACTIVE                               |
    | tenant_id             | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------+--------------------------------------+
    
  2. For each router, add one self-service subnet as an interface on the router.

    $ neutron router-interface-add router1 selfservice1
    Added interface 90e3880a-5f5c-11e6-914c-9f3e20c8c151 to router router1.
    
    $ neutron router-interface-add router2 selfservice2
    Added interface 91628362-5f5c-11e6-826a-7322fb03a821 to router router2.
    
    $ neutron router-interface-add router3 selfservice3
    Added interface 91d51044-5f5c-11e6-bf55-ffd180541cc2 to router router3.
    
  3. Add the provider network as a gateway on each router.

    $ neutron router-gateway-set router1 provider
    Set gateway for router router1
    
    $ neutron router-gateway-set router2 provider
    Set gateway for router router2
    
    $ neutron router-gateway-set router3 provider
    Set gateway for router router3
    

Create and configure the BGP speaker

The BGP speaker advertises the next-hop IP address for eligible self-service networks and floating IP addresses for instances using those networks.

  1. Create the BGP speaker.

    $ neutron bgp-speaker-create --ip-version 4 \
      --local-as LOCAL_AS bgpspeaker
    Created a new bgp_speaker:
    +-----------------------------------+--------------------------------------+
    | Field                             | Value                                |
    +-----------------------------------+--------------------------------------+
    | advertise_floating_ip_host_routes | True                                 |
    | advertise_tenant_networks         | True                                 |
    | id                                | 5f227f14-4f46-4eca-9524-fc5a1eabc358 |
    | ip_version                        | 4                                    |
    | local_as                          | 1234                                 |
    | name                              | bgpspeaker                           |
    | networks                          |                                      |
    | peers                             |                                      |
    | tenant_id                         | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------------------+--------------------------------------+
    

    Replace LOCAL_AS with an appropriate local autonomous system number. The example configuration uses AS 1234.

  2. A BGP speaker requires association with a provider network to determine eligible prefixes. The association builds a list of all virtual routers with gateways on provider and self-service networks in the same address scope so the BGP speaker can advertise self-service network prefixes with the corresponding router as the next-hop IP address. Associate the BGP speaker with the provider network.

    $ neutron bgp-speaker-network-add bgpspeaker provider
    Added network provider to BGP speaker bgpspeaker.
    
  3. Verify association of the provider network with the BGP speaker.

    $ neutron bgp-speaker-show bgpspeaker
    +-----------------------------------+--------------------------------------+
    | Field                             | Value                                |
    +-----------------------------------+--------------------------------------+
    | advertise_floating_ip_host_routes | True                                 |
    | advertise_tenant_networks         | True                                 |
    | id                                | 5f227f14-4f46-4eca-9524-fc5a1eabc358 |
    | ip_version                        | 4                                    |
    | local_as                          | 1234                                 |
    | name                              | bgpspeaker                           |
    | networks                          | 68ec148c-181f-4656-8334-8f4eb148689d |
    | peers                             |                                      |
    | tenant_id                         | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------------------+--------------------------------------+
    
  4. Verify the prefixes and next-hop IP addresses that the BGP speaker advertises.

    $ neutron bgp-speaker-advertiseroute-list bgpspeaker
    +-------------+--------------+
    | destination | next_hop     |
    +-------------+--------------+
    | 10.0.1.0/24 | 203.0.113.11 |
    | 10.0.2.0/24 | 203.0.113.12 |
    +-------------+--------------+
    
  5. Create a BGP peer.

    $ neutron bgp-peer-create --peer-ip 192.0.2.1 \
      --remote-as REMOTE_AS bgppeer
    Created a new bgp_peer:
    +-----------+--------------------------------------+
    | Field     | Value                                |
    +-----------+--------------------------------------+
    | auth_type | none                                 |
    | id        | 35c89ca0-ac5a-4298-a815-0b073c2362e9 |
    | name      | bgppeer                              |
    | peer_ip   | 192.0.2.1                            |
    | remote_as | 4321                                 |
    | tenant_id | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------+--------------------------------------+
    

    Replace REMOTE_AS with an appropriate remote autonomous system number. The example configuration uses AS 4321 which triggers EBGP peering.

    Note

    The host containing the BGP agent must have layer-3 connectivity to the provider router.

  6. Add a BGP peer to the BGP speaker.

    $ neutron bgp-speaker-peer-add bgpspeaker bgppeer
    Added BGP peer bgppeer to BGP speaker bgpspeaker.
    
  7. Verify addition of the BGP peer to the BGP speaker.

    $ neutron bgp-speaker-show bgpspeaker
    +-----------------------------------+--------------------------------------+
    | Field                             | Value                                |
    +-----------------------------------+--------------------------------------+
    | advertise_floating_ip_host_routes | True                                 |
    | advertise_tenant_networks         | True                                 |
    | id                                | 5f227f14-4f46-4eca-9524-fc5a1eabc358 |
    | ip_version                        | 4                                    |
    | local_as                          | 1234                                 |
    | name                              | bgpspeaker                           |
    | networks                          | 68ec148c-181f-4656-8334-8f4eb148689d |
    | peers                             | 35c89ca0-ac5a-4298-a815-0b073c2362e9 |
    | tenant_id                         | b3ac05ef10bf441fbf4aa17f16ae1e6d     |
    +-----------------------------------+--------------------------------------+
    

    Note

    After creating a peering session, you cannot change the local or remote autonomous system numbers.

Schedule the BGP speaker to an agent

  1. Unlike most agents, BGP speakers require manual scheduling to an agent. BGP speakers only form peering sessions and begin prefix advertisement after scheduling to an agent. Schedule the BGP speaker to agent 37729181-2224-48d8-89ef-16eca8e2f77e.

    $ neutron bgp-dragent-speaker-add 37729181-2224-48d8-89ef-16eca8e2f77e bgpspeaker
    Associated BGP speaker bgpspeaker to the Dynamic Routing agent.
    
  2. Verify scheduling of the BGP speaker to the agent.

    $ neutron bgp-dragent-list-hosting-speaker bgpspeaker
    +--------------------------------------+------------+----------------+-------+
    | id                                   | host       | admin_state_up | alive |
    +--------------------------------------+------------+----------------+-------+
    | 37729181-2224-48d8-89ef-16eca8e2f77e | controller | True           | :-)   |
    +--------------------------------------+------------+----------------+-------+
    
    $ neutron bgp-speaker-list-on-dragent 37729181-2224-48d8-89ef-16eca8e2f77e
    +--------------------------------------+------------+----------+------------+
    | id                                   | name       | local_as | ip_version |
    +--------------------------------------+------------+----------+------------+
    | 5f227f14-4f46-4eca-9524-fc5a1eabc358 | bgpspeaker |     1234 |          4 |
    +--------------------------------------+------------+----------+------------+
    

Prefix advertisement

BGP dynamic routing advertises prefixes for self-service networks and host routes for floating IP addresses.

Advertisement of a self-service network requires satisfying the following conditions:

  • The external and self-service network reside in the same address scope.
  • The router contains an interface on the self-service subnet and a gateway on the external network.
  • The BGP speaker associates with the external network that provides a gateway on the router.
  • The BGP speaker has the advertise_tenant_networks attribute set to True.
Example of prefix advertisements with self-service networks

Advertisement of a floating IP address requires satisfying the following conditions:

  • The router with the floating IP address binding contains a gateway on an external network with the BGP speaker association.
  • The BGP speaker has the advertise_floating_ip_host_routes attribute set to True.
Example of prefix advertisements with floating IP addresses

Operation with Distributed Virtual Routers (DVR)

In deployments using DVR, the BGP speaker advertises floating IP addresses and self-service networks differently. For floating IP addresses, the BGP speaker advertises the floating IP agent gateway on the corresponding compute node as the next-hop IP address. For self-service networks using SNAT, the BGP speaker advertises the DVR SNAT node as the next-hop IP address.

For example, consider the following components:

  1. A provider network using IP address range 203.0.113.0/24, and supporting floating IP addresses 203.0.113.101, 203.0.113.102, and 203.0.113.103.
  2. A self-service network using IP address range 10.0.1.0/24.
  3. The SNAT gateway resides on 203.0.113.11.
  4. The floating IP agent gateways (one per compute node) reside on 203.0.113.12, 203.0.113.13, and 203.0.113.14.
  5. Three instances, one per compute node, each with a floating IP address.
$ neutron bgp-speaker-advertiseroute-list bgpspeaker
+------------------+--------------+
| destination      | next_hop     |
+------------------+--------------+
| 10.0.1.0/24      | 203.0.113.11 |
| 203.0.113.101/32 | 203.0.113.12 |
| 203.0.113.102/32 | 203.0.113.13 |
| 203.0.113.103/32 | 203.0.113.14 |
+------------------+--------------+

Note

DVR lacks support for routing directly to a fixed IP address via the floating IP agent gateway port and thus prevents the BGP speaker from advertising fixed IP addresses.

You can also identify floating IP agent gateways in your environment to assist with verifying operation of the BGP speaker.

$ neutron port-list --device_owner="network:floatingip_agent_gateway"
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                                              |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------------------------+
| 87cf2970-4970-462e-939e-00e808295dfa |      | fa:16:3e:7c:68:e3 | {"subnet_id": "8ed65d41-2b2a-4f3a-9f92-45adb266e01a", "ip_address": "203.0.113.12"}                    |
| 8d218440-0d2e-49d0-8a7b-3266a6146dc1 |      | fa:16:3e:9d:78:cf | {"subnet_id": "8ed65d41-2b2a-4f3a-9f92-45adb266e01a", "ip_address": "203.0.113.13"}                    |
| 87cf2970-4970-462e-939e-00e802281dfa |      | fa:16:3e:6b:18:e0 | {"subnet_id": "8ed65d41-2b2a-4f3a-9f92-45adb266e01a", "ip_address": "203.0.113.14"}                    |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------------------------+

IPv6

BGP dynamic routing supports peering via IPv6 and advertising IPv6 prefixes.

  • To enable peering via IPv6, create a BGP peer and use an IPv6 address for peer_ip.
  • To enable advertising IPv6 prefixes, create an address scope with ip_version=6 and a BGP speaker with ip_version=6.

Note

DVR with IPv6 functions similarly to DVR with IPv4.

High availability

BGP dynamic routing supports scheduling a BGP speaker to multiple agents which effectively multiplies prefix advertisements to the same peer. If an agent fails, the peer continues to receive advertisements from one or more operational agents.

  1. Show available dynamic routing agents.

    $ neutron agent-list --agent-type=="BGP dynamic routing agent"
    +--------------------------------------+---------------------------+----------+-------------------+-------+----------------+---------------------------+
    | id                                   | agent_type                | host     | availability_zone | alive | admin_state_up | binary                    |
    +--------------------------------------+---------------------------+----------+-------------------+-------+----------------+---------------------------+
    | 37729181-2224-48d8-89ef-16eca8e2f77e | BGP dynamic routing agent | bgp-ha1  |                   | :-)   | True           | neutron-bgp-dragent       |
    | 1a2d33bb-9321-30a2-76ab-22eff3d2f56a | BGP dynamic routing agent | bgp-ha2  |                   | :-)   | True           | neutron-bgp-dragent       |
    +--------------------------------------+---------------------------+----------+-------------------+-------+----------------+---------------------------+
    
  2. Schedule BGP speaker to multiple agents.

    $ neutron bgp-dragent-speaker-add 37729181-2224-48d8-89ef-16eca8e2f77e bgpspeaker
    Associated BGP speaker bgpspeaker to the Dynamic Routing agent.
    
    $ neutron bgp-dragent-speaker-add 1a2d33bb-9321-30a2-76ab-22eff3d2f56a bgpspeaker
    Associated BGP speaker bgpspeaker to the Dynamic Routing agent.
    
    $ neutron bgp-dragent-list-hosting-speaker bgpspeaker
    +--------------------------------------+---------+----------------+-------+
    | id                                   | host    | admin_state_up | alive |
    +--------------------------------------+---------+----------------+-------+
    | 37729181-2224-48d8-89ef-16eca8e2f77e | bgp-ha1 | True           | :-)   |
    | 1a2d33bb-9321-30a2-76ab-22eff3d2f56a | bgp-ha2 | True           | :-)   |
    +--------------------------------------+---------+----------------+-------+
    
    $ neutron bgp-speaker-list-on-dragent 37729181-2224-48d8-89ef-16eca8e2f77e
    +--------------------------------------+------------+----------+------------+
    | id                                   | name       | local_as | ip_version |
    +--------------------------------------+------------+----------+------------+
    | 5f227f14-4f46-4eca-9524-fc5a1eabc358 | bgpspeaker |     1234 |          4 |
    +--------------------------------------+------------+----------+------------+
    
    $ neutron bgp-speaker-list-on-dragent 1a2d33bb-9321-30a2-76ab-22eff3d2f56a
    +--------------------------------------+------------+----------+------------+
    | id                                   | name       | local_as | ip_version |
    +--------------------------------------+------------+----------+------------+
    | 5f227f14-4f46-4eca-9524-fc5a1eabc358 | bgpspeaker |     1234 |          4 |
    +--------------------------------------+------------+----------+------------+
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.