Seems I can't get bird to open a bgp listen socket
Hi Bird users, I'm setting up a bird test router, using bird 1.3.9 on debian squeeze (backport of the packages in unstable). It seems I cannot get bird to listen on tcp port 179. tcpdump shows outgoing traffic from 10.140.59.20 to 10.140.59.16, but there's just nothing listening on port 179 when I start bird. $ netstat -an | grep 179 $ This really feels like I'm missing something small, something stupid. Here's my test config: router id 10.140.59.20; debug protocols all; protocol kernel { persist; scan time 60; import none; # filter!!1~1 export all; } protocol device { scan time 60; } protocol static { import all; route 10.0.0.0/8 blackhole; route 172.16.0.0/12 blackhole; route 192.168.0.0/16 blackhole; debug all; } protocol ospf ospf1918 { area 0.0.0.0 { interface "eth2" { authentication cryptographic; password "xxxx" { id 25; }; }; interface "eth1" { stub; }; interface "lo" { stub; }; }; } protocol bgp bgp1918_knud { import all; local as 64521; source address 10.140.59.20; keepalive time 20; hold time 60; neighbor 10.140.59.16 as 64521; } protocol bgp bgp1918_oele { import all; local as 64521; source address 10.140.59.20; keepalive time 20; hold time 60; neighbor 10.140.59.18 as 64521; } I tried to explicitely add "listen bgp address 0.0.0.0 port 179;" to the config, but still no listening 179. Logs do not show any errors or warnings why the listening socket is not opened... Jan 20 14:29:12 cabbage bird: bgp1918_knud: Initializing Jan 20 14:29:12 cabbage bird: bgp1918_oele: Initializing Jan 20 14:29:12 cabbage bird: bgp1918_knud: Starting Jan 20 14:29:12 cabbage bird: bgp1918_oele: Starting Jan 20 14:29:12 cabbage bird: bgp1918_oele: Waiting for 10.140.59.18 to become my neighbor Jan 20 14:29:12 cabbage bird: bgp1918_knud: Waiting for 10.140.59.16 to become my neighbor Here's some output of show protocols. bird> show protocols all bgp1918_oele name proto table state since info bgp1918_oele BGP master start 14:19 Idle Preference: 100 Input filter: ACCEPT Output filter: REJECT Routes: 0 imported, 0 exported, 0 preferred Route change stats: received rejected filtered ignored accepted Import updates: 0 0 0 0 0 Import withdraws: 0 0 --- 0 0 Export updates: 0 0 0 --- 0 Export withdraws: 0 --- --- --- 0 BGP state: Idle Neighbor address: 10.140.59.18 Neighbor AS: 64521 -- Hans van Kranenburg - System / Network Engineer T +31 (0)10 2760434 | hans.van.kranenburg@mendix.com | www.mendix.com
On 01/20/2013 02:37 PM, Hans van Kranenburg wrote:
Hi Bird users,
I'm setting up a bird test router, using bird 1.3.9 on debian squeeze (backport of the packages in unstable).
It seems I cannot get bird to listen on tcp port 179. tcpdump shows outgoing traffic from 10.140.59.20 to 10.140.59.16, but there's just nothing listening on port 179 when I start bird.
$ netstat -an | grep 179 $
This really feels like I'm missing something small, something stupid.
And it was... @@ -46,6 +45,7 @@ protocol bgp bgp1918_knud { keepalive time 20; hold time 60; neighbor 10.140.59.16 as 64521; + multihop; } protocol bgp bgp1918_oele { @@ -55,4 +55,5 @@ protocol bgp bgp1918_oele { keepalive time 20; hold time 60; neighbor 10.140.59.18 as 64521; + multihop; } And now I have a listening port... tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN Feature request: can bird please made to log a warning in this scenario, something like "WARN: Ignoring blah because neigbor not in a directly connected subnet blah, so not going to listen on 179 blah?" -- Hans van Kranenburg - System / Network Engineer T +31 (0)10 2760434 | hans.van.kranenburg@mendix.com | www.mendix.com
On Sun, Jan 20, 2013 at 03:17:16PM +0100, Hans van Kranenburg wrote:
And now I have a listening port...
tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN
Feature request: can bird please made to log a warning in this scenario, something like "WARN: Ignoring blah because neigbor not in a directly connected subnet blah, so not going to listen on 179 blah?"
Well, the BGP protocol is not ignored in this case, just its initialization is postponed until such subnet appears. This could be completely OK situation, like if BIRD is started before network interfaces are initialized. And with 'debug { events }', there is a log message: "Waiting for XXXX to become my neighbor" -- 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 01/21/2013 12:37 PM, Ondrej Zajicek wrote:
On Sun, Jan 20, 2013 at 03:17:16PM +0100, Hans van Kranenburg wrote:
And now I have a listening port...
tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN
Feature request: can bird please made to log a warning in this scenario, something like "WARN: Ignoring blah because neigbor not in a directly connected subnet blah, so not going to listen on 179 blah?"
Well, the BGP protocol is not ignored in this case, just its initialization is postponed until such subnet appears. This could be completely OK situation, like if BIRD is started before network interfaces are initialized.
Aha, that explains it to me.
And with 'debug { events }', there is a log message:
"Waiting for XXXX to become my neighbor"
Yes, because I initially overlooked the fact I had to specify multihop, I was stuck in trying to resolve the fact that tcp/179 was not listening yet. Now I know these two things are related. Thanks, -- Hans van Kranenburg - System / Network Engineer +31 (0)10 2760434 | hans.van.kranenburg@mendix.com | www.mendix.com
On Mon, Jan 21, 2013 at 12:37:28PM +0100, Hans van Kranenburg wrote:
"Waiting for XXXX to become my neighbor"
Yes, because I initially overlooked the fact I had to specify multihop, I was stuck in trying to resolve the fact that tcp/179 was not listening yet. Now I know these two things are related.
You are right that postponing of initialization of the listening socket in that case is probably a bit confusing. It is more like a side-effect than a primary intent. -- 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 (2)
-
Hans van Kranenburg -
Ondrej Zajicek