"OSPF not enabled on this interface" FreeBSD Quagga ospfd interface status
While trying to configuring ospf on a FreeBSD Quagga installed server, I couldn't get ospf to use any of the interfaces.
For all of them, "sh ip ospf int" showed
OSPF not enabled on this interface:
Code:
test_ospf# sh ip ospf interface
em0 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
OSPF not enabled on this interface
gre0 is up
ifindex 5, MTU 1476 bytes, BW 0 Kbit <UP,POINTOPOINT,RUNNING,LINK0,LINK1,MULTICAST>
OSPF not enabled on this interface
lo0 is up
ifindex 4, MTU 16384 bytes, BW 0 Kbit <UP,LOOPBACK,RUNNING,MULTICAST>
OSPF not enabled on this interface
pflog0 is up
ifindex 6, MTU 33208 bytes, BW 0 Kbit <UP,RUNNING,PROMISC>
OSPF not enabled on this interface
rl0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
OSPF not enabled on this interface
xl0 is up
ifindex 1, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST>
OSPF not enabled on this interface
I enabled link-detection, ospf priority
Code:
!
! Zebra configuration saved from vty
! 2010/03/30 19:26:11
!
hostname zebra
password pass
enable password pass
log stdout
!
interface em0
link-detect
!
interface xl0
link-detect
!
ip route 10.1.1.16/28 192.168.1.1
!
ip forwarding
!
!
line vty
!
Code:
! OSPF configuration saved from vty
! 2010/03/30 20:47:48
!
hostname test_ospf
password pass
enable password pass
log stdout
banner motd file /usr/local/etc/quagga/motd
!
!
!
interface em0
ip ospf network non-broadcast
ip ospf hello-interval 1
ip ospf priority 0
ip ospf retransmit-interval 3
!
interface gre0
!
interface lo0
!
interface pflog0
!
interface rl0
!
interface xl0
ip ospf network non-broadcast
!
router ospf
ospf router-id 192.168.25.252
redistribute connected
passive-interface gre0
passive-interface lo0
Upgrading quagga to latest version (quagga-0.99.15_4) didn't help.
I tried adding all the networks to area 0 of ospf, but nothing.
Finally the solution was to compile quagga port in freeBSD to use TCPSOCKETS.
Code:
# cd /usr/ports/net/quagga
# make config
┌────────────────────────────────────────────────────────────────────┐
│ Options for quagga 0.99.15_4 │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ [ ] ISISD Enable experimental ISIS daemon │ │
│ │ [ ] PAM PAM authentication for vtysh │ │
│ │ [ ] OSPF_NSSA NSSA support (RFC1587) │ │
│ │ [ ] OSPF_OPAQUE_LSA OSPF Opaque-LSA support (RFC2370) │ │
│ │ [ ] RTADV IPv6 Router Advertisements │ │
│ │ [ ] SNMP SNMP support │ │
│ │ [X] TCPSOCKETS Use TCP/IP sockets for protocol daemons │ │
│ │ [ ] DLMALLOC Use dlmalloc (makes bgpd much faster) │ │
│ │ [ ] NO_BGP_ANNOUNCE Turn off BGP route announcement │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├─└────────────────────────────────────────────────────────────────┘─┤
│ OK [Cancel] │
└────────────────────────────────────────────────────────────────────┘
The difference is that now ospfd/ripd/bgpd daemons don't get interface information from zebra daemon through the unix socket /var/run/quagga/zserv.api, but through the TCP socket on port 2600 (Inter-process communication is done via TCP socket, instead of unix domain socket). Example:
Code:
# lsof -Pni :2600
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
zebra 45354 quagga 7u IPv4 0xc3ca0ae0 0t0 TCP 127.0.0.1:2600 (LISTEN)
zebra 45354 quagga 10u IPv4 0xc3ca0570 0t0 TCP 127.0.0.1:2600->127.0.0.1:51186 (ESTABLISHED)
zebra 45354 quagga 11u IPv4 0xc3cb8ae0 0t0 TCP 127.0.0.1:2600->127.0.0.1:56584 (ESTABLISHED)
ripd 46154 quagga 8u IPv4 0xc37c9570 0t0 TCP 127.0.0.1:51186->127.0.0.1:2600 (ESTABLISHED)
ospfd 47163 quagga 9u IPv4 0xc3c8e910 0t0 TCP 127.0.0.1:56584->127.0.0.1:2600 (ESTABLISHED)
Here's a sample of the "sh ip ospf int" command in ospfd after compiling quagga with TCPSOCKETS.
Code:
test_ospf> sh ip ospf int
em0 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Internet Address 192.168.0.1/24, Broadcast 192.168.0.255, Area 0.0.0.0
MTU mismatch detection:enabled
Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DROther, Priority 0
No designated router on this network
No backup designated router on this network
Multicast group memberships: OSPFAllRouters
Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
Hello due in 8.100s
Neighbor Count is 0, Adjacent neighbor count is 0
gre0 is up
ifindex 5, MTU 1476 bytes, BW 0 Kbit <UP,POINTOPOINT,RUNNING,LINK0,LINK1,MULTICAST>
OSPF not enabled on this interface
lo0 is up
ifindex 4, MTU 16384 bytes, BW 0 Kbit <UP,LOOPBACK,RUNNING,PROMISC,MULTICAST>
OSPF not enabled on this interface
pflog0 is up
ifindex 6, MTU 33208 bytes, BW 0 Kbit <UP,RUNNING,PROMISC>
OSPF not enabled on this interface
rl0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
OSPF not enabled on this interface
xl0 is up
ifindex 1, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST>
OSPF not enabled on this interface