Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Debugging BGP Peering and Route Exchange in Contrail

Use the troubleshooting steps and guidelines in this topic when you have errors with Contrail BGP peering and route exchange.

Example Cluster

Examples in this document refer to a virtual cluster that is set up as follows:

Verifying the BGP Routers

Use this procedure to launch various introspects to verify the setup of the BGP routers in your system.

Use this procedure to launch various introspects to verify the setup of the BGP routers in your system.

  1. List BGP routers with the following Contrail API request.

    bgp-router is created in Contrail for each control node, BGPaaS, and external BGP routers. These are visible from the following location, shown using the sample node setup.

    http: //<host ip address>:8082/bgp-routers

    Note:

    Throughout this procedure, replace <host ip address> with the correct location for your system to see the setup in your system.​

    Figure 1: Sample Output, BGP RoutersSample Output, BGP Routers
  2. Verify the BGP peering.

    The following statement is entered to check the bgp_router_refs object on the API server to validate the peering on the sample setup.

    http: //<host ip address>:8082/bgp-router/1da579c5-0907-4c98-a7ad-37671f00cf60

    Figure 2: Sample Output, BGP Router ReferencesSample Output, BGP Router References
  3. Verify the command line arguments that are passed to the control-node.

    On the control-node, use ps aux | grep control-node to see the arguments that are passed to the control-node.

    Example

    The hostname is the bgp-router name. Ensure that the bgp-router config can be found for the hostname, using the procedure in Step 1.

  4. Validate the BGP neighbor config and the BGP peering config object available on the control node. The control node receives the configuration from Cassandra (starting with Contrail Networking Release 4.0) or from IF-MAP (earlier than Contrail Networking Release 4.0).

    http: //<host ip address>:8083/Snh_ShowBgpNeighborConfigReq?

    Figure 3: Sample Output, BGP Neighbor ConfigSample Output, BGP Neighbor Config

    http: //<host ip address>:8083/Snh_ShowBgpPeeringConfigReq?

    Figure 4: Sample Output, BGP Peering ConfigSample Output, BGP Peering Config
  5. Check the BGP neighbor states on the control node.

    http: //<host ip address>:8083/Snh_ShowBgpNeighborSummaryReq

Verifying the Route Exchange

The following two virtual networks are used in the sample debugging session for route exchange.

Example Procedure for Verifying Route Exchange

  1. Validate the presence of the routing instance for each virtual network in the sample system.

    http ://<host ip address>:8083/Snh_ShowRoutingInstanceReq?name=

    Note:

    Throughout this example, replace <host ip address> with the correct location for the control node on your system.

    Figure 5: Sample Output, Show Routing InstanceSample Output, Show Routing Instance

    In the sample output, you can see the import_target and the export_target configured on the routing instance. Also shown are the xmpp peers (vroutes) registered to the table.

    The user can click on the inet table of the required routing instance to display the routes that belong to the instance.

    Use the information in Step 2 to validate a route.

  2. Validate a route in a given routing instance in the sample setup:

    http ://<host ip address>:8083/Snh_ShowRouteReq?x=default-domain:demo:vn1:vn1.inet.0

    In the following sample output (truncated), the user can validate the BGP paths for the protocol and for the source of the route to verify which XMPP agent or vRouter has pushed the route. If the path source is BGP, the route is imported to the VRF table from a BGP peer, either another control-node or an external bgp router such as an MX Series router. BGP paths are displayed in the order of path selection.

    Figure 6: Sample Output, Validate RouteSample Output, Validate Route

  3. Validate the l3vpn table.

    http: //<host ip address>:8083/Snh_ShowRouteReq?x=bgp.l3vpn.0

    Figure 7: Sample Output, Validate L3vpn TableSample Output, Validate L3vpn Table

    The following sample output has been scrolled horizontally to display the BGP path attributes of each route’s. policies.

    The extended community (communities column), determines the VRF table to which this VPN route is imported. The origin_vn shows the virtual network where this route was created, information useful for applying ACL.

    The label (MPLS) and tunnel encap columns can be used for debugging data path issues.

    Figure 8: Sample Output, Validate L3vpn Table, ScrolledSample Output, Validate L3vpn Table, Scrolled

Debugging Route Exchange with Policies

This section uses the sample output and the sample vn1 and vn2 to demonstrate methods of debugging route exchange with policies.

  1. Create a network policy to allow vn1 and vn2 traffic and associate the policy to the virtual networks.
    Figure 9: Create Policy WindowCreate Policy Window
  2. Validate that the routing instances have the correct import_target configuration.

    http: //<host ip address>:8083/Snh_ShowRoutingInstanceReq?name=

    Figure 10: Sample Output, Validate Import TargetSample Output, Validate Import Target
  3. Validate that the routes are imported from VRF.

    Use the BGP path attribute to check the replication status of the path. The route from the destination VRF should be replicated and validate the origin-vn.

    Figure 11: Sample Output, Route ImportSample Output, Route Import

Debugging Peering with an MX Series Router

This section sets up an example BGP MX Series peer and provides some troubleshooting scenarios.

  1. Set the Global AS number of the control-node for an MX Series BGP peer, using the Contrail WebUI (eBGP).
    Figure 12: Edit Global ASN WindowEdit Global ASN Window
  2. Configure the eBGP peer for the MX Series router. Use the Contrail Web UI or Python provisioning.
    Figure 13: Create BGP Peer WindowCreate BGP Peer Window

    Configuring the MX Series BGP peer with the Python provision utility:

  3. Configure a control-node peer on the MX Series router, using Junos CLI:

Debugging a BGP Peer Down Error with Incorrect Family

Use this procedure to identify and resolve errors that arise from families mismatched configurations.

Note:

This example uses locations at http: //<host ip address>:. Be sure to replace <host ip address> with the correct address for your environment.

  1. Check the BGP peer UVE.

    http: //<host ip address>:8081/analytics/uves/bgp-peers

  2. Search for the MX Series BGP peer by name in the list.

    In the sample output, families is the family advertised by the peer and configured_families is what is provisioned.​ In the sample output, the families configured on the peer has a mismatch, thus the peer doesn’t move to an established state. You can verify it in the peer UVE.

    Figure 14: Sample BGP Peer UVESample BGP Peer UVE
  3. Fix the families mismatch in the sample by updating the configuration on the MX Series router, using Junos CLI:

    set protocols bgp group contrail-control-nodes family inet-vpn unicast

  4. After committing the CLI configuration, the peer comes up. Verify this with UVE.

    http: //<host ip address>:8081/analytics/uves/bgp-peers

    Figure 15: Sample Established BGP Peer UVESample Established BGP Peer UVE
  5. Verify the peer status on the MX Series router, using Junos CLI:

Configuring MX Peering (iBGP)

  1. Edit the Global ASN.
    Figure 16: Edit Global ASN WindowEdit Global ASN Window
  2. Configure the MX Series IBGP peer, using Contrail WebUI or Python provisioning.
    Figure 17: Create BGP Peer WindowCreate BGP Peer Window

    Configuring the MX Series BGP peer with the Python provision utility:

    python ./provision_mx.py --router_name mx--router_ip <ip address> --router_asn 64512 --api_server_ip <ip address> --api_server_port 8082 --oper add --admin_user admin --admin_password <password> --admin_tenant_name admin

  3. Verify the peer from UVE.

    http ://<host ip address>:8081/analytics/uves/bgp-peers

    Figure 18: Sample Established IBGP Peer UVESample Established IBGP Peer UVE
  4. You can verify the same information at the HTTP introspect page of the control node (8443 in this example).

    http: //<host ip address>:8083/Snh_BgpNeighborReq?ip_address=&domain=

    Figure 19: Sample Established IBGP Peer Introspect WindowSample Established IBGP Peer Introspect Window

Checking Route Exchange with an MX Series Peer

  1. Check the route table in the bgp.l3vpn.0 table.
    Figure 20: Routing Instance Route TableRouting Instance Route Table
  2. Configure a public virtual network.
    Figure 21: Routing Instance Route TableRouting Instance Route Table
  3. Verify the routes in the public.inet.0 table.

    http: //<host ip address>:8083/Snh_ShowRouteReq?x=default-domain:admin:public:public.inet.0

    Figure 22: Routing Instance Public IPv4 Route TableRouting Instance Public IPv4 Route Table
  4. Launch a virtual machine in the public network and verify the route in the public.inet.0 table.

    http: //<host ip address>:8083/ Snh_ShowRouteReq?x=default-domain:admin:public:public.inet.0

    Figure 23: Virtual Machine Routing Instance Public IPv4 Route TableVirtual Machine Routing Instance Public IPv4 Route Table
  5. Verify the route in the bgp.l3vpn.0 table.

    http: //<host ip address>:8083/Snh_ShowRouteReq?x=bgp.l3vpn.0

    Figure 24: BGP Routing Instance Route TableBGP Routing Instance Route Table

Checking the Route in the MX Series Router

Use Junos CLI show commands from the router to check the route. These commands assume that the routing instance with the imported route table from Contrail is configured on the MX Series router, either manually or by using Device Manager.