Skip to content

how set route reflector advertise all node cidr to external peer #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wu0407 opened this issue Aug 17, 2019 · 4 comments
Closed

how set route reflector advertise all node cidr to external peer #773

wu0407 opened this issue Aug 17, 2019 · 4 comments

Comments

@wu0407
Copy link
Contributor

wu0407 commented Aug 17, 2019

Route reflector peer outside route not advertise all router reflector client rib, outside route need learn all nodes cidr in the cluster, but sometime Route reflector only advertise self pod cidr to outside route.
kube-router v0.3.2

three Route reflector with same cluster id:
kube-router.io/rr.server: "43"

192.168.189.213
192.168.189.214
192.168.189.215

rr client
kube-router.io/rr.client: "43"

192.168.189.216
192.168.189.217

peer route is 192.168.251.145

Route reflector runing command

/usr/local/bin/kube-router --run-router=true --run-firewall=false --run-service-proxy=false --kubeconfig=/etc/kube-router/kubeconfig --advertise-external-ip=true --advertise-loadbalancer-ip=true --enable-overlay=false --enable-pod-egress=false --enable-cni=false --cluster-asn=64513 --enable-overlay=false --enable-pod-egress=false --routes-sync-period=30s --cache-sync-timeout=10s -v 6 --peer-router-ips=192.168.251.145 --peer-router-asns=64513

route reflector advertise part of rib to 192.168.251.145, and three node not advertise same count route

root@k8s-master01:~ #gobgp neighbor  
Peer               AS  Up/Down State       |#Received  Accepted
192.168.189.214 64513 00:10:47 Establ      |        1         1
192.168.189.215 64513 01:21:48 Establ      |        1         1
192.168.189.216 64513 01:21:51 Establ      |        1         1
192.168.189.217 64513 01:21:51 Establ      |        1         1
192.168.251.145 64513 01:22:05 Establ      |        0         0
root@k8s-master01:~ #gobgp global rib 
   Network              Next Hop             AS_PATH              Age        Attrs
*> 10.3.0.0/25          192.168.189.216                           01:22:03   [{Origin: i} {LocalPref: 100}]
*> 10.3.0.128/25        192.168.189.217                           01:22:03   [{Origin: i} {LocalPref: 100}]
*> 10.3.1.0/25          192.168.189.214                           00:10:59   [{Origin: i} {LocalPref: 100}]
*> 10.3.1.128/25        192.168.189.215                           01:22:00   [{Origin: i} {LocalPref: 100}]
*> 10.3.2.0/25          192.168.189.213                           00:00:17   [{Origin: i}]
root@k8s-master01:~ #gobgp --host 192.168.189.213  neighbor 192.168.251.145 adj-out 
   ID  Network              Next Hop             AS_PATH              Attrs
   1   10.3.0.0/25          192.168.189.216                           [{Origin: i} {LocalPref: 100}]
   1   10.3.0.128/25        192.168.189.217                           [{Origin: i} {LocalPref: 100}]
   1   10.3.2.0/25          192.168.189.213                           [{Origin: i} {LocalPref: 100}]
root@k8s-master01:~ #gobgp --host 192.168.189.214  neighbor 192.168.251.145 adj-out 
   ID  Network              Next Hop             AS_PATH              Attrs
   1   10.3.1.0/25          192.168.189.214                           [{Origin: i} {LocalPref: 100}]
root@k8s-master01:~ #gobgp --host 192.168.189.215  neighbor 192.168.251.145 adj-out 
   ID  Network              Next Hop             AS_PATH              Attrs
   1   10.3.1.128/25        192.168.189.215                           [{Origin: i} {LocalPref: 100}]

how set for advertise all router reflector client rib to outside router? And rr not Redundant, is bug ?

@wu0407
Copy link
Contributor Author

wu0407 commented Sep 6, 2019

change one rr client and server cluster id to "45", find client peer all rr server ignore cluster id, and rr server peer all node ignore cluster id.
the document :

Only nodes with the same ClusterID in client and server mode will peer together.

why ?
https://github.com/cloudnativelabs/kube-router/blob/master/pkg/controllers/routing/bgp_peers.go#L144-L157

@wu0407
Copy link
Contributor Author

wu0407 commented Sep 22, 2019

find solution for rr redundant, set rr annotations same with 'kube-router.io/rr.server: "43"' and 'kube-router.io/rr.client: "43"', or peer rr.server different cluster id.

192.168.189.213  kube-router.io/rr.server: "43" kube-router.io/rr.client: "43"
192.168.189.214  kube-router.io/rr.server: "43" kube-router.io/rr.client: "43"
192.168.189.215  kube-router.io/rr.server: "43" kube-router.io/rr.client: "43"

or

192.168.189.213  kube-router.io/rr.server: "43" kube-router.io/rr.client: "43"
192.168.189.214  kube-router.io/rr.server: "44" kube-router.io/rr.client: "43"
192.168.189.215  kube-router.io/rr.server: "45" kube-router.io/rr.client: "43"

@aauren
Copy link
Collaborator

aauren commented Apr 25, 2020

@wu0407 Is this still an issue for you?

@wu0407
Copy link
Contributor Author

wu0407 commented May 9, 2020

no, i take some trick to do it. It's better to mention it in the document

@wu0407 wu0407 closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants