Feature requests

Stefan Hellermann stefan at the2masters.de
Thu May 5 23:37:57 CEST 2011


I have one feature request besides new protocols: Support the source
attribute of routing table entries in linux. It's only important for
udp-connections to a router running bird.
Example: Two router (A and B) with bird on them, a lan connected to each
one and a VPN link between them. OSPF is used to tell router B the route
to the lan behind router A and vice versa.

Router A:
192.168.254.0/24 dev eth0  proto kernel  scope link  src 192.168.254.1
(local lan, created with ifconfig)
10.10.254.0/24 dev tun0  proto kernel  scope link  src 10.10.254.1
(link to router B, created from openvpn)
192.168.1.0/24 via 10.10.254.5 dev tun0  proto bird
(the lan at router B, created by bird)
Router B:
192.168.1.0/24 dev lan  proto kernel  scope link  src 192.168.1.1
(local lan, created with ifconfig)
10.10.254.0/24 dev tun2  proto kernel  scope link  src 10.10.254.5
(link to router A, created from openvpn)
192.168.254.0/24 via 10.10.254.1 dev tun2  proto bird
(the lan at router A, created by bird)

Note there is no src on the routes from bird.
Now try do to a dns-lookup from lan at A to the dns-server installed on
router B, using the lan ip of the router:
$host fritz.box 192.168.1.1
;; reply from unexpected source: 10.10.254.5#53, expected 192.168.1.1#53
;; reply from unexpected source: 10.10.254.5#53, expected 192.168.1.1#53
;; connection timed out; no servers could be reached

I could use IP 10.10.254.5, but I don't want the transfer-IPs to be
used. I only want to have the two lans with the two subnets used/visible.

Solution: Change the routes created from bird and set the src attribute
to the wanted IP.
Router A:
# ip r change 192.168.1.0/24 via 10.10.254.5 dev tun0 src 192.168.254.1
Router B:
# ip r change 192.168.254.0/24 via 10.10.254.1 dev tun2 src 192.168.1.1

Now everything works as expected:
On lan at router A:
$ host fritz.box 192.168.1.1
Using domain server:
Name: 192.168.1.1
Address: 192.168.1.1#53
Aliases:

fritz.box has address 192.168.1.1


I hope you understand the example.
So my feature request: Support of the src attribe of the linux routing
table in bird. I think of setting it somewhere in bird config, maybe a
filter.

Thanks,
Stefan Hellermann






More information about the Bird-users mailing list