Fortigate BGP community problem
I’m working with a BGP setup involving three FortiGate firewalls:
FW-A
FW-B
FW-C
FW-A has two BGP neighbors with FW-B: one over a point-to-point link and another over an IPsec overlay tunnel. Both neighbors advertise the same routes to FW-A. However, I need FW-B to only advertise the routes it receives via the point-to-point neighbor.
To achieve this, on FW-A I apply an outbound route-map to the point-to-point neighbor with FW-B, matching the route 192.168.10.0/24 and tagging it with the BGP community 65002:200. FW-A also sends this same route to the IPsec overlay neighbor, but without any community tag.
On FW-B, this results in receiving the 192.168.10.0/24 route from both neighbors — one copy with the community 65002:200 (from the point-to-point link), and one copy without the community (from the overlay).
FW-B also peers with FW-C. Between these two, I configure a route-map outbound on FW-B that matches routes with the community 65002:200, so that only routes received from the point-to-point neighbor (the ones tagged with 65002:200) are advertised to FW-C.
Initially, this works as expected: FW-C receives the route with the 65002:200 community, and when the point-to-point BGP neighbor between FW-A and FW-B goes down, FW-C correctly withdraws the route since it's no longer being received with that community.
The issue arises when the point-to-point neighbor comes back up: although FW-A again starts sending the route with the 65002:200 community, FW-C does not receive it anymore. It's as if BGP on FW-B does not re-evaluate or reprocess the route attributes (community) after the neighbor is re-established.
The only workaround that makes FW-C receive the route again is to perform a manual clear bgp all on both FW-B and FW-C.
After FW-C point to point neighbor come up, FW-B has best route over another neighbors to 192.168.10.0/24 and that´s why it insn´t propagating to FW-C. When I keep only point to point neighbor it works as expected. My routing table will be dynamic because of SDWAN over a lot of neighbors. Anyone has any idea how to solve this problem?
