[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:  <---ptp--->   [W] (eth1:

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

> 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.


More information about the Quagga-dev mailing list