Hi Santosh,

 

   Yes, I have tried /31 prefix. Sessions do come up in /31 prefix.

 

   I am using version 7.2.  I have a loopback interface with multiple /32 prefix IPs assigned. This loopback is borrowed by an unnumbered OSPF interface. Two node, directly connected single link ospf topology, as give below. When only one IP is present in the loopback interface, sessions comes up. If more than one Ip is added to the loopback interface, ospf session keep getting flap/reset.

 

Difference I see between /32 and / <1-31> Prefix is that, in hello packet network mask is set to 0 in case of /32.  Upon receiving Hello for the other IP which is different from current adjacency ip, adjacency will be re-inited.

 

static int ospf_make_hello(struct ospf_interface *oi, struct stream *s)

 

      if (!(CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED) && oi->type == OSPF_IFTYPE_POINTOPOINT)

          && oi->type != OSPF_IFTYPE_VIRTUALLINK)

            masklen2ip(oi->address->prefixlen, &mask);

      else

            memset((char *)&mask, 0, sizeof(struct in_addr));  <<<<

 

DUT1#

Sudo config loopback add Loopback0

sudo config interface ip add Loopback0 10.0.0.1/32;

sudo config interface ip add Loopback0 11.1.1.1/32;

 

config interface ip unnumbered add Ethernet16 Loopback0 

 

interface Ethernet16

ip ospf network point-to-point

ip ospf area 0

 

router ospf

ospf router-id 1.1.1.1

 

DUT2#

Sudo config loopback add Loopback0

sudo config interface ip add Loopback0 10.0.0.2/32;

sudo config interface ip add Loopback0 11.1.1.2/32;

 

config interface ip unnumbered add Ethernet16 Loopback0 

 

interface Ethernet16

ip ospf network point-to-point

ip ospf area 0

 

router ospf

ospf router-id 2.2.2.2

 

Regards

Naveen

 

From: Santosh P K <sapk@vmware.com>
Date: Tuesday, 7 January 2020 at 9:54 PM
To: Naveen K Suvarna <naveen.suvarna@broadcom.com>, "dev@lists.frrouting.org" <dev@lists.frrouting.org>
Subject: Re: OSPF neighbour-ship on multi-ip P2P interface

 

Naveeen,

     Did you test with /31 prefix configured on interface and did that work too? Could you also let me know which version of FRR you are using?

 

Thanks

Santosh P K

 

From: Naveen K Suvarna <naveen.suvarna@broadcom.com>
Date: Tuesday, 7 January 2020 at 2:33 PM
To: "dev@lists.frrouting.org" <dev@lists.frrouting.org>
Subject: OSPF neighbour-ship on multi-ip P2P interface

 

Hi,

 

     Does FRR OSPF support neighborship on an P2P interface with Multiple Interface IP addresses? I am using multiple 32bit host ip address on same interface.

 

     When I try to establish ospf neighborship on an P2P interface with multiple IP addresses assigned, OSPF neighborship keeps resetting due to, receival of interleaving hello of 1st or 2nd ip-address.   Is there any way to avoid this  and bring up sessions on the Interface.

 

    Above thing works good if the Interface IP addresses are assigned < 32 bit  subnet mask (for example, 10.0.0.1/24 instead of 10.0.0.1/32).

 

Regards

Naveen