ESC HA アクティブ/スタンバイの BGP を設定するには、次の 2 つのオプションがあります。
-
BGP を使用した ESC HA アクティブ/スタンバイ L3 の直接起動
-
既存 ESC HA アクティブ/スタンバイペアからの POST 設定の使用
ESC HA アクティブ/スタンバイの BGP を設定するには、次のネットワークパラメータが必要です。
(注) |
ネイバーを使用して BGP ルータを設定し、再起動する必要があります。ルータがエニーキャスト IP に ping できることを確認します。
|
BGP ルータで、2 つのネイバーを設定します。次の BGP 設定は、Bird ルータ向けに設計されています。この設定は、ルータ固有です。ルータのタイプごとに、手順は異なります。
次の設定は、bootvm コマンドによって指定されます。protocol bgp E3 from EXABGP {
neighbor 198.18.42.222 as 65012;
}
protocol bgp E4 from EXABGP {
neighbor 198.18.61.222 as 65011;
}
BGP オプションを使用した ESC VM の起動[admin@na-test-52-1 ~]$ health.sh
============== ESC HA (ACTIVE) with DRBD =================
vimmanager (pgid 41908) is running
monitor (pgid 42067) is running
mona (pgid 42130) is running
drbd (pgid 38488) is active
snmp (pgid 2121) is running
etsi (pgid 43247) is running
pgsql (pgid 42566) is running
keepalived (pgid 40281) is running
portal (pgid 43307) is running
confd (pgid 25644) is running
filesystem (pgid 0) is running
escmanager (pgid 42775) is running
=======================================
ESC HEALTH PASSED
[admin@na-test-52-2 ~]$ health.sh
============== ESC HA (Standby) with DRBD =================
pgsql is stopped
vimmanager is stopped
monitor is stopped
mona is stopped
drbd (pgid 2471) is standby
etsi is disabled at startup
filesystem is stopped
snmp is disabled at startup
bgp is stopped
keepalived (pgid 2787) is running
portal is stopped
confd is stopped
escmanager is stopped
=======================================
ESC HEALTH PASSED
BGP POST 設定には次の値を使用します。
./bootvm.sh <NETWORK_VM_name> \
--image <ESC_image> \
--ipaddr <static_IP_address1> <IP_address2> <IP_address_3>\
--gateway_ip <gateway IP address of NETWORK> \
--net <net_id1> <net_id2> <net_id3> \
--network_params_file <network_params_file> \
--host_mapping_file <host_mapping_file> \
--avail_zone <openStack_zone> \
--ha_node_list <IP_address_ha_node_1> <IP_address_ha_node_2> \
--user_portal_pass <user>:<password> \
--user_rest_pass <user>:<password> \
--confd_aes_key <password> \
--kad_vif <interface> \
--user_confd_pass <user>:<password> \
--user_pass <user>:<password> \
--kad_vip <vip address> \
--bgp_remote_ip <BGP_remote_IP_address> \
--bgp_local_ip <BGP_local_IP_address> \
--bgp_local_as <BGP_local_AS_#> \
--bgp_remote_as <BGP_remote_AS_#>\
--bgp_local_router_id <local_BGP_reouter_id> \
--bgp_anycast_ip <BGP_anycast_IP> \
--bgp_md5 <BGP_MD5>
それぞれの説明は次のとおりです。
--ip_addr: ----> the local IP address of the ESC VM
--net: ----> the network id(s) in OpenStack that ESC will connect to.
--bgp_anycast_ip: ----> the IP address that NCS will communicate with
--bgp_remote_ip: ----> this IP address of the external router that ESC will peer with
--bgp_local_as: ----> local AS for the ESC "router"
--bgp_remote_as: ----> AS number for the external router ESC will peer with
--bgp_local_router_id: ----> id for the esc "router"
--bgp_md5: ----> optional - md5 to be used to pair with external router
BGP HA アクティブ/スタンバイ ポスト コンフィギュレーションの設定
-
HA のアクティブ/スタンバイインスタンスごとに、ネットワーク インターフェイス ファイルを作成します。
# cat /etc/sysconfig/network-scripts/ifcfg-lo:2
IPV6INIT='no'
IPADDR='10.0.124.124' <------------------ bgp anycast IP
BROADCAST='10.0.124.255'
NETWORK='10.0.124.0'
NETMASK='255.255.255.0'
DEVICE='lo:2'
ONBOOT='yes'
NAME='loopback'
-
HA のアクティブ/スタンバイインスタンスごとに、次のようにします。
Bring lo:2 up
# ifup lo:2
ESC HA アクティブ/スタンバイの BGP を設定するには、次に示すように、ESC 仮想マシンに escadm ツールを使用します。
$ sudo bash
# escadm bgp set --local_ip LOCAL_IP --anycast_ip ANYCAST_IP --remote_ip REMOTE_IP --local_as LOCAL_AS --remote_as REMOTE_AS
--local_router_id LOCAL_ROUTER_ID
# escadm reload
# reboot
例:[root@bgp-001 admin]# escadm bgp set --local_ip 198.18.42.124 --anycast_ip 10.0.124.124 --remote_ip 192.168.0.2 --local_as 65124 --remote_as 65000 --local_router_id 198.18.42.124
[root@bgp-002 admin]# escadm bgp set --local_ip 198.18.42.125 --anycast_ip 10.0.124.124 --remote_ip 192.168.0.2 --local_as 65114 --remote_as 65000 --local_router_id 198.18.42.125
BGP ルータの設定BGP ルータを設定するには、BGP ルータにログインして BGP エニーキャストルーティングを設定します。次のパラメータが必要です。
<Router_AS_#>
は上記の --bgp_remote_as と同様です<Esc_ip_address>
は、BGP アドバタイズメント用に設定された ESC VM の IP アドレスである必要があります。
<ESC_AS_#>
は上記の --bgp_local_as と同様ですconfigure
router bgp <Router_AS_#>
neighbor <ESC_IP_address>
remote-as <ESC_AS_#>
address-family ipv6 unicast
route-policy anycast-in in
route-policy anycast-out out
route-policy anycast-in
pass
end-policy
route-policy anycast-out
drop
end-policy
commit