Calico: Set BGP Port Number to other than 179

Created on 19 Dec 2019  路  7Comments  路  Source: projectcalico/calico

Hello,
I'm currently installing on-prem k8s into baremetal hosts.
I want to use BGP port number other than 179, because port 179 is already used by frr for host node networking.
How to configure bgp port number of calico?

I checked those documents, but I could not find how to do that.
https://docs.projectcalico.org/v3.10/reference/node/configuration
https://docs.projectcalico.org/v3.10/reference/resources/bgpconfig

Expected Behavior

Set BGP port number of calico to other than 179

Current Behavior

BGP port number is set to 179

Your Environment

  • Calico version : v3.10 and v3.9
  • Orchestrator version : kubernetes v1.17.0
  • Operating System and version: Container Linux by CoreOS 2135.6.0 (Rhyolite)

Thank you

kinenhancement

Most helpful comment

projectcalico/libcalico-go#1262 and friends seem to have addressed this issue.

All 7 comments

Hi @mtinny, I don't think there's an easy way to use another port for BGP instead of 179. Bird does support using a different host/port as you can see here: https://github.com/projectcalico/bird/blob/e37e4770d2ff33f1d287977697c06192d16402ca/doc/bird.sgml#L436

The option would be put into the kernel protocol in the bird template here (in the same place we have graceful restart): https://github.com/projectcalico/confd/blob/faf4b559c352522ffd0929808e0a1aadaa519867/etc/calico/confd/templates/bird.cfg.template#L38

But there isn't an easy way to do this with calico out of the box. I think you'd need to fork projectcalico/confd with the listen bgp option, then build your own calico/node with your confd fork.

Hi @lmm

Thank you for your response.
As I want to keep using official calico, not fork, I'll try to change frr port instead, as frr itself seems to be supporting port number other than 179.

Thank you

Same issue. Our company firewall block traffic on port 179.

Having this configurable would help. We also already use bgpd on port 179 for an anycast VIP to the kubernetes masters. So bird on the master nodes end up not starting by default.

I can imagine making this a configuration option on the Node object or the BGPConfiguration object, and then plumbing that through into the BIRD configuration. Seems like a reasonably straightforward implementation, if anyone is down to give it a try!

projectcalico/libcalico-go#1262 and friends seem to have addressed this issue.

Yep, this will be available in Calico v3.16.0

Was this page helpful?
0 / 5 - 0 ratings