Hi All, I am using Bird 2.0.2 version, I create a BGP instance with one channel IPV4, that all work normally. Then I modified configuration file and add new channel IPV6, and using command "configure" under birdc , found the new added channel IPV6 is not announced to peer and channel ipv6 is down state. Then I used "restart bgp", all channels IPV4 and IPV6 are announced, work normally. I also do another test that delete channel in configure file and used "configure", it work normally. Anyone know the difference of actions between "configure" and "restart "? The command "configure" can dynamically modify the BGP protocol configuration, cant the action "configure" re-announce the added/removed capability to peer to update ? Appreciated your help in advance...... Thanks Arvin
On Fri, Jun 22, 2018 at 09:23:02AM +0000, Arvin Gan wrote:
Hi All, I am using Bird 2.0.2 version, I create a BGP instance with one channel IPV4, that all work normally. Then I modified configuration file and add new channel IPV6, and using command "configure" under birdc , found the new added channel IPV6 is not announced to peer and channel ipv6 is down state. Then I used "restart bgp", all channels IPV4 and IPV6 are announced, work normally. I also do another test that delete channel in configure file and used "configure", it work normally. Anyone know the difference of actions between "configure" and "restart "? The command "configure" can dynamically modify the BGP protocol configuration, cant the action "configure" re-announce the added/removed capability to peer to update ?
Hi The capabilities (including supported AFIs/SAFIs) can be announced just during the session establishment, not later. So it is not possible to really add/remove BGP channels without restarting the session. Currently the 'configure' adds/removes the channels while do not trigger restart, so consecutive 'restart' would cause re-establishment. Obviously, just using 'restart' without 'configure' would not read the config file and would keep the old setting. Perhaps we should trigger restart when BGP channels are added/removed and keep current behavior for 'configure soft'. -- 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, Thanks for your response. As my code investigated, the function proto_configure_channel() always return value "1" , that mean the same is true in function bgp_reconfigure(), line 917 of proto.c will ignore the change(add/delete channel)... But if we modify others bgp configuration, i.e, ext_next_hop, the function bgp_reconfigure will return 0, (), line 917 of proto.c will continue to process as PDC_CF_RESTART, is my understand correct ? As your mentioned, any plan to optimize add/remove channel process for command "configure" ? Thanks Arvin -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Tuesday, June 26, 2018 6:22 PM To: Arvin Gan <AGan@advaoptical.com> Cc: bird-users@network.cz Subject: Re: BGP channel add/remove On Fri, Jun 22, 2018 at 09:23:02AM +0000, Arvin Gan wrote:
Hi All, I am using Bird 2.0.2 version, I create a BGP instance with one channel IPV4, that all work normally. Then I modified configuration file and add new channel IPV6, and using command "configure" under birdc , found the new added channel IPV6 is not announced to peer and channel ipv6 is down state. Then I used "restart bgp", all channels IPV4 and IPV6 are announced, work normally. I also do another test that delete channel in configure file and used "configure", it work normally. Anyone know the difference of actions between "configure" and "restart "? The command "configure" can dynamically modify the BGP protocol configuration, cant the action "configure" re-announce the added/removed capability to peer to update ?
Hi The capabilities (including supported AFIs/SAFIs) can be announced just during the session establishment, not later. So it is not possible to really add/remove BGP channels without restarting the session. Currently the 'configure' adds/removes the channels while do not trigger restart, so consecutive 'restart' would cause re-establishment. Obviously, just using 'restart' without 'configure' would not read the config file and would keep the old setting. Perhaps we should trigger restart when BGP channels are added/removed and keep current behavior for 'configure soft'. -- 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 Tue, Jun 26, 2018 at 10:43:59AM +0000, Arvin Gan wrote:
Hi Ondrej, Thanks for your response. As my code investigated, the function proto_configure_channel() always return value "1" , that mean the same is true in function bgp_reconfigure(), line 917 of proto.c will ignore the change(add/delete channel)... But if we modify others bgp configuration, i.e, ext_next_hop, the function bgp_reconfigure will return 0, (), line 917 of proto.c will continue to process as PDC_CF_RESTART, is my understand correct ?
Yes. But the main problem is that generally the infrastructure for adding/removing channels during reconfigure is insufficient to handle that properly. Protocol-specific code can decide whether to force-restart channel in e.g. bgp_channel_reconfigure() for channel reconfiguration, but not for channel add/remove.
As your mentioned, any plan to optimize add/remove channel process for command "configure" ?
Yes, we should design and implement proper hooks to handle this. Although it could be probably hacked in general bgp_reconfigure() hook currently. -- 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, It's great, thanks. Thanks Arvin -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Wednesday, June 27, 2018 6:53 PM To: Arvin Gan <AGan@advaoptical.com> Cc: bird-users@network.cz Subject: Re: BGP channel add/remove On Tue, Jun 26, 2018 at 10:43:59AM +0000, Arvin Gan wrote:
Hi Ondrej, Thanks for your response. As my code investigated, the function proto_configure_channel() always return value "1" , that mean the same is true in function bgp_reconfigure(), line 917 of proto.c will ignore the change(add/delete channel)... But if we modify others bgp configuration, i.e, ext_next_hop, the function bgp_reconfigure will return 0, (), line 917 of proto.c will continue to process as PDC_CF_RESTART, is my understand correct ?
Yes. But the main problem is that generally the infrastructure for adding/removing channels during reconfigure is insufficient to handle that properly. Protocol-specific code can decide whether to force-restart channel in e.g. bgp_channel_reconfigure() for channel reconfiguration, but not for channel add/remove.
As your mentioned, any plan to optimize add/remove channel process for command "configure" ?
Yes, we should design and implement proper hooks to handle this. Although it could be probably hacked in general bgp_reconfigure() hook currently. -- 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 Tue, Jun 26, 2018 at 01:28:08PM +0200, Martin Mares wrote:
Hi,
Perhaps we should trigger restart when BGP channels are added/removed and keep current behavior for 'configure soft'.
yes, please. "configure" was always intended to switch to a new configuration, even in cases when it requires protocol restarts.
OK, i will fix this. -- 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 -
Martin Mares -
Ondrej Zajicek