Hello,
Doing some experimentation. I have gobgp configured (54.54.54.54) to talk to a vendor route reflector (35.121.146.13). Using the gobgp CLI or Java GRPC, when I addPath (ipv4), goBgp correctly sends the route and it is received on the RR.
The RR then echo's back the route with the RR cluster ID back to gobgp. I can see this route come in via monitor and also in the global rib dump.
When I try to deletePath, via CLI or Java GRPC, i do NOT see the [DELROUTE] log message. The entry is deleted from the gobgp but a withdraw message is not received on the RR. Therefore the route is not withdrawn.
**Note: if i disable route-reflector on the other node, gobgp can successful add and withdraw the route. My guess is gobgp is not withdrawing the route it generated due to a collision with the reflected route **
Here's a step through of what's happening:
# Add the route in gobgp
# ./gobgp global rib -a ipv4 add 5.5.5.5/24 nexthop 10.10.10.10
# gobgp monitor outputs the new route :
[ROUTE] 5.5.5.0/24 via 10.10.10.10 aspath [] attrs [{Origin: ?}]
# RR receives the update
116 2018/08/15 17:50:13.443 UTC MINOR: DEBUG #2001 Base Peer 1: 172.10.54.2
"Peer 1: 172.10.54.2: UPDATE
Peer 1: 172.10.54.2 - Received BGP UPDATE:
Withdrawn Length = 0
Total Path Attr Length = 21
Flag: 0x40 Type: 1 Len: 1 Origin: 2
Flag: 0x40 Type: 2 Len: 0 AS Path:
Flag: 0x40 Type: 3 Len: 4 Nexthop: 10.10.10.10
Flag: 0x40 Type: 5 Len: 4 Local Preference: 100
NLRI: Length = 4
5.5.5.0/24
"
# RR sends a bgp update with the cluster is
117 2018/08/15 17:50:36.951 UTC MINOR: DEBUG #2001 Base Peer 1: 172.10.54.2
"Peer 1: 172.10.54.2: UPDATE
Peer 1: 172.10.54.2 - Send BGP UPDATE:
Withdrawn Length = 0
Total Path Attr Length = 35
Flag: 0x40 Type: 1 Len: 1 Origin: 2
Flag: 0x40 Type: 2 Len: 0 AS Path:
Flag: 0x40 Type: 3 Len: 4 Nexthop: 10.10.10.10
Flag: 0x40 Type: 5 Len: 4 Local Preference: 100
Flag: 0x80 Type: 9 Len: 4 Originator ID: 54.54.54.54
Flag: 0x80 Type: 10 Len: 4 Cluster ID:
35.121.146.13
NLRI: Length = 4
5.5.5.0/24
"
# note: gobgp monitor does not have any new output
# gobgp rib output sees both paths
# ./gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 5.5.5.0/24 10.10.10.10 00:02:51 [{Origin: ?}]
* 5.5.5.0/24 10.10.10.10 00:02:27 [{Origin: ?} {LocalPref: 100} {Originator: 54.54.54.54} {ClusterList: [35.121.146.13]}]
# Sending a delete, log on the RR is empty. Log on gobgp does not show [DELROUTE] but shows [ROUTE] of the entry from the RR
./gobgp global rib -a ipv4 del 5.5.5.5/24 nexthop 10.10.10.10
[ROUTE] 5.5.5.0/24 via 10.10.10.10 aspath [] attrs [{Origin: ?} {LocalPref: 100} {Originator: 54.54.54.54} {ClusterList: [35.121.146.13]}]
# Attempting to delete the route again is met with:
{"Key":"5.5.5.0/24","Path":{"nlri":{"prefix":"5.5.5.0/24"},"attrs":[{"type":1,"value":2},{"type":3,"nexthop":"10.10.10.10"}],"age":1534355705,"withdrawal":true,"validation":"none"},"Topic":"Table","level":"warning","msg":"No matching path for withdraw found, may be path was not installed into table","time":"2018-08-15T13:55:05-04:00"}