RE: BIRD on FreeBSD 9.2 (amd64) - OSPF is not putting routes in the routing table

2013-11-21 Thread Claude Marinier

On November 21, 2013 3:15 PM , Ondrej Filip wrote:
 On 21.11.2013 21:09, Claude Marinier wrote:
  Hi,
 
 Hi!
 
  I am running BIRD 1.3.11 on FreeBSD 9.2 (amd64). It establishes
  full adjacency with its three neighbours (Cisco routers) and its
  routing table is correct. BIRD knows about the routers behind its
  neighbours. The problem is that the kernel does not know any of the
  learned routes, i.e. 'netstat -rnf inet' shows only routes for the
  interfaces.
 
 Add a line 'export all' to the kernel protocol.

Here is some text from the documentation : 3.3 Protocol Options

import all | none | filter name | filter { filter commands } | ...
Specify a filter to be used for filtering routes coming from the
protocol to the routing table. all is shorthand for where true and
none is shorthand for where false. Default: all.
export filter
This is similar to the import keyword, except that it works in the
direction from the routing table to the protocol. Default: none.

In my case, the protocol is OSPF. I want to copy routes learned by the
protocol to the routing table. The documentation says to use import
but you are saying export. Which is correct?

   Ondrej
 
  I suspect that I am missing something basic but have not found it
  yet after many hours of searching. Could someone point me in the
  right direction?
 
  Thank you.
 
  The configuration file follows.



RE: FreeBSD, OSPF, and multicast

2013-11-01 Thread Claude Marinier
 -Original Message-
 From: Claude Marinier
 Sent: Friday, November 01, 2013 9:05 AM
 To: 'Ondrej Filip'
 Subject: RE: FreeBSD, OSPF, and multicast
 
  -Original Message-
  From: owner-bird-us...@atrey.karlin.mff.cuni.cz [mailto:owner-bird-
  us...@atrey.karlin.mff.cuni.cz] On Behalf Of Ondrej Filip
  Sent: Thursday, October 31, 2013 6:37 PM
  To: Claude Marinier; bird-us...@bird.network.cz
  Subject: Re: FreeBSD, OSPF, and multicast
 
  On 31.10.2013 14:38, Claude Marinier wrote:
   Hi,
  
   I am building a WAN emulator using a FreeBSD server with DummyNet
   for WAN effects and BIRD for OSPF. At first, no multicast packets
   left the server; then I added a default route and they left by that
   interface only. How can I configure the server so BIRD sends HELLO
   packets out all the interfaces.
 
  Can you send 'show ospf interfaces' and maybe also check if there are
  no errors
 
 BIRD 1.3.11 ready.
 bird show ospf int
 WANemu:
 Interface bce0 (xxx.xxx.xxx.8/29)
 Type: broadcast
 Area: 0.0.0.0 (0)
 State: dr
 Priority: 1
 Cost: 10
 Hello timer: 10
 Wait timer: 40
 Dead timer: 40
 Retransmit timer: 5
 Designed router (ID): xxx.xxx.xxx.14
 Designed router (IP): xxx.xxx.xxx.14
 Backup designed router (ID): 0.0.0.0
 Backup designed router (IP): 0.0.0.0 Interface bce1 
 (xxx.xxx.xxx.184/29)
 Type: broadcast
 Area: 0.0.0.0 (0)
 State: dr
 Priority: 1
 Cost: 10
 Hello timer: 10
 Wait timer: 40
 Dead timer: 40
 Retransmit timer: 5
 Designed router (ID): xxx.xxx.xxx.14
 Designed router (IP): xxx.xxx.xxx.189
 Backup designed router (ID): 0.0.0.0
 Backup designed router (IP): 0.0.0.0
 bird show ospf neighbors
 WANemu:
 Router ID   Pri  State  DTime   Interface  Router IP
 xxx.xxx.xxx.9 1 init/other  00:37   bce0   xxx.xxx.xxx.9
 xxx.xxx.xxx.185   1 init/other  00:33   bce1   xxx.xxx.xxx.185
 
  bird echo all
  bird debug all all
 
 There is a lot of output. How can this be restricted to HELLO messages?

Got something useful from 'debug all all'.

 device1: Scanning interfaces
 WANemu: HELLO packet received from 131.140.113.9 via bce0
 WANemu: HELLO packet received from 131.140.113.185 via bce1
 device1: Scanning interfaces
 WANemu: HELLO packet sent via bce1
 WANemu: HELLO packet sent via bce0
 WANemu: HELLO packet received from 131.140.113.9 via bce0
 WANemu: HELLO packet received from 131.140.113.185 via bce1
 
I am also running 'tcpdump' on one of the interfaces:
 - it does not show bird's HELLO packets
 - it does show the Cisco router's HELLO packets
 - it does show CDP packets from the Cisco router
 - it does show CDP packets from the server running bird

 I suspect that there is an underlying assumption (like IGMP or PIM) which I
 have not yet discovered.
 
  Ondrej
 
  
   Thank you.
  
   Details:
  
   FreeBSD WAMemu 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep
   26 22:50:31 UTC 2013
   r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
  
   bird-1.3.11
  
   P.S. I got it working by avoiding multicast with 'type nonbroadcast' and
 'neighbors'.
  
   --
   Claude Marinier



RE: FreeBSD, OSPF, and multicast

2013-11-01 Thread Claude Marinier
 -Original Message-
 From: Alexander V. Chernikov [mailto:melif...@freebsd.org]
 Sent: Friday, November 01, 2013 9:52 AM
 To: Claude Marinier; Ondrej Filip; bird-us...@bird.network.cz
 Subject: Re: FreeBSD, OSPF, and multicast
 
 On 01.11.2013 17:38, Claude Marinier wrote:
  -Original Message-
  From: Claude Marinier
  Sent: Friday, November 01, 2013 9:05 AM
  To: 'Ondrej Filip'
  Subject: RE: FreeBSD, OSPF, and multicast
 
  -Original Message-
  From: owner-bird-us...@atrey.karlin.mff.cuni.cz [mailto:owner-bird-
  us...@atrey.karlin.mff.cuni.cz] On Behalf Of Ondrej Filip
  Sent: Thursday, October 31, 2013 6:37 PM
  To: Claude Marinier; bird-us...@bird.network.cz
  Subject: Re: FreeBSD, OSPF, and multicast
 
  On 31.10.2013 14:38, Claude Marinier wrote:
  Hi,
 
  I am building a WAN emulator using a FreeBSD server with DummyNet
  for WAN effects and BIRD for OSPF. At first, no multicast packets
  left the server; then I added a default route and they left by that
  interface only. How can I configure the server so BIRD sends HELLO
  packets out all the interfaces.
  Can you send 'show ospf interfaces' and maybe also check if there
  are no errors
  BIRD 1.3.11 ready.
  bird show ospf int
  WANemu:
  Interface bce0 (xxx.xxx.xxx.8/29)
   Type: broadcast
   Area: 0.0.0.0 (0)
   State: dr
   Priority: 1
   Cost: 10
   Hello timer: 10
   Wait timer: 40
   Dead timer: 40
   Retransmit timer: 5
   Designed router (ID): xxx.xxx.xxx.14
   Designed router (IP): xxx.xxx.xxx.14
   Backup designed router (ID): 0.0.0.0
   Backup designed router (IP): 0.0.0.0 Interface bce1 
  (xxx.xxx.xxx.184/29)
   Type: broadcast
   Area: 0.0.0.0 (0)
   State: dr
   Priority: 1
   Cost: 10
   Hello timer: 10
   Wait timer: 40
   Dead timer: 40
   Retransmit timer: 5
   Designed router (ID): xxx.xxx.xxx.14
   Designed router (IP): xxx.xxx.xxx.189
   Backup designed router (ID): 0.0.0.0
   Backup designed router (IP): 0.0.0.0
  bird show ospf neighbors
  WANemu:
  Router ID   Pri  State  DTime   Interface  Router IP
  xxx.xxx.xxx.9 1 init/other  00:37   bce0   xxx.xxx.xxx.9
  xxx.xxx.xxx.185   1 init/other  00:33   bce1   xxx.xxx.xxx.185
 
  bird echo all
  bird debug all all
  There is a lot of output. How can this be restricted to HELLO messages?
  Got something useful from 'debug all all'.
 
  device1: Scanning interfaces
  WANemu: HELLO packet received from 131.140.113.9 via bce0
  WANemu: HELLO packet received from 131.140.113.185 via bce1
  device1: Scanning interfaces
  WANemu: HELLO packet sent via bce1
  WANemu: HELLO packet sent via bce0
  WANemu: HELLO packet received from 131.140.113.9 via bce0
  WANemu: HELLO packet received from 131.140.113.185 via bce1
 
  I am also running 'tcpdump' on one of the interfaces:
- it does not show bird's HELLO packets
 Just to ensure: what filter expression is set for tcpdump?

None.

- it does show the Cisco router's HELLO packets
- it does show CDP packets from the Cisco router
- it does show CDP packets from the server running bird
 Do you have some kind of firewall enabled (ipfw, pf, or..)?

Yes, IPFW is configured with some of the default entries (from sample config 
file) and pipes for delay.

00010 pipe 1 ip from any to any out xmit bce0
00020 pipe 2 ip from any to any out xmit bce1
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
65000 allow ip from any to any
65535 deny ip from any to any

I will look into removing the IPv6 rules later.

  I suspect that there is an underlying assumption (like IGMP or PIM)
  which I have not yet discovered.
 
Ondrej
 
  Thank you.
 
  Details:
 
  FreeBSD WAMemu 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep
  26 22:50:31 UTC 2013
  r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
  bird-1.3.11
 
  P.S. I got it working by avoiding multicast with 'type
  nonbroadcast' and 'neighbors'.
  --
  Claude Marinier



FreeBSD, OSPF, and multicast

2013-10-31 Thread Claude Marinier
Hi,

I am building a WAN emulator using a FreeBSD server with DummyNet for WAN 
effects and BIRD for OSPF. At first, no multicast packets left the server; then 
I added a default route and they left by that interface only. How can I 
configure the server so BIRD sends HELLO packets out all the interfaces.

Thank you.

Details:

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

bird-1.3.11

P.S. I got it working by avoiding multicast with 'type nonbroadcast' and 
'neighbors'.

--
Claude Marinier



RE: FreeBSD, OSPF, and multicast

2013-10-31 Thread Claude Marinier
On Thursday, October 31, 2013 11:37 AM, Tapio Haapala wrote:
 31.10.2013 15:38, Claude Marinier kirjoitti:
  Hi,
 
  I am building a WAN emulator using a FreeBSD server with DummyNet for WAN
  effects and BIRD for OSPF. At first, no multicast packets left the server;
  then I added a default route and they left by that interface only. How can
  I configure the server so BIRD sends HELLO packets out all the interfaces.

 Did you set ip for each interface? You need valid ip for each interface.

Yes. Here are details.

bce0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

options=c01bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE
ether 00:1e:0b:90:2e:e0
inet 131.140.113.14 netmask 0xfff8 broadcast 131.140.113.15
inet6 fe80::21e:bff:fe90:2ee0%bce0 prefixlen 64 scopeid 0x1
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet 100baseTX full-duplex
status: active
bce1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

options=c01bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE
ether 00:1e:0b:90:2e:dc
inet 131.140.113.189 netmask 0xfff8 broadcast 
131.140.113.191
inet6 fe80::21e:bff:fe90:2edc%bce1 prefixlen 64 scopeid 0x2
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet 100baseTX full-duplex
status: active
ipfw0: flags=8801UP,SIMPLEX,MULTICAST metric 0 mtu 65536
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xa
inet 127.0.0.1 netmask 0xff00
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL

  Details:
 
  FreeBSD WAMemu 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 
  22:50:31 UTC 2013
  r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
  bird-1.3.11
 
  P.S. I got it working by avoiding multicast with 'type nonbroadcast' and 
  'neighbors'.

 If all your routers in l2 segment use bird you can also use real
 broadcast yes; for interface. Then you do not need list your
 neighbors. It is wery usefull addon when you have problems with multicast.

Would using real broadcast yes; cause BIRD to send HELLO out all
interfaces? The interfaces are on separate sub-networks; this would
not work but I am curious.

When I set one of the interfaces as the default route, BIRD can form
a full adjacency with the Cisco router on that side but not on the
other. I can see the HELLO packets leaving BIRD by that interface. I
can change the default route to the other interface and then see HELLO
leaving that interface.

We plan to connect four Cisco routers to BIRD; each router will have a
simulated remote site behind it.

I am learning a lot as I research this problem. This is good but I
need a solution. :-)

Is there some FreeBSD setting which enables multicast to work properly?

Does BIRD send HELLO out each interface individually?

--
C Marinier