[quagga-dev 9614] Re: [PATCH 1/4] ospfd: Optimize and improve SPF nexthop calculation
sfeldma at cumulusnetworks.com
Thu Aug 2 19:21:25 BST 2012
On Aug 2, 2012, at 10:29 AM, Joakim Tjernlund wrote:
>>>> 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.
>> Yes, but it does not mention how to obtain the nexthop address. Trying to calculate it will fail
>> in some cases, think unnumbered(which is also mentioned in RFC 5309) or possibly several eth PtP links
>> between the same two routers(not sure about that one yet though)
>> I think one should configure the remote IP address when making a BCAST IF work as PtP
>> What do you think of this change?
> Meanwhile, this might do the trick(care to test?):
> if (oi->type == OSPF_IFTYPE_POINTOPOINT)
> struct prefix_ipv4 addr;
> 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 */
> addr.family = AF_INET;
> addr.prefixlen = IPV4_MAX_PREFIXLEN;
> while ((l2 = ospf_get_next_link(w, v, l2)))
> addr.prefix = l2->link_data;
> /* check that IP lies within the peer subnet */
> if (!prefix_match(CONNECTED_PREFIX(oi->connected),
> (struct prefix *)&addr))
> nexthop = l2->link_data;
This works in my ptp-over-lan setup. Seems OK.
More information about the Quagga-dev