cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4325
Views
0
Helpful
10
Replies

Controling OSPF Neighbors

Let's say I have 4 routers on the same network segment all running OSPF

but I do not want them all to become neighbors, just 2 and 2 is there a way to do this in OSPF ?

without using access lists on interface to block ospf or such methods

1 Accepted Solution

Accepted Solutions

Hello Arni,

you can take advantage of OSPF authentication:

C and D will have both keys key1 and key2

A will have only key key1

B will have only key key2

so A and B shouldn't become neighbors for the key mismatch

Hope to help

Giuseppe

View solution in original post

10 Replies 10

satish_zanjurne
Level 4
Level 4

use "passive-interface" command !!!

or don't enable ospf on interfaces connecting other 2 routers.

dont think that will work

lets say I have routers A, B, C and D

A should neighor with C and D

B should neighbor with C and D

But A and B should not neighbor

and they are all on the same network

if I use passive interface on A or B they wont neighbor with C or D

:)

It depends, on which interfaces you are defining as passive-interface.

In this case define interface on Router B which is connecting to Router A as passive-interface.

HTH..

Ok as I said before they are all on the same network, so each device only has one interface to connect to the other 3

Are these routers are connected on LAN , having same subnet??

Hello Arni,

you can take advantage of OSPF authentication:

C and D will have both keys key1 and key2

A will have only key key1

B will have only key key2

so A and B shouldn't become neighbors for the key mismatch

Hope to help

Giuseppe

glen.grant
VIP Alumni
VIP Alumni

Passive interface would work on a interface . If you are saying that there is one interface to another router then if you don't want the particular router to be a ospf participant then then passive interface the router interface or don't setup ospf at all on the router is which case you will need default static routes pointing to the next hop and somewhere on a ospf router you will need statics pointing back to the boxes that are not running ospf for the subnets on that router. . Not sure why you want to do this.

If the routers are on the same subnet on the same broadcast network, the way i will do it is enable the network type "point-multipoint nonbroadcast" under the interface on the two routers and manually peer those routers with the neighbour [ip address] under the OSPF process. The routers will use unicast instead. No need for ACL or route-map or authentication.

Just beware that you will not have the DR/BDR functionality.

Francisco.

Carl Ratcliffe
Level 3
Level 3

Thanks, this topic is 7 years old but this was the only/best solution I could find that would work so that I could have multiple OSPF devices on the same shared subnet then select which of these devices became neighbours.

Thanks

Carl Ratcliffe

Preston - Lancashire - England

 

will
Level 3
Level 3
Just sharing the love! :) Here is another way to do this by making OSPF a non-broadcast protocol on the interfaces you want to control. I was having some problems when neighbors both not defined on hub and spoke sides. and I inserted two neighbor IP's, one for the ospf router-ID (loopback) and one for the local broadcast subnet IP. it seemed to be randomly failing without both neighbors defined. I should note, that in my case, there ended up being just a DROTHER and not DR/BDR:
 
=== rtra - single point side (neighbor with rtr1, want to be "DR"):
int vlan100
 ip ospf network non-broadcast
 ip ospf priority 10  ! might not need this line
!
router ospf 100
 neighbor <rtr1 gi0/0/1>
 neighbor <rtr1 loop>
=== rtrb - single point side (neighbor with rtr1, want to be "DR"):
int vlan100
 ip ospf network non-broadcast
 ip ospf priority 5   ! might not need this line
!
router ospf 100
 neighbor <rtr1 gi0/0/1>
 neighbor <rtr1 loop>

=== rtr1 - multipoint side (want to pair with both rtra/rtrb):
interface GigabitEthernet0/0/1
 ip ospf network point-to-multipoint non-broadcast
 ip ospf priority 0    ! might not need this line
!
router ospf 100
 neighbor <rtra vlan100>
 neighbor <rtrb vlan100>
 neighbor <rtra loop>
 neighbor <rtrb loop>
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: