[quagga-dev 9606] Re: [PATCH 1/4] ospfd: Optimize and improve SPF nexthop calculation

Scott Feldman sfeldma at cumulusnetworks.com
Thu Aug 2 04:11:18 BST 2012


On Aug 1, 2012, at 2:14 PM, Joakim Tjernlund wrote:

>>>> This could POSSIBLY look like below:
>>>> if (oi->type == OSPF_IFTYPE_POINTOPOINT)
>>>>      {
>>>>        added = 1;
>>>>        nexthop.s_addr = 0; /* Nexthop not required */
>>>>        /* As some PtP links(ethernet used as PtP) really needs
>>>>           a nexthop address, try find one */
>>>>        if (CONNECTED_PEER(oi->connected))
>>>>          nexthop = oi->connected->destination->u.prefix4;
>>>> 
>>>>      }
>>> 
>>> This doesn't work.  In my test, CONNECTED_PEER(oi->connected) is false.
>> 
>> Why is that? Do you not configure the remote IP address for your PtP eth link?
>> How do you setup eth PtP?
> 
> Is oi->connected->destination->u.prefix4 defined? If so, what does it contain?
> Is oi->connected->address->u.prefix4 defined? If so, what is its value?

	[V] (eth1:10.0.1.5/30)  <---ptp--->   [W] (eth1:10.0.1.6/30)

OSPF: V (parent): Router vertex 0.0.0.4  distance 0 flags 0
OSPF: W (dest)  : Router vertex 0.0.0.1  distance 0 flags 0
OSPF: V->W distance: 10
OSPF: ospf_nexthop_calculation: considering link:eth1 type:1 link_id:0.0.0.1 link_data:10.0.1.5
OSPF: oi->connected->destination->u.prefix4 10.0.1.7
OSPF: oi->connected->address->u.prefix4 10.0.1.5
OSPF: l->link_data 10.0.1.5
OSPF: l2->link_data 10.0.1.6
OSPF: ospf_spf_add_parent: Adding 0.0.0.4 as parent of 0.0.0.1

> So no remote IP address config. Is this how real eth PtP links are supposed to work?
> What does RFC 5309 say about obtaining the remote IP address?

Section 4.3 in RFC 5309 talks about IP nexthop for ptp-over-lan.  We have to get an IP address from the adjacent router to use as next hop so ARP can obtain MAC address for IP forwarding.

-scott



More information about the Quagga-dev mailing list