The BlueCat Edge Anycast Configuration Utility is designed to help you configure Service Point v3 instances to be added to an Anycast pool.
- On the computer you use to run the configuration utility, ensure that you are
running Python 3.6.5 or greater. In addition, the following Python
libraries must be installed:
- certifi==2018.8.24
- chardet==3.0.4
- future==0.16.0
- idna==2.7
- requests==2.20.0
- six==1.11.0
- urllib3==1.23
Refer to docs.python.org for more information.
- This computer should also have access to the Service Point v3 IP on port 443.
- Log in to the utility using your access key set credentials. Your user account must have administrative access.
Clone the repo and run the configuration utility
- In your browser, go to https://github.com/bluecatlabs/anycast-config-utility, and clone the anycast-config-utility repository.
- On a computer that can access the Service Point v3 IP (port 443), and that's running Python 3, connect to the configuration utility by running any of the commands in the step section under Staging and applying daemon configurations.
- When prompted to save your access key set credentials and the Service Point v3
hostname and IP, type Y. A Base64 encoded file named
.script_config is created in the same location as the anycast_config.py script.
This file stores the user information, including the credentials.
When you no longer need to use the utility, BlueCat recommends that you delete the .script_config file.
If you need to change your user credentials or connect to a different Service Point v3 instance, rename or delete .script_config and restart the configuration utility.
- Enter your client ID and secret access key, and the Service Point v3 hostname or IP address when prompted. Your account must have administrative access.
Staging and applying daemon configurations
- In the following steps, for <daemon>, valid options are zebra, bgpd, and ospfd.
- In the following steps, for <file>, valid configuration files are
zebra.conf, bgpd.conf, and
ospfd.conf.Note: The anycast configuration utility doesn't validate the content of the configuration files. You must ensure that the content conforms to a valid configuration format based on the zebra.conf, bgpd.conf, or ospfd.conf configuration.
- When specifying configuration files, provide the full path to the files if they aren't in the same location as the anycast_config.py script. If they're in the same location, you only need to provide the file name.
- Providing a log file path in the configuration files is optional. If the
path is provided, it must be /var/log/quagga/{ bgpd | ospfd | zebra }.log,
or the request will be rejected with the error
Unsucessful status code: Invalid parameters
.
- If required, set Anycast loopback interfaces. The set_loopbacks
command will override all configured loopback IP addresses. A maximum of 255
loopback IPv4 addresses are allowed. Loopback IPs must be specified in a /32
CIDR notation. IPv6 isn't
supported.
anycast_config.py set_loopbacks x.x.x.x/32 y.y.y.y/32 z.z.z.z/32
To show the configured loopbacks:
anycast_config.py show_loopbacks
To remove all configured loopbacks
anycast_config.py no_loopbacks
- To stage daemon configuration files without immediately applying
them, and to view or remove the staged configurations, use the following
commands:
-
anycast_config.py set_staged_conf <daemon> <file.conf>
For example:
anycast_config.py set_staged_conf zebra zebra.conf
In this example, the .conf file is in the same location as the anycast_config.py script.
-
anycast_config.py show_staged_conf <daemon> <file.conf>
-
anycast_config.py no_staged_conf <daemon> <file.conf>
-
- To apply the staged configurations, use the following command:
-
anycast_config.py apply
-
- To apply configuration files without first staging them, and
to view or remove the applied configurations, use the following commands:
-
anycast_config.py set_run_conf <daemon> <file.conf>
For example:
anycast_config.py set_run_conf bgpd bgpd.conf
In this example, the .conf file is in the same location as the anycast_config.py script.
-
anycast_config.py show_run_conf <daemon> <file.conf>
-
anycast_config.py no_run_conf <daemon> <file.conf>
-
- To stop, start, or show running daemons, use the following commands:
This stops the daemon. For example:anycast_config.py pause <daemon>
anycast_config.py pause bgpd
-
anycast_config.py start <daemon>
-
anycast_config.py show_daemons
Example
- Configure Anycast loopbacks 192.168.68.47/32.
- Stage the zebra.conf, then the bgpd.conf, then the ospfd.conf files.
In this example, the .conf files are in a different location from the anycast_config.py script. Note that Windows users should use backslashes in the file path, and Mac users should use forward slashes.
- Apply the staged configuration files.
- Retrieve the contents of each of the daemon configuration files.
anycast_config.py set_loopbacks 192.168.68.47/32
anycast_config.py set_staged_conf zebra /home/abc/zebra.conf
anycast_config.py set_staged_conf bpgd /home/abc/bgpd.conf
anycast_config.py set_staged_conf ospfd /home/abc/ospfd.conf
anycast_config.py apply
anycast_config.py show_run_conf zebra
anycast_config.py show_run_conf bgpd
anycast_config.py show_run_conf ospfd
Getting status and troubleshooting information for the running Anycast daemons
For additional troubleshooting information, refer to Service Point v3 diagnostic and health APIs.
- Run the following command to view the logs for a specified daemon (zebra, ospfd,
or bgpd):
anycast_config.py show_logs <daemon>
- Run the following command to retrieve information about the state of running
Anycast
daemons:
anycast_config.py show_debug <option>
The available options are:
Relevant daemon Option Internally wrapped command Zebra zebraSummary show zebra client summary routes show ip route interfaces show interfaces runningConfig show running-config BGP bgpSummary show ip bgp summary bgpNeighbors show ip bgp neighbors OSPF ospfNeighbors show ip ospf neighbors ospfRoutes show ip ospf route ospfRouterInfo show ip ospf router info ospfDatabase show ip ospf database