[Xorp-users] OSPF network advertisements

Andy Bavier acb@cs.princeton.edu
Tue, 04 Apr 2006 13:59:19 -0400


Hi,

I am trying to configure XORP to advertise routes to a local network 
using OSPF.  My problem is that only the interface *address* appears to 
be advertised, and not the entire network -- in other words, only a /32 
address is inserted into the routing table and not a /24.  My question 
is, how to get OSPF to advertise and route to the /24?

My OSPF configuration looks like this.  Interface 'eth0' is on a /24 
network.  I expected that by setting eth0 as 'passive' I could get OSPF 
to advertise routes for the attached network, without actually running 
OSPF on this interface:

protocols {
     ospf4 {
         router-id:  128.112.139.96
	area 0.0.0.0 {

             interface eth0 {
                 vif eth0 {
                     address 10.32.11.2 {
                         interface-cost: 1
                         passive: true
                     }
                 }
             }

             interface eth1 {
                 vif eth1 {
                     address 192.168.1.2 {
                         interface-cost: 1
                     }
                 }
             }

             interface eth2 {
                 vif eth2 {
                     address 192.168.2.2 {
                         interface-cost: 1
                     }
                 }
             }
        }
     }
}


OSPF appears to be working correctly, and 'eth0' is being advertised. 
However, all of the installed routes have masks of 255.255.255.255:

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.1.2     192.168.2.2     255.255.255.255 UGH   1      0        0 eth2
192.168.2.2     192.168.2.2     255.255.255.255 UGH   1      0        0 eth2
10.32.11.2      192.168.2.2     255.255.255.255 UGH   1      0        0 eth2
[...]


 From what I can tell, it looks like this mask is being propagated in 
the LSAs themselves:

root@planetlab-3.cs.princeton.edu> show ospf4 database detail
    OSPF link state database, Area 0.0.0.0
Router-LSA:
LS age  283 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x1 Link 
State ID 128.112.139.96 Advertising Router 128.112.139.96 LS sequence 
number 0x80000002 LS checksum 0x7da7 length 72
         Nt-bit false
         V-bit false
         E-bit false
         B-bit false
         Type 3 Stub network Subnet number 10.32.11.2 Mask 
255.255.255.255 Metric 0
         Type 3 Stub network Subnet number 192.168.1.2 Mask 
255.255.255.255 Metric 0
         Type 3 Stub network Subnet number 192.168.2.2 Mask 
255.255.255.255 Metric 0


Does anyone have insights or suggestions on what I need to do to 
advertise a 255.255.255.0 netmask for eth0?

Thanks,
Andy