Hello,
I am trying to set MED on a BGP route using the metric value from OSPF, but the
attributes of the next-hop route do not seem to be available in filter
evolution. Am I missing something?
Example Bird 2.0 config:
protocol bgp test_peer {
bfd on;
med metric on;
graceful restart on;
ipv4 {
table test_table;
gateway recursive;
};
local as 65656;
}
protocol ospf t1_igp {
ipv4 {
table test_table;
};
}
OSPF is distributing loopbacks and link nets only. BGP protocols from
‘test_peer’ will use routes learned from ‘t1_igp’ in ‘test_table’ to resolve
next hop information (gateway recursive). So far, so good.
However, I also have an eBGP peer (i.e. who is not participating in my IGP
above) who is multi homed with AS65656. I would like to use MED to inform the
peer about my IGP distances to each exit — something like the ‘metric-out
minimum-igp <offset>’ command in Junos
(https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/metric-out-edit-protocols-bgp.html):
> You can increase or decrease the variable metric calculated from the IGP
> metric (either from the igp or minimum-igp statement) by specifying a value
> for offset. The metric is increased by specifying a positive value for
> offset, and decreased by specifying a negative value for offset.
The problem seems to be that filters may only access attributes of the route
currently processed, and the 'gateway recursive’ channel directive only
calculates next-hop without passing any route attributes of that next-hop
through.
Has anyone had any luck trying something similar?
Many thanks.