Ondrej Zajicek writes:
On Thu, Jul 29, 2021 at 03:14:39PM -0400, Dave Johnson wrote:
Hi,
I'm trying to get igp_metric to work for iBGP based on an OSPF metric.
Here's my setup:
I would like to make use of the iBGP igp_metric as a tie-breaker if BGP gets down that far in the route selection process, however I can't seem to get BGP to pick up the OSPF metric for other machine's loopbacks.
The loopback is being imported using a proto direct as it's simply from Linux's lo interface:
root@archer:~# birdc show route 10.10.10.30/32 all BIRD 1.6.6 ready. 10.10.10.30/32 dev lo [direct1 11:14:34] * (240) Type: device unicast univ root@archer:~#
Hi
I would suggest to just set loopback as a stub iface in OSPF. You would end with regular OSPF route instead of OSPF-E2 route and it would be more consistent with how OSPF is supposed to used.
There were some issues that BIRD did not allow 'lo' as its iface (i think we changed that in some 2.0.x version but probably it is still true in 1.6.x version). In such case the simplest way is to use dummy iface instead of loopback iface.
Thanks a bunch, using an ospf stub instead of direct did the trick: root@ganges:~# birdc show route 128.0.128.0/20 table internet all BIRD 1.6.6 ready. 128.0.128.0/20 via 10.10.13.1 on tun13 [bgp_reliant 14:50:00 from 10.10.10.31] * (100/15) [AS25513i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 65002 65001 21700 8359 25513 BGP.next_hop: 10.10.10.31 BGP.local_pref: 100 BGP.community: (0,199) (8359,100) (8359,5500) (8359,55277) BGP.large_community: (21700, 101, 3) (21700, 102, 840) (21700, 103, 1) via 10.10.13.1 on tun13 [bgp_archer 14:50:00 from 10.10.10.30] (100/26) [AS25513i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 64515 65534 20473 8359 25513 BGP.next_hop: 10.10.10.30 BGP.local_pref: 100 BGP.community: (20473,200) (64515,44) root@ganges:~# -- Dave