Table of Contents

Monitor and Visibility of Learned Routes and Advertised Routes by API

Miralem Cebic Updated by Miralem Cebic

Monitor and Visibility of Learned Routes and Advertised Routes by API

Monitoring and understanding the routes that a network learns and advertises are crucial for managing and troubleshooting BGP-based routing environments. The DE-CIX Cloud ROUTER APIs provide endpoints to retrieve real-time information about learned routes (ingress) and advertised routes (egress). These tools help ensure smooth operations, optimize routing behavior, and maintain compliance with business or technical policies.

Key Concepts

  1. Learned Routes (Ingress):

• These are the routes received from external connections such as cloud providers (AWS, Azure, Google Cloud) or Virtual PNI connections.

• Typically reflect routes that are available for forwarding inbound traffic.

  1. Advertised Routes (Egress):

• These are the routes that your network sends out to external connections.

• Typically indicate the prefixes available for external peers to send traffic back to your network.

  1. Visibility:

• Ensures that network administrators can verify the correctness of learned and advertised routes.

• Helps identify misconfigurations, validate routing policies, and debug connectivity issues.

API Endpoints for Monitoring

1. Retrieve All Routes

Endpoint: /api/v3/decix-vrf-v1/routes

Example Response:

[

{

"id": "16948565",

"vrf": "777",

"prefix": "10.209.128.0/19",

"metric": 0,

"protocol": "bgp",

"distance": 170,

"next_hop": "10.0.32.14",

"received_at": "2024-11-07T11:44:30Z"

},

{

"id": "17779935",

"vrf": "776",

"prefix": "10.209.59.0/24",

"metric": 0,

"protocol": "bgp",

"distance": 170,

"next_hop": "10.0.32.30",

"received_at": "2024-11-08T15:22:21Z"

}

]

Explanation of Properties:

• id: A unique identifier for the route entry.

• vrf: Identifies the VRF to which the route belongs.

• prefix: The IP prefix of the route.

• metric: The route metric used to determine path preference.

• protocol: The protocol responsible for the route (e.g., BGP, static).

• distance: The administrative distance of the route, indicating preference relative to other protocols.

• next_hop: The next-hop IP address for reaching the route.

• received_at: Timestamp when the route was added.

2. Retrieve Learned Routes

Endpoint: /api/v3/decix-vrf-v1/network-service-configs/{network_service_config_id}/received-routes

Example Response:

[

{

"prefix": "10.209.160.0/19",

"next_hop": "10.0.32.18",

"as_path": [12076],

"received_at": "2024-11-19T10:12:23.040013"

}

]

Explanation of Properties:

• prefix: The learned IP prefix.

• next_hop: IP address to forward traffic to for this prefix.

• as_path: List of ASNs the route traversed, useful for validating path integrity and ensuring no policy violations.

• received_at: Timestamp of when the route was received.

3. Retrieve Advertised Routes

Endpoint: /api/v3/decix-vrf-v1/network-service-configs/{network_service_config_id}/advertised-routes

Example Response:

[

{

"prefix": "10.0.0.0/8",

"next_hop": "10.0.32.17",

"as_path": [64513, 64512],

"received_at": "2024-11-19T10:13:56.725416"

}

]

Explanation of Properties:

• prefix: The advertised IP prefix.

• next_hop: IP address to use as the next hop for the prefix.

• as_path: The sequence of ASNs this prefix will traverse, used to manipulate or observe routing paths.

• received_at: Timestamp indicating when the route was advertised.

Key Benefits of Monitoring

1. Validation of Routing Policies:

• Ensures compliance with defined ingress and egress filters.

• Verifies the accuracy of routes learned and advertised.

2. Troubleshooting and Debugging:

• Detect issues such as missing prefixes, incorrect next hops, or AS path anomalies.

• Identify discrepancies between expected and actual routing behavior.

3. Optimization:

• Analyze ingress and egress routes to optimize traffic flow.

• Make informed decisions about adjusting routing attributes like AS path prepending or local preference.

4. Security and Compliance:

• Prevent unintended route leaks or hijacks.

• Ensure routes adhere to organizational or regulatory requirements.

Use Cases

1. Monitoring Ingress Routes:

• Confirm the prefixes being learned from a specific cloud provider.

• Validate AS path for expected traversal patterns.

2. Monitoring Egress Routes:

• Ensure only authorized prefixes are being advertised to external peers.

• Analyze AS path propagation to control traffic routing from external networks.

3. Debugging Connectivity Issues:

• Check if a missing or incorrect route is causing packet drops.

• Verify timestamps to identify stale routes.

What to Expect

Comprehensive Visibility: See all learned and advertised routes in real-time for proactive network management.

Actionable Insights: Use route attributes (e.g., AS path, next hop) to make informed decisions about traffic engineering and security.

Simple API Usage: Retrieve data effortlessly using dedicated endpoints for all, learned, and advertised routes.

By leveraging these API endpoints, network operators can gain deep insights into their routing infrastructure, enhance performance, and ensure seamless connectivity for their services.

How did we do?

Cloud ROUTER Postman Collection

BGP Ingress and Egress Filters Usage by API

Contact