To configure BGP for ESC HA Active/Standby, there are two options:
-
Directly booting ESC HA Active/Standby L3 with BGP
-
Using post configuration from existing ESC HA Active/Standby pair
To configure BGP for ESC HA Active/Standby, the following network parameters are required:
-
BGP remote IP
-
IP of the interface for BGP anycast routing
-
BGP local AS number for routing configuration
-
BGP remote AS number for routing configuration
-
BGP routing configuration
-
--bgp_local_ip
-
--bgp_local_router_id
Note |
You must configure BGP router with neighbors, and restart it. Verify that the router is able to ping the AnyCast IP.
|
On the BGP router, set two neighbors. The below BGP configuration is designed for Bird router. The configuration is router
specific. For each types of router, the procedure is different:
The below configurations are given according to the bootvm command :protocol bgp E3 from EXABGP {
neighbor 198.18.42.222 as 65012;
}
protocol bgp E4 from EXABGP {
neighbor 198.18.61.222 as 65011;
}
Booting an ESC VM with BGP options[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
Use below values for BGP post configuration:
./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>
Where,
--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
Configuring BGP HA Active/Standby Post Configuration
-
For each HA Active/Standby instance, create the network interface file:
# 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'
-
For each HA Active/Standby instance:
Bring lo:2 up
# ifup lo:2
To configure BGP for ESC HA Active/Standby, use the escadm tool in ESC Virtual Machine, as shown below:
$ 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
Example:[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
Configuring a BGP Router To configure a BGP router, log in to the BGP router to configure BGP Anycast routing. The required parameters are:
<Router_AS_#>
same as--bgp_remote_asabove<Esc_ip_address>
must be the ESC VM's IP address configured for BGP advertisement.
<ESC_AS_#>
same as--bgp_local_asshown aboveconfigure
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