OSPFv3 (IPv6) over OpenVPN IPv4 PTP connection.

Paul Libert paul.libert at gmail.com
Fri Nov 23 17:39:31 CET 2012


Hi List !

I'm trying to get bird6 OSPF working over a OpenVPN link on Ubuntu Linux.
bird (IPv4) works fine.

This is a Ubuntu Precise box but I upgraded bird to last version (1.3.8)
It's talking with other Ubuntu boxes running quagga over OpenVPN links
using tun interfaces.

The relevant part of the bird6.conf is
protocol ospf ospf1 {
        tick 2;
        rfc1583compat yes;
        area 0.0.0.0 {
                stub no;
                interface "tun*" {
                        type ptp;
                };
        };
}

This is exactly the same as the one in the bird.conf file.
On IPv4, the machines can establish OSPF communication as show by the
output from birdc:
bird> show ospf interface
ospf1:
Interface tun0 (peer 10.200.0.2)
        Type: ptp
        Area: 0.0.0.0 (0)
        State: ptp
        Priority: 1
        Cost: 10
        Hello timer: 10
        Wait timer: 40
        Dead timer: 40
        Retransmit timer: 5
Interface tun1 (peer 10.200.1.1)
        Type: ptp
        Area: 0.0.0.0 (0)
        State: ptp
        Priority: 1
        Cost: 10
        Hello timer: 10
        Wait timer: 40
        Dead timer: 40
        Retransmit timer: 5

On IPv6, the bird6 never try to establish connection, interface stay
in the down state because they are marked as stub:
bird> show ospf interface
ospf1:
Interface tun0 (IID 0)
        Type: ptp
        Area: 0.0.0.0 (0)
        State: down (stub)
        Priority: 1
        Cost: 10
        Hello timer: 10
        Wait timer: 40
        Dead timer: 40
        Retransmit timer: 5
Interface tun1 (IID 0)
        Type: ptp
        Area: 0.0.0.0 (0)
        State: down (stub)
        Priority: 1
        Cost: 10
        Hello timer: 10
        Wait timer: 40
        Dead timer: 40
        Retransmit timer: 5

I tracked it down to ospf_iface_stubby in proto/ospf/iface.c returning
1 because IA_HOST bit is set.
IA_HOST bit is set because in sysdep/linux/netlink.c, in
nl_parse_addr, ipa_equal(ifa.ip, addr) is true.
I cannot add a peer IPv6 address on a OpenVPN tun interface (and I
think that's what's make it work on IPv4 so the ip address output
looks like:
9: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1450 qdisc
pfifo_fast state UNKNOWN qlen 100
    link/none
    inet 10.200.0.1 peer 10.200.0.2/32 scope global tun0
    inet6 2001:470:e553:1::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe79:ed82/128 scope link
       valid_lft forever preferred_lft forever
10: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1450 qdisc
pfifo_fast state UNKNOWN qlen 100
    link/none
    inet 10.200.1.2 peer 10.200.1.1/32 scope global tun1
    inet6 fe80::216:3eff:fe79:ed82/128 scope link
       valid_lft forever preferred_lft forever

I tried to use 'neighbors' stanza specifying the ip address of the
peer, with types in  ptp, ptmp, broadcast, nonbroadcast without
success.

I'm probably missing something obvious and would be glad if someone
could point it out to me.

If I use quagga on both side of the link, everything works.
For reference, here is a tshark output of the link traffic:
  0.000000   10.200.1.1 -> 224.0.0.5    OSPF 68 Hello Packet
  0.000225   10.200.1.2 -> 224.0.0.5    OSPF 68 Hello Packet
  0.852653 fe80::216:3eff:feb4:31b -> ff02::5      OSPF 76 Hello Packet
 10.000924   10.200.1.1 -> 224.0.0.5    OSPF 68 Hello Packet
 10.001042   10.200.1.2 -> 224.0.0.5    OSPF 68 Hello Packet
 10.031023   10.200.1.1 -> 224.0.0.5    OSPF 84 LS Update
 10.862718 fe80::216:3eff:feb4:31b -> ff02::5      OSPF 76 Hello Packet
 11.044247   10.200.1.2 -> 10.200.1.1   OSPF 64 LS Acknowledge
 20.002061   10.200.1.1 -> 224.0.0.5    OSPF 68 Hello Packet
 20.002272   10.200.1.2 -> 224.0.0.5    OSPF 68 Hello Packet
 20.872998 fe80::216:3eff:feb4:31b -> ff02::5      OSPF 76 Hello Packet

It shows the IPV4 OSPF broadcast of both node and the v6 broadcast of
the quagga node.

Cheers !

Paul



More information about the Bird-users mailing list