Monitoring BGP¶
Once you have enabled BGP on a project and initiated a session, both your Project's BGP page and your server's BGP page will show information on active sessions and learned routes.
BGP Status on the Project¶
First, on the Project's BGP page (Networking), you can see which type of BGP is enabled (Local or Global), the ASN (65000 for Local, your own ASN for Global), the MD5 password, if you set one.
The table lists all the BGP sessions across all the servers in the Project. Including the hostname of the server, whether the session is an IPv4 or IPv6 session, and the learned routes in that session. It also gives you the status of the session, and the Updated field is when the BGP status was last updated. The status is automatically updated every six hours, but you can manually update the status by clicking Update Now.
If you click on Manage next to a session entry, it will take you to the server's BGP page.
You can get your Project's BGP configuration from the metal project bgp-config
command.
metal project bgp-config -p <project_id>
You can get a list of all BGP session across all servers in the Project from the metal project bgp-sessions
command.
metal project bgp-sessions -p <project_id>
In the API, retrieve the BGP configuration and session information for a Project by sending a GET request to the /projects/{id}/bgp-config
endpoint.
curl -X GET -H "Content-Type: application/json" -H "X-Auth-Token: <API_TOKEN>" "https://api.equinix.com/metal/v1/projects/{id}/bgp-config"
If you just want a list of sessions in the Project and their details, send a GET
request to the /projects/{id}/bgp/sessions
endpoint.
curl -X GET -H "Content-Type: application/json" -H "X-Auth-Token: <API_TOKEN>" "https://api.equinix.com/metal/v1/projects/{id}/bgp/sessions"
BGP Session Status¶
On the server's BGP page, the table provides the BGP sessions that are running for that server, whether it's IPv4 or IPv6, the learned routes, the status, the time when the status was last updated, and whether the route is set to be the default route. The status is automatically updated every six hours, but you can manually update the status by clicking Update Now.
Clicking Manage next to a session entry brings up a panel where you can toggle to enable or disable the session, or set the route as the default route.
To get all of the sessions running for a server, send a GET
request to the /devices/{id}/bgp/sessions
endpoint.
curl -X GET -H "Content-Type: application/json" -H "X-Auth-Token: <API_TOKEN>" "https://api.equinix.com/metal/v1/devices/{id}/bgp/sessions"
To get information relating to a specific BGP session, send a GET
request to the /bgp/sessions/{id}
endpoint.
curl -X GET -H "Content-Type: application/json" -H "X-Auth-Token: <API_TOKEN>" "https://api.equinix.com/metal/v1/bgp/sessions/{id}"
To get the neighbor data of a session, send a GET
request to the /devices/{id}/bgp/neighbors
endpoint.
curl -X GET -H "Content-Type: application/json" -H "X-Auth-Token: <API_TOKEN>" "https://api.equinix.com/metal/v1/devices/{id}/bgp/neighbors"
Possible Session Statuses¶
Each BGP session has a possible status of Disabled
, Up
, Down
, Partial
, or Unknown
.
Disabled
- A disabled status will appear on the project's BGP page if you have enabled BGP on your project, but have not yet initiated a BGP session. For example, you may have a session that is announcing an IPv4 address but not a session to IPv6 address. The IPv4 session status isUp
and the IPv6 session status isDisabled
.Up
- The BGP session is up. Equinix Metal routers are picking up the IP addresses you are announcing and learning the routes to your servers. In an Equinix IBX, this status also indicates that the BGP session is active on both routers.Down
- The BGP session is down. Either you haven't set up the host configuration yet, or something in the configuration is not working. If you have checked your host configuration, try disabling and re-initiating the BGP session, wait the 5-10 minutes for the session to come up again. If the session is still down, please contact support.Partial
- If your server is in an Equinix IBX and the BGP session is up on only one of the two routers, then the status will bePartial
. It could indicate that there is maintenance on of the routers. The status should be temporary, but if it persists, please contact support.Unknown
- A session will have an unknown status right after you have enabled it, while the session is still being established. It typically takes about 5-10 minutes for the status to update. If the status is unknown for longer, try clicking Update Now to manually update it.