running two bird daemons which listen on loopback IP
Hi, For testing purposes I want to run two bird instances which listen on two different IPs. Those IP addresses are assigned to loopback interface(Linux box). I have configured BGP but each daemon is waiting the other to become neighbor. I run tcpdump on loopback interface and I don't see any network traffic, and I am wondering if using loopback inteface isn't supported. Cheers, Pavlos
Hi, Trying to connect to the same machine is not supported. If you need to run two BIRDs on one machine, use network namespaces or another kind of virtualization. Maria On June 19, 2018 5:34:06 PM GMT+02:00, Pavlos Parissis <pavlos.parissis@gmail.com> wrote:
Hi,
For testing purposes I want to run two bird instances which listen on two different IPs. Those IP addresses are assigned to loopback interface(Linux box). I have configured BGP but each daemon is waiting the other to become neighbor.
I run tcpdump on loopback interface and I don't see any network traffic, and I am wondering if using loopback inteface isn't supported.
Cheers, Pavlos
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On Tue, Jun 19, 2018 at 05:34:06PM +0200, Pavlos Parissis wrote:
Hi,
For testing purposes I want to run two bird instances which listen on two different IPs. Those IP addresses are assigned to loopback interface(Linux box). I have configured BGP but each daemon is waiting the other to become neighbor.
I run tcpdump on loopback interface and I don't see any network traffic, and I am wondering if using loopback inteface isn't supported.
Hi It is likely unrelated to loopback. There are two cases: BGP is EBGP (direct mode) - in this case BIRD checks if the destination IP address is a direct neighbor and a local address is not considered direct neighbor, so there is 'waiting to become neighbor' issue. BGP is IBGP (multihop mode) - in this case it is regular TCP connection and two local BIRD instances on two different local IPs work just fine. You can switch to IBGP (same AS numbers) or just force multihop for EBGP mode ('multihop' option). -- 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 19/06/2018 06:19 μμ, Ondrej Zajicek wrote:
On Tue, Jun 19, 2018 at 05:34:06PM +0200, Pavlos Parissis wrote:
Hi,
For testing purposes I want to run two bird instances which listen on two different IPs. Those IP addresses are assigned to loopback interface(Linux box). I have configured BGP but each daemon is waiting the other to become neighbor.
I run tcpdump on loopback interface and I don't see any network traffic, and I am wondering if using loopback inteface isn't supported.
Hi
It is likely unrelated to loopback. There are two cases:
BGP is EBGP (direct mode) - in this case BIRD checks if the destination IP address is a direct neighbor and a local address is not considered direct neighbor, so there is 'waiting to become neighbor' issue.
BGP is IBGP (multihop mode) - in this case it is regular TCP connection and two local BIRD instances on two different local IPs work just fine.
You can switch to IBGP (same AS numbers) or just force multihop for EBGP mode ('multihop' option).
That was the missing option to get it working. I had "direct" and replace it with "multihop". I also had to set "listen bgp address <IP1>" in order to not listen to all IPs as a single instance running was gaving me errors: BGP: Unexpected connect from unknown address 10.52.12.1 (port 46089) Here is my compete config where 10.52.12.0/24 are assigned to loopback interface cat bird-server.conf log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug }; timeformat protocol "%F %T %s"; timeformat route "%F %T %s"; router id 10.52.12.1; listen bgp address 10.52.12.1; protocol device { scan time 10; } protocol static { disabled yes; } protocol direct direct1 { interface "lo"; debug all; export none; import all; } protocol bgp BGP1 { disabled no; description "Peer-BGP1"; neighbor 10.52.12.2 as 64815; source address 10.52.12.1; bfd off; debug all; #debug { states, routes, filters, interfaces, events }; import none; export all; #direct; multihop; hold time 10; startup hold time 240; connect retry time 120; keepalive time 3; connect delay time 5; error wait time 10, 300; error forget time 300; disable after error off; next hop self; path metric 1; default bgp_med 0; default bgp_local_pref 0; local as 64815; } at bird-switch.conf log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug }; debug protocols all; timeformat protocol "%F %T %s"; timeformat route "%F %T %s"; router id 10.52.12.2; listen bgp address 10.52.12.2; protocol device { disabled yes; } protocol static { disabled yes; } protocol direct direct1 { disabled yes; } protocol bgp BGP1SWITCH { disabled no; description "Switch-BGP1"; neighbor 10.52.12.1 as 64815; source address 10.52.12.2; debug all; bfd off; debug { states, routes, filters, interfaces, events }; import all; export none; multihop; hold time 10; startup hold time 240; connect retry time 120; keepalive time 3; connect delay time 5; error wait time 10, 300; error forget time 300; disable after error off; next hop self; path metric 1; default bgp_med 0; default bgp_local_pref 0; local as 64815; } Thanks a lot for your assistance, it is very much appreciated. Cheers, Pavlos
participants (3)
-
Maria Jan Matějka -
Ondrej Zajicek -
Pavlos Parissis