Hi, I notice that there is a description of route selection algorithm: The global best route selection algorithm is (roughly) as follows: * Preferences of the routes are compared. * Source protocol instance preferences are compared. * If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. * If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined. And I also notice that normally the configuration "Administrative Distance" that is mapped to preference under channel in bird is different between eBGP (default value 20) and iBGP (default value 200). My question is : If iBgp preference is lower than eBGP preference that mean iBGP priority higher than eBGP, iBGP route is selected or eBGP route is selected, do anyone know it? But in BGP instance, eGBP is prior than iBGP.... Appreciated in advance! Thanks Arvin
On Tue, Apr 17, 2018 at 10:50:24AM +0000, Arvin Gan wrote:
Hi, I notice that there is a description of route selection algorithm:
The global best route selection algorithm is (roughly) as follows:
* Preferences of the routes are compared. * Source protocol instance preferences are compared. * If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. * If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined.
And I also notice that normally the configuration "Administrative Distance" that is mapped to preference under channel in bird is different between eBGP (default value 20) and iBGP (default value 200).
Hi No, default value is 200 for both EBGP and IBGP. Where did you noticed 20? -- 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."
On 4/17/18 8:20 AM, Ondrej Zajicek wrote:
Hi
No, default value is 200 for both EBGP and IBGP. Where did you noticed 20?
20 is Cisco's default admin distance for EBGP. -- inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP: https://inoc.net/~rblayzor/
Hi all, Sorry, it's my ambiguous description. What I said default value is Cisco's admin distance value, eBGP is 20 and iBGP is 200. We plan to use preference to implement admin distance. Actually ,in bird, the preference of channel for BGP is BGP protocol default preference DEF_PREF_BGP ( = 100). 1) Since the configuration of preference is in channel ,if the protocol have more than one channel, does mean different channel can configure different preference in the same protocol ? 2) I also notice that " new->pref = c->preference; " in rte_update2, does mean the preference of route in route table get from preference of channel ? 3) When route selection, does mean algorithm selection compare preference of every route firstly , whether compare the preference of routes coming from same protocol ? The global best route selection algorithm is (roughly) as follows: ---> Does routes selection be processed as below sequence ? * Preferences of the routes are compared. ----> what's preference of the route, is preference in channel-config ? * Source protocol instance preferences are compared. --> what's protocol instance preference, is preference in channel-config for BGP protocol instance? * If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. --->source protocols, iBGP and eBGP are treated as same source protocol ? * If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined. The Admin distance of Cisco for eBGP and iBGP: https://supportforums.cisco.com/t5/wan-routing-and-switching/administrative-... Thanks Arvin -----Original Message----- From: Bird-users <bird-users-bounces@network.cz> On Behalf Of Robert Blayzor Sent: Tuesday, April 17, 2018 10:07 PM To: bird-users@network.cz Subject: Re: BGP route selection On 4/17/18 8:20 AM, Ondrej Zajicek wrote:
Hi
No, default value is 200 for both EBGP and IBGP. Where did you noticed 20?
20 is Cisco's default admin distance for EBGP. -- inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP: https://inoc.net/~rblayzor/
On Wed, Apr 18, 2018 at 03:35:43AM +0000, Arvin Gan wrote:
Hi all, Sorry, it's my ambiguous description. What I said default value is Cisco's admin distance value, eBGP is 20 and iBGP is 200. We plan to use preference to implement admin distance. Actually ,in bird, the preference of channel for BGP is BGP protocol default preference DEF_PREF_BGP ( = 100). 1) Since the configuration of preference is in channel ,if the protocol have more than one channel, does mean different channel can configure different preference in the same protocol ?
Yes
2) I also notice that " new->pref = c->preference; " in rte_update2, does mean the preference of route in route table get from preference of channel ?
Yes, the channel preference is just a default value for route preference (could be changed even per-route by filters).
3) When route selection, does mean algorithm selection compare preference of every route firstly , whether compare the preference of routes coming from same protocol ?
Yes
The global best route selection algorithm is (roughly) as follows: ---> Does routes selection be processed as below sequence ?
* Preferences of the routes are compared. ----> what's preference of the route, is preference in channel-config ? * Source protocol instance preferences are compared. --> what's protocol instance preference, is preference in channel-config for BGP protocol instance?
This is a bit confusing in documentation, there is just route preference (which is compared as a first step). Protocol/channel preference is just a default value for route preference.
* If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. --->source protocols, iBGP and eBGP are treated as same source protocol ?
Yes
* If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined.
-- 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, Onderj, thank you! I notice this codes in rte_better() in file rt-table.c. Since iBGP and eBGP have same protocol preference, that mean route preference are also same. In this case, if we have one iBGP instance and one eBGP instance, since instance address are different, route selection will entry this branch as blow, yes ? but we cannot ensure address of eBGP is prior than address of iBGP... is it based on sequence of BGP instance in bird.conf ? if (new->attrs->src->proto->proto != old->attrs->src->proto->proto) { /* * If the user has configured protocol preferences, so that two different protocols * have the same preference, try to break the tie by comparing addresses. Not too * useful, but keeps the ordering of routes unambiguous. */ return new->attrs->src->proto->proto > old->attrs->src->proto->proto; } Thanks Arvin -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Wednesday, April 18, 2018 10:58 PM To: Arvin Gan <AGan@advaoptical.com> Cc: bird-users@network.cz; Robert Blayzor <rblayzor.bulk@inoc.net> Subject: Re: BGP route selection On Wed, Apr 18, 2018 at 03:35:43AM +0000, Arvin Gan wrote:
Hi all, Sorry, it's my ambiguous description. What I said default value is Cisco's admin distance value, eBGP is 20 and iBGP is 200. We plan to use preference to implement admin distance. Actually ,in bird, the preference of channel for BGP is BGP protocol default preference DEF_PREF_BGP ( = 100). 1) Since the configuration of preference is in channel ,if the protocol have more than one channel, does mean different channel can configure different preference in the same protocol ?
Yes
2) I also notice that " new->pref = c->preference; " in rte_update2, does mean the preference of route in route table get from preference of channel ?
Yes, the channel preference is just a default value for route preference (could be changed even per-route by filters).
3) When route selection, does mean algorithm selection compare preference of every route firstly , whether compare the preference of routes coming from same protocol ?
Yes
The global best route selection algorithm is (roughly) as follows: ---> Does routes selection be processed as below sequence ?
* Preferences of the routes are compared. ----> what's preference of the route, is preference in channel-config ? * Source protocol instance preferences are compared. --> what's protocol instance preference, is preference in channel-config for BGP protocol instance?
This is a bit confusing in documentation, there is just route preference (which is compared as a first step). Protocol/channel preference is just a default value for route preference.
* If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. --->source protocols, iBGP and eBGP are treated as same source protocol ?
Yes
* If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined.
-- 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, Thanks. I notice this codes in rte_better() in file rt-table.c. Since iBGP and eBGP have same protocol preference, that mean route preference are also same. In this case, if we have one iBGP instance and one eBGP instance, since instance address are different, route selection will entry this branch as blow, yes ? but we cannot ensure address of eBGP is prior than address of iBGP... is it based on sequence of BGP instance in bird.conf ? if (new->attrs->src->proto->proto != old->attrs->src->proto->proto) { /* * If the user has configured protocol preferences, so that two different protocols * have the same preference, try to break the tie by comparing addresses. Not too * useful, but keeps the ordering of routes unambiguous. */ return new->attrs->src->proto->proto > old->attrs->src->proto->proto; } Thanks Arvin -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Wednesday, April 18, 2018 10:58 PM To: Arvin Gan <AGan@advaoptical.com> Cc: bird-users@network.cz; Robert Blayzor <rblayzor.bulk@inoc.net> Subject: Re: BGP route selection On Wed, Apr 18, 2018 at 03:35:43AM +0000, Arvin Gan wrote:
Hi all, Sorry, it's my ambiguous description. What I said default value is Cisco's admin distance value, eBGP is 20 and iBGP is 200. We plan to use preference to implement admin distance. Actually ,in bird, the preference of channel for BGP is BGP protocol default preference DEF_PREF_BGP ( = 100). 1) Since the configuration of preference is in channel ,if the protocol have more than one channel, does mean different channel can configure different preference in the same protocol ?
Yes
2) I also notice that " new->pref = c->preference; " in rte_update2, does mean the preference of route in route table get from preference of channel ?
Yes, the channel preference is just a default value for route preference (could be changed even per-route by filters).
3) When route selection, does mean algorithm selection compare preference of every route firstly , whether compare the preference of routes coming from same protocol ?
Yes
The global best route selection algorithm is (roughly) as follows: ---> Does routes selection be processed as below sequence ?
* Preferences of the routes are compared. ----> what's preference of the route, is preference in channel-config ? * Source protocol instance preferences are compared. --> what's protocol instance preference, is preference in channel-config for BGP protocol instance?
This is a bit confusing in documentation, there is just route preference (which is compared as a first step). Protocol/channel preference is just a default value for route preference.
* If source protocols are the same (e.g. BGP vs. BGP), the protocol's route selection algorithm is invoked. --->source protocols, iBGP and eBGP are treated as same source protocol ?
Yes
* If source protocols are different (e.g. BGP vs. OSPF), result of the algorithm is undefined.
-- 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)
-
Arvin Gan -
Ondrej Zajicek -
Robert Blayzor