Calico BGP session is not established.

Incorrect BGP configuration or unreachable peer IPs.

Understanding Calico

Calico is a networking and network security solution for containers, virtual machines, and native host-based workloads. It is widely used in Kubernetes environments to provide scalable networking and security policies. One of its key features is the ability to integrate with BGP (Border Gateway Protocol) to distribute routing information.

Identifying the Symptom

When using Calico, you might encounter an issue where the BGP session is not established. This is typically observed when network routes are not being propagated as expected, leading to connectivity issues between nodes or pods in your Kubernetes cluster.

Common Error Messages

You may see error logs indicating that the BGP session is down or that there are issues with route advertisement. These logs can usually be found in the Calico node logs or the BGP daemon logs.

Details About the Issue

The error code CALICO-1002 signifies that the BGP session is not established. This can occur due to several reasons, such as incorrect BGP peer configuration, network issues, or firewall rules blocking BGP traffic.

Understanding BGP in Calico

BGP is used by Calico to exchange routing information between nodes. Each node in the cluster acts as a BGP speaker, and they establish sessions with each other to share routing information. For more details on how BGP works in Calico, you can refer to the Calico BGP documentation.

Steps to Fix the Issue

To resolve the BGP session establishment issue, follow these steps:

Step 1: Verify BGP Configuration

  • Check the BGP configuration in your Calico setup. Ensure that the peer IP addresses are correctly specified in the Calico configuration files or through the Calico API.
  • Use the command calicoctl get bgppeers -o yaml to review the current BGP peer configuration.

Step 2: Ensure Network Reachability

  • Verify that the BGP peer IPs are reachable from the node. You can use ping or traceroute to test connectivity.
  • Ensure that there are no firewall rules blocking BGP traffic (TCP port 179).

Step 3: Check Logs for Errors

  • Examine the Calico node logs and BGP daemon logs for any error messages related to BGP session establishment. Use kubectl logs to access the logs.

Step 4: Restart Calico Components

  • If the configuration and network checks do not resolve the issue, try restarting the Calico components. Use kubectl rollout restart daemonset calico-node -n kube-system to restart the Calico node daemonset.

Additional Resources

For more information on troubleshooting BGP issues in Calico, refer to the Calico BGP troubleshooting guide. This guide provides detailed steps and additional commands to diagnose and resolve BGP-related issues.

Master

Calico

in Minutes — Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

Calico

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid