[Xorp-users] OSPF network advertisements
Atanu Ghosh
atanu@ICSI.Berkeley.EDU
Wed, 05 Apr 2006 12:11:14 -0700
Hi,
This is a known problem <http://www.xorp.org/bugzilla/show_bug.cgi?id=566>.
Enabling passive sets the interface in the state Loopback, which requires
that that host route is announced. There should probably be distinct
loopback and passive switches.
This patch should solve your problem.
----------------------------------------
Index: peer.cc
===================================================================
RCS file: /usr/local/www/data/cvs/xorp/ospf/peer.cc,v
retrieving revision 1.237
diff -u -r1.237 peer.cc
--- peer.cc 28 Mar 2006 03:06:54 -0000 1.237
+++ peer.cc 5 Apr 2006 19:05:23 -0000
@@ -2164,7 +2164,7 @@
// XXX - We should be checking to see if this is p2p unnumbered.
router_link.set_type(RouterLink::stub);
router_link.set_link_id(ntohl(get_interface_address().addr()));
- router_link.set_link_data(0xffffffff);
+ router_link.set_link_data(get_network_mask());
router_link.set_metric(0);
router_links.push_back(router_link);
return;
----------------------------------------
Atanu.
>>>>> "Andy" == Andy Bavier <acb@cs.princeton.edu> writes:
Andy> Hi,
Andy> I am trying to configure XORP to advertise routes to a local network
Andy> using OSPF. My problem is that only the interface *address* appears
Andy> to be advertised, and not the entire network -- in other words, only a
Andy> /32 address is inserted into the routing table and not a /24. My
Andy> question is, how to get OSPF to advertise and route to the /24?
Andy> My OSPF configuration looks like this. Interface 'eth0' is on a /24
Andy> network. I expected that by setting eth0 as 'passive' I could get
Andy> OSPF to advertise routes for the attached network, without actually
Andy> running OSPF on this interface:
Andy> protocols {
Andy> ospf4 {
Andy> router-id: 128.112.139.96
Andy> area 0.0.0.0 {
Andy> interface eth0 {
Andy> vif eth0 {
Andy> address 10.32.11.2 {
Andy> interface-cost: 1
Andy> passive: true
Andy> }
Andy> }
Andy> }
Andy> interface eth1 {
Andy> vif eth1 {
Andy> address 192.168.1.2 {
Andy> interface-cost: 1
Andy> }
Andy> }
Andy> }
Andy> interface eth2 {
Andy> vif eth2 {
Andy> address 192.168.2.2 {
Andy> interface-cost: 1
Andy> }
Andy> }
Andy> }
Andy> }
Andy> }
Andy> }
Andy> OSPF appears to be working correctly, and 'eth0' is being
Andy> advertised. However, all of the installed routes have masks of
Andy> 255.255.255.255:
Andy> # route
Andy> Kernel IP routing table
Andy> Destination Gateway Genmask Flags Metric Ref
Andy> Use Iface
Andy> 192.168.1.2 192.168.2.2 255.255.255.255 UGH 1 0 0 eth2
Andy> 192.168.2.2 192.168.2.2 255.255.255.255 UGH 1 0 0 eth2
Andy> 10.32.11.2 192.168.2.2 255.255.255.255 UGH 1 0 0 eth2
Andy> [...]
Andy> From what I can tell, it looks like this mask is being propagated in
Andy> the LSAs themselves:
Andy> root@planetlab-3.cs.princeton.edu> show ospf4 database detail
Andy> OSPF link state database, Area 0.0.0.0
Andy> Router-LSA:
Andy> LS age 283 Options 0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x1
Andy> Link State ID 128.112.139.96 Advertising Router 128.112.139.96 LS
Andy> sequence number 0x80000002 LS checksum 0x7da7 length 72
Andy> Nt-bit false
Andy> V-bit false
Andy> E-bit false
Andy> B-bit false
Andy> Type 3 Stub network Subnet number 10.32.11.2 Mask
Andy> 255.255.255.255 Metric 0
Andy> Type 3 Stub network Subnet number 192.168.1.2 Mask
Andy> 255.255.255.255 Metric 0
Andy> Type 3 Stub network Subnet number 192.168.2.2 Mask
Andy> 255.255.255.255 Metric 0
Andy> Does anyone have insights or suggestions on what I need to do to
Andy> advertise a 255.255.255.0 netmask for eth0?
Andy> Thanks,
Andy> Andy
Andy> _______________________________________________
Andy> Xorp-users mailing list
Andy> Xorp-users@xorp.org
Andy> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users