BIRD: route selection question
Hi, Why in the example below, the route via 194.226.100.51 is the best? According http://bird.network.cz/?get_doc&f=bird-6.html#ss6.1 Route selection rules ... "Prefer the lowest value of the Multiple Exit Discriminator." And at both peers we have commented string --- # default bgp_med 0; # MED value we use for comparison when none is defined --- and the default value is 0. Probably, for the route via 194.226.100.45 , the MED should be counted as zero, and this route should win? BIRD 1.2.5 ready. bird> show route 194.105.192.0/19 all 194.105.192.0/19 via 194.226.100.51 on em0 [R20632x1 2011-03-22 21:37:36] * (100) [AS6820i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 20632 6820 BGP.next_hop: 194.226.100.51 BGP.med: 160 BGP.local_pref: 100 via 194.226.100.45 on em0 [R3277x1 2011-03-16 12:47:37] (100) [AS6820i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 3277 6820 BGP.next_hop: 194.226.100.45 BGP.local_pref: 100
On Mon, Mar 28, 2011 at 01:46:50PM +0400, Mikhail A. Grishin wrote:
Hi,
Why in the example below, the route via 194.226.100.51 is the best?
According http://bird.network.cz/?get_doc&f=bird-6.html#ss6.1 Route selection rules ... "Prefer the lowest value of the Multiple Exit Discriminator."
As specified by BGP standard, MED is used to compare routes only if they came from the same neighboring AS [*]. These came from a different ones (20632 and 3277), so MED is not used and they are probably compared by router ID, time of route or similar low-priority criteria. [*] Perhaps it is not explicitly mentioned in documentation, but it is a standard BGP behavior. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi, Ondrej Thank you for explanation. One more question: is it possible to add "bgp always-compare-med" option in BIRD? Ondrej Zajicek wrote, 28.03.2011 15:31:
On Mon, Mar 28, 2011 at 01:46:50PM +0400, Mikhail A. Grishin wrote:
Hi,
Why in the example below, the route via 194.226.100.51 is the best?
According http://bird.network.cz/?get_doc&f=bird-6.html#ss6.1 Route selection rules ... "Prefer the lowest value of the Multiple Exit Discriminator."
As specified by BGP standard, MED is used to compare routes only if they came from the same neighboring AS [*]. These came from a different ones (20632 and 3277), so MED is not used and they are probably compared by router ID, time of route or similar low-priority criteria.
[*] Perhaps it is not explicitly mentioned in documentation, but it is a standard BGP behavior.
On Mon, Mar 28, 2011 at 03:25:51PM +0400, Mikhail A. Grishin wrote:
Hi, Ondrej
Thank you for explanation.
One more question: is it possible to add "bgp always-compare-med" option in BIRD?
That would not be a problem. A question is under which circumstances such comparison has some sense. Probably only if user overwrites all MEDs on input to the AS. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Apologies for replying to a really old message but... $quoted_author = "Ondrej Zajicek" ;
On Mon, Mar 28, 2011 at 03:25:51PM +0400, Mikhail A. Grishin wrote:
Hi, Ondrej
Thank you for explanation.
One more question: is it possible to add "bgp always-compare-med" option in BIRD?
That would not be a problem. A question is under which circumstances such comparison has some sense. Probably only if user overwrites all MEDs on input to the AS.
Manipulating MED is not common but also not unusual. It tends to be used in situations where manipulating LOCAL_PREF results in too many sub-optimal paths and letting the decision fall through to ROUTER_ID would not achieve the desired effect. e.g. - Two different upstreams - We want to use shortest AS_PATH where possible - But if AS_PATH is same length we want to prefer ISP A - We can't adjust LOCAL_PREF with a prefix filter because it's not a known set - But ROUTER_ID would pick ISP B - Only option is to manipulate MED and use always-compare-med
On Fri, May 13, 2011 at 07:21:57AM +0200, Martin Barry wrote:
One more question: is it possible to add "bgp always-compare-med" option in BIRD?
That would not be a problem. A question is under which circumstances such comparison has some sense. Probably only if user overwrites all MEDs on input to the AS.
Manipulating MED is not common but also not unusual. It tends to be used in situations where manipulating LOCAL_PREF results in too many sub-optimal paths and letting the decision fall through to ROUTER_ID would not achieve the desired effect.
Yes, we implemented this feature in 1.3.1 (option 'med metric'). -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Martin Barry -
Mikhail A. Grishin -
Ondrej Zajicek