-
Notifications
You must be signed in to change notification settings - Fork 738
Description
Networking:
RR1 ======== RR2
| /
| /
| /
| /
client1
RR1: 172.16.20.30
RR2: 172.16.20.31
client1: 172.16.20.32
Configure:
RR1#cat gobgpd.conf
[global.config]
as = 1111
port = 17900
router-id = "172.16.20.30"
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.31"
peer-as = 1111
[neighbors.transport.config]
remote-port = 17900
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.32"
peer-as = 1111
[neighbors.transport.config]
remote-port = 17900
[neighbors.route-reflector.config]
route-reflector-client = true
[[neighbors.afi-safis]]
[neighbors.afi-safis.config]
afi-safi-name = "ipv4-unicast"
RR2#cat gobgpd.conf
[global.config]
as = 1111
port = 17900
router-id = "172.16.20.31"
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.30"
peer-as = 1111
[neighbors.transport.config]
remote-port = 17900
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.32"
peer-as = 1111
[neighbors.route-reflector.config]
route-reflector-client = true
[neighbors.transport.config]
remote-port = 17900
[[neighbors.afi-safis]]
[neighbors.afi-safis.config]
afi-safi-name = "ipv4-unicast"
client1#cat gobgpd.conf
[global.config]
as = 1111
port = 17900
router-id = "172.16.20.32"
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.31"
peer-as = 1111
[neighbors.transport.config]
remote-port = 17900
[[neighbors]]
[neighbors.config]
neighbor-address = "172.16.20.30"
peer-as = 1111
[neighbors.transport.config]
remote-port = 17900
Configuring a route on client1:
client1# gobgp global rib add 2.2.2.0/24
The effect is as follows
RR1:
RR1# gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 2.2.2.0/24 172.16.20.32 00:01:01 [{Origin: ?} {LocalPref: 100}]
* 2.2.2.0/24 172.16.20.32 00:01:01 [{Origin: ?} {LocalPref: 100}]
RR1# gobgp neigh 172.16.20.32 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:03:22 [{Origin: ?} {LocalPref: 100}]
RR1# gobgp neigh 172.16.20.32 adj-out
ID Network Next Hop AS_PATH Attrs
2 2.2.2.0/24 172.16.20.32 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.31} {ClusterList: [172.16.20.30]}]
RR1# gobgp neigh 172.16.20.31 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:04:13 [{Origin: ?} {LocalPref: 100}]
RR1# gobgp neigh 172.16.20.31 adj-out
Network not in table
RR2
RR2# gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 2.2.2.0/24 172.16.20.32 00:02:01 [{Origin: ?} {LocalPref: 100}]
* 2.2.2.0/24 172.16.20.32 00:02:01 [{Origin: ?} {LocalPref: 100}]
RR2# gobgp neigh 172.16.20.32 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:05:05 [{Origin: ?} {LocalPref: 100}]
RR2# gobgp neigh 172.16.20.32 adj-out
ID Network Next Hop AS_PATH Attrs
2 2.2.2.0/24 172.16.20.32 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.30} {ClusterList: [172.16.20.31]}]
RR2# gobgp neigh 172.16.20.30 adj-out
Network not in table
RR2# gobgp neigh 172.16.20.30 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:05:19 [{Origin: ?} {LocalPref: 100}]
Here I want to ask the first question: Why does the adj-out of the neighbors to RR2 on RR1 not equal the adj-in of the neighbors to RR1 on RR2?
RR1# gobgp neigh 172.16.20.31 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:04:13 [{Origin: ?} {LocalPref: 100}]
RR2# gobgp neigh 172.16.20.30 adj-out
Network not in table
clent1:
client1# gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 2.2.2.0/24 0.0.0.0 00:01:24 [{Origin: ?}]
* 2.2.2.0/24 172.16.20.32 00:01:24 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.31} {ClusterList: [172.16.20.30]}]
* 2.2.2.0/24 172.16.20.32 00:01:24 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.30} {ClusterList: [172.16.20.31]}]
There are three routes in client1. The latter two are learned from RR1 and RR2. According to my understanding, these two routes should not exist. I found that their Originator ID is wrong and should be the router ID of client1. That is, 172.16.20.32, so that when cleint1 receives these two routes, it will compare with its own router id, and the same will not be received.
Because of the above problem, I am restarting the client's bgp process, or executing :
#gobgp neigh 172.16.20.31 reset ; gobgp neigh 172.16.20.30 reset ; gobgp global rib del 2.2.2.0/24
I found that 2.2.2.0/24 still exists on client1, it has actually been deleted.
client1# gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 2.2.2.0/24 172.16.20.32 00:01:02 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.31} {ClusterList: [172.16.20.30]}]
* 2.2.2.0/24 172.16.20.32 00:01:05 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.30} {ClusterList: [172.16.20.31]}]
They are all released by RR. The RR has not been properly aged.
RR1#gobgp neigh 172.16.20.31 adj-in
ID Network Next Hop AS_PATH Age Attrs
0 2.2.2.0/24 172.16.20.32 00:25:55 [{Origin: ?} {LocalPref: 100}]
RR1#gobgp neigh 172.16.20.32 adj-out
ID Network Next Hop AS_PATH Attrs
2 2.2.2.0/24 172.16.20.32 [{Origin: ?} {LocalPref: 100} {Originator: 172.16.20.31} {ClusterList: [172.16.20.30]}]
They should be deleted on RR1
=====================
Test FRR
I will use the same scene to test frr
After adding a route on client1:
RR1 # show ip bgp
BGP table version is 4, local router ID is 172.16.20.30, vrf id 0
Default local pref 100, local AS 1111
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i1.1.1.0/24 172.16.20.32 0 100 0 i
*>i 172.16.20.32 0 100 0 i
RR1# show ip bgp 1.1.1.0/24
BGP routing table entry for 1.1.1.0/24
Paths: (2 available, best #2, table default)
Advertised to non peer-group peers:
172.16.20.31 172.16.20.32
Local
172.16.20.32 from 172.16.20.31 (172.16.20.32)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 172.16.20.32, Cluster list: 172.16.20.31
Last update: Wed Sep 18 13:15:00 2019
Local, (Received from a RR-client)
172.16.20.32 from 172.16.20.32 (172.16.20.32)
Origin IGP, metric 0, localpref 100, valid, internal, best
Last update: Wed Sep 18 13:15:00 2019
client1# show ip bgp
BGP table version is 1, local router ID is 172.16.20.32, vrf id 0
Default local pref 100, local AS 1111
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 0.0.0.0 0 32768 i
There is only one route on client1, and it will not receive the route reflected by the RR.
And the Originator id of the route is 172.16.20.32 which equal to its router id.This is consistent with my experience.
RR1# show ip bgp neigh 172.16.20.31 routes
BGP table version is 4, local router ID is 172.16.20.30, vrf id 0
Default local pref 100, local AS 1111
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i1.1.1.0/24 172.16.20.32 0 100 0 i
Displayed 1 routes and 2 total paths
RR2# show ip bgp neighbors 172.16.20.30 advertised-routes
BGP table version is 4, local router ID is 172.16.20.31, vrf id 0
Default local pref 100, local AS 1111
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 172.16.20.32 0 100 0 i
Total number of prefixes 1
The adj-out of the neighbors to RR2 on RR1 not equal the adj-in of the neighbors to RR1 on RR2, it's ok.
then, i executed the following command, which is equivalent to executing "#gobgp neigh 172.16.20.31 reset ; gobgp neigh 172.16.20.30 reset ; gobgp global rib del 1.1.1.0/24"
clear ip bgp *
configure terminal
router bgp 1111
no network 1.1.1.0/24
RR1# show ip bgp
No BGP prefixes displayed, 0 exist
RR2# show ip bgp
No BGP prefixes displayed, 0 exist
client1# show ip bgp
No BGP prefixes displayed, 0 exist
The routes on all nodes are cleared. This is consistent with my experience.
Activity
wu0407 commentedon Sep 21, 2019
similar issue with 3 rr and 2 client and 1 nomal client
rr 192.168.189.213 config
rr 192.168.189.214 config
rr 192.168.189.215 config
rr-192.168.189.213
rr-192.168.189.214
rr-192.168.189.215
the client 192.168.251.145 not recive all route from rr rib.
The rfc 4456
on the gobgp 2.8.0
use kube-route same ploblem cloudnativelabs/kube-router#773
wu0407 commentedon Sep 21, 2019
set cluster id diffrent on the rr config, 192.168.251.145 revice all the route from rr rib
fujita commentedon Oct 23, 2019
like frr, gobgp uses router-id as cluster-id if cluster-id is not configured.