Fortinet black logo

New Features

Determine if recursive distance is evaluated in BGP's next hops under ECMP 6.4.2

Determine if recursive distance is evaluated in BGP's next hops under ECMP 6.4.2

For BGP ECMP routes that require recursive lookup to the next hop, by default the routes are installed to the kernel, regardless of the distance to the next hop.

When the multipath recursive distance option is enabled, only the routes with the lowest recursive distance are installed. For example, a next hop that is recursively resolved by a connected router will be installed, but a next hop that is resolved by a static route will not, because its distance is higher.

To enable the multipath recursive distance option:
config router bgp
    set multipath-recursive-distance enable
end
Note

Either EGBP or IBGP multipath must be enabled:

config router bgp
    set ebgp-multipath enable
    set ibgp-multipath enable
end

Example

In this example, BGP has learned one BGP route from two neighbors with different next hops. One of the next hops is directly connected, so its recursive distance is zero. The other next hop is learned from a static route, so its recursive distance is higher.

When multipath recursive distance is disabled, all of the next hop routes are installed to the kernel and used to form the ECMP routes (default):

# get router info routing-table bgp
Routing table for VRF=0
B       10.100.10.0/24 [20/0] via 5.5.5.5 (recursive via 10.100.1.1, R150), 00:00:03
                       [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:03
B       10.100.11.0/24 [20/0] via 5.5.5.5 (recursive via 10.100.1.1, R150), 00:00:03
                       [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:03

When multipath recursive distance is enabled, only the shortest next hop route is installed to the kernel and used to form the ECMP routes:

# get router info routing-table bgp
Routing table for VRF=0
B       10.100.10.0/24 [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:39
B       10.100.11.0/24 [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:39

Determine if recursive distance is evaluated in BGP's next hops under ECMP 6.4.2

For BGP ECMP routes that require recursive lookup to the next hop, by default the routes are installed to the kernel, regardless of the distance to the next hop.

When the multipath recursive distance option is enabled, only the routes with the lowest recursive distance are installed. For example, a next hop that is recursively resolved by a connected router will be installed, but a next hop that is resolved by a static route will not, because its distance is higher.

To enable the multipath recursive distance option:
config router bgp
    set multipath-recursive-distance enable
end
Note

Either EGBP or IBGP multipath must be enabled:

config router bgp
    set ebgp-multipath enable
    set ibgp-multipath enable
end

Example

In this example, BGP has learned one BGP route from two neighbors with different next hops. One of the next hops is directly connected, so its recursive distance is zero. The other next hop is learned from a static route, so its recursive distance is higher.

When multipath recursive distance is disabled, all of the next hop routes are installed to the kernel and used to form the ECMP routes (default):

# get router info routing-table bgp
Routing table for VRF=0
B       10.100.10.0/24 [20/0] via 5.5.5.5 (recursive via 10.100.1.1, R150), 00:00:03
                       [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:03
B       10.100.11.0/24 [20/0] via 5.5.5.5 (recursive via 10.100.1.1, R150), 00:00:03
                       [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:03

When multipath recursive distance is enabled, only the shortest next hop route is installed to the kernel and used to form the ECMP routes:

# get router info routing-table bgp
Routing table for VRF=0
B       10.100.10.0/24 [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:39
B       10.100.11.0/24 [20/0] via 10.100.1.5 (recursive is directly connected, R160), 00:00:39