multicast not leaving server

Hi,

We are building a WANemulator; there are currently two test remote sites connected to the FreeBSD server through two Cisco routers. FreeBSD works well and we can add delays: ping to and from the routers show the expected delay.

The problem is that OpenOSPF is not working. It sees the HELLO packets from the routers but they never reach full adjacency. Cisco OSPF debug does not display any HELLO packets. For the purpose of this post, we can consider a multicast ping. Ping from a router to 224.0.0.5 receives replies from other Cisco gear but not from the FreeBSD server. Similar pings from FreeBSD do not get any responses.

I have already discovered that multicast will not work without a default route or a multicast route. I have added a multicast route.

I am new to FreeBSD, have used NetBSD about fifteen years ago, and used Solaris and Linux in the mean time.

Here is the out put from uname -a

Code:
FreeBSD WAMemu 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013
root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
the output from ifconfig

Code:
bce0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
    ether 00:1e:0b:90:2e:e0
    inet x.x.x.14 netmask 0xfffffff8 broadcast x.x.x.15
    inet6 fe80::21e:bff:fe90:2ee0%bce0 prefixlen 64 scopeid 0x1 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet 100baseTX <full-duplex>
    status: active
bce1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
    ether 00:1e:0b:90:2e:dc
    inet x.x.x.189 netmask 0xfffffff8 broadcast x.x.x.191
    inet6 fe80::21e:bff:fe90:2edc%bce1 prefixlen 64 scopeid 0x2 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet 100baseTX <full-duplex>
    status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0xa 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
the output from netstat -rnf inet

Code:
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
127.0.0.1          link#10            UH          0       76    lo0
131.140.113.8/29   link#1             U           0        0   bce0
131.140.113.14     link#1             UHS         0        0    lo0
131.140.113.184/29 link#2             U           0        0   bce1
131.140.113.189    link#2             UHS         0        0    lo0
224.0.0.0/4        lo0                US          0      794    lo0
and the output from ipfw show

Code:
00010 313 25856 pipe 1 ip from any to any out xmit bce0
00020 315 26036 pipe 2 ip from any to any out xmit bce1
00100 892 72720 allow ip from any to any via lo0
00200   0     0 deny ip from any to 127.0.0.0/8
00300   0     0 deny ip from 127.0.0.0/8 to any
00400   0     0 deny ip from any to ::1
00500   0     0 deny ip from ::1 to any
00600   0     0 allow ipv6-icmp from :: to ff02::/16
00700   0     0 allow ipv6-icmp from fe80::/10 to fe80::/10
00800   0     0 allow ipv6-icmp from fe80::/10 to ff02::/16
00900   0     0 allow ipv6-icmp from any to any ip6 icmp6types 1
01000   0     0 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
65000 633 73428 allow ip from any to any
65535   8   684 deny ip from any to any
I will be grateful for any assistance you can provide.

Thank you.

--
C Marinier
 
CMarinier said:
I have already discovered that multicast will not work without a default route or a multicast route. I have added a multicast route.
How did you add the route? It looks like you're routing to lo0 now. So any outgoing packets for 224.0.0.5 will get routed to lo0. That's probably not what you want.
 
Solved: multicast not leaving server

Originally Posted by CMarinier
I have already discovered that multicast will not work without a default route or a multicast route. I have added a multicast route.
How did you add the route? It looks like you're routing to lo0 now. So any outgoing packets for 224.0.0.5 will get routed to lo0. That's probably not what you want.
I was following advice I found after hours of searching. There is not much information on this topic. I replaced the 224.0.0.0 route with a default route to one of the server's IP addresses and all is well.

Multicast sure is strange.

Thank you.
 
Solved: multicast not leaving server - more adventures

Hi,

Solved? ... not quite there yet. The OSPF multicast packets were getting out only on the one interface instead of both interfaces like it should. The correct configuration should not require default routes, or multicast routing, or ... It should just work.

It turns out the problem is that IPFW pipes drop multicast packets. I need the pipes to emulate WAN delay, bandwidth limits, etc. The solution is to add an IPFW rule to pass OSPF packets before the pipes.

${fwcmd} add 1 pass ospf from any to any

The WAN emulator now works well. The Cisco routers achieve full adjacency and they exchange routes happily.

Hum ... one might consider this pipe behaviour to be incorrect.

Lesson: IPFW pipes and multicast do not mix / IPFW pipes and OSPF do not mix.
 
Back
Top