首页 > 网络 > 云计算 >

OpenStack网络指南(12)BGP动态路由

2016-12-29

BGP动态路由使得能够向支持BGP的物理网络设备(例如路由器)通告自助服务(专用)网络前缀,从而消除对静态路由的常规依赖。 该功能依赖于地址范围,并且需要知道其操作才能正确部署。

BGP动态路由使得能够向支持BGP的物理网络设备(例如路由器)通告自助服务(专用)网络前缀,从而消除对静态路由的常规依赖。 该功能依赖于地址范围,并且需要知道其操作才能正确部署。
BGP动态路由由服务插件和代理组成。 服务插件实现网络服务扩展,代理管理BGP对等会话。 云管理员使用CLI或API创建和配置BGP发言者,并将其手动调度到运行该代理的一个或多个主机。 代理可以驻留在具有或不具有其他网络服务代理的主机上。 前缀通告取决于外部网络与BGP发言者的绑定以及外部和内部IP地址范围或子网的地址范围。
这里写图片描述

样例配置

示例配置包括以下组件
一个BGP代理。
一个地址范围包含供应商网络的IP地址范围203.0.113.0/24和自助服务网络的IP地址范围10.0.1.0/24和10.0.2.0/24。
一个提供商网络使用IP地址范围203.0.113.0/24。
三个自助服务网络。
自助服务网络1和2使用地址范围内的IP地址范围。
自助服务网络3使用唯一的IP地址范围10.0.3.0/24来演示BGP发言者不在地址范围之外发布前缀。
三个路由器。 每个路由器将一个自助服务网络连接到提供商网络。
路由器1包含IP地址203.0.113.11和10.0.1.1。
路由器2包含IP地址203.0.113.12和10.0.2.1。
路由器3包含IP地址203.0.113.13和10.0.3.1。

控制节点

在neutron.conf文件中,启用传统的第3层和BGP动态路由服务插件:

[DEFAULT]
service_plugins = router,bgp

代理节点

在bgp_dragent.ini中:

[BGP]
bgp_speaker_driver = neutron.services.bgp.driver.ryu.driver.RyuBgpDriver
[BGP]
bgp_router_id = ROUTER_ID

将ROUTER_ID替换为合适的唯一32位数字,通常是运行代理程序的主机上的IPv4地址。 例如,192.0.2.2。

验证服务操作

1.源管理项目凭据。
2.验证每个BGP动态路由代理的存在和操作。

$ 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       |
+--------------------------------------+---------------------------+------------+-------------------+-------+----------------+---------------------------+

创建地址范围和子网池

1.创建地址范围。 提供商(外部)和自助服务网络必须属于相同的地址范围,供代理公布那些自助服务网络前缀。

$ 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.创建子网池,提供商和自服务网络使用不同的子网池。

$ 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                  |
+-------------------+--------------------------------------+
$ 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                  |
+-------------------+--------------------------------------+

创建提供商和自服务网络

1.创建提供商网络

$ 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.使用提供商子网池的IP地址范围创建提供商网络

$ 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                               |
+-------------------+---------------------------------------------------+

3.创建自服务网络

$ 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.使用自助服务子网池中的IP地址范围在前两个自服务网络上创建子网。

$ 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.使用超出地址范围的IP地址范围在最后一个自助服务网络上创建子网。

$ 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                        |
+-------------------+--------------------------------------------+

创建和配置路由器

1.创建路由器

$ 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.对于每个路由器,在路由器上添加一个自助服务子网作为接口。

$ 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.给每个路由添加一个提供商网络作为网关

$ 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

创建配置BGP发言者

BGP发言者通告合格的自服务网络的下一跳IP地址和使用这些网络的实例的浮动IP地址。
1.创建BGP发言者

$ 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     |
+-----------------------------------+--------------------------------------+

将LOCAL_AS替换为适当的本地自治系统编号。

2.BGP发言者需要与提供商网络关联以确定合适的前缀。 该关联建立了在相同地址范围内的提供商和自助服务网络上的具有网关的所有虚拟路由器的列表,使得BGP发言者可以将与对应路由器的自助服务网络前缀作为下一跳IP地址来通告。 将BGP发言者与提供商网络相关联。

$ neutron bgp-speaker-network-add bgpspeaker provider
Added network provider to BGP speaker bgpspeaker.

3.验证自服务网络和BGP发言者

$ 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.验证BGP发言者发布的前缀和下一跳IP地址。

$ 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.创建BGP对等体。

$ 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     |
+-----------+--------------------------------------+

将REMOTE_AS替换为适当的远程自主系统编号。

包含BGP代理的主机必须具有到提供商路由器的第3层连接。

6.添加BGP对等体到BGP发言者

$ neutron bgp-speaker-peer-add bgpspeaker bgppeer
Added BGP peer bgppeer to BGP speaker bgpspeaker.

7.验证BGP对等体添加到BGP发言者

$ 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     |
+-----------------------------------+--------------------------------------+

将BGP发言者调度到代理

1.与大多数代理不同,BGP扬声器需要手动调度代理。 BGP发言者只形成对等会话,并在调度到代理之后开始前缀广告。 将BGP发言者调度到代理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.验证调度BGP发言者到代理

$ 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 |
+--------------------------------------+------------+----------+------------+

前缀广播

BGP动态路由通告自助服务网络的前缀和浮动IP地址的主机路由。
自助服务网络的广告需要满足以下条件:
- 外部和自助服务网络驻留在相同的地址范围内。
- 路由器包含自助服务子网上的接口和外部网络上的网关。
- BGP发言者与在路由器上提供网关的外部网络相关联。
- BGP发言者将advertise_tenant_networks属性设置为True。
这里写图片描述
广播浮动IP地址需要满足以下条件:
具有浮动IP地址绑定的路由器在外部网络上包含具有BGP扬声器关联的网关。
BGP发言者将advertise_floating_ip_host_routes属性设置为True。
这里写图片描述

使用分布式虚拟路由器(DVR)

在使用DVR的部署中,BGP发言者以不同的方式通告浮动IP地址和自助服务网络。 对于浮动IP地址,BGP发言者通告对应计算节点上的浮动IP代理网关作为下一跳IP地址。 对于使用SNAT的自助服务网络,BGP发言者通告DVR SNAT节点为下一跳IP地址。
例如,考虑以下组件:
1.使用IP地址范围203.0.113.0/24,支持浮动IP地址203.0.113.101,203.0.113.102和203.0.113.103的提供商网络。
2.使用IP地址范围10.0.1.0/24的自助服务网络。
3.SNAT网关驻留在203.0.113.11。
4.浮动IP代理网关(每个计算节点一个)驻留在203.0.113.12,203.0.113.13和203.0.113.14上。
5.三个实例,每个计算节点一个,每个都有一个浮动IP地址。

$ 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 |
+------------------+--------------+

DVR不支持通过浮动IP代理网关端口直接路由到固定IP地址,从而防止BGP扬声器通告固定的IP地址。

您还可以识别您的环境中的浮动IP代理网关,以帮助验证BGP扬声器的操作。

$ 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动态路由支持通过IPv6进行对等和通告IPv6前缀。
要通过IPv6启用对等,请创建BGP对等体并对peer_ip使用IPv6地址。
要启用广告IPv6前缀,请使用ip_version = 6创建地址范围,并使用ip_version = 6创建BGP扬声器。

高可用性

BGP动态路由支持将BGP发言者调度到多个代理,这有效地将前缀通告倍增到同一对等体。 如果代理失败,则对等体继续从一个或多个操作代理接收广告。
1.展示可用动态路由代理

$ 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       |
+--------------------------------------+---------------------------+----------+-------------------+-------+----------------+---------------------------+

调度BGP发言者到多代理

$ 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 |
+--------------------------------------+------------+----------+------------+
相关文章
最新文章
热点推荐