cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1722
Views
16
Helpful
17
Replies

Determining network between routers for OSPF

MG33
Level 1
Level 1

Hi I am trying to work out the network IP between 2 routers so that I can configure OSPF. I understand I must 'AND' the IP address of an interface with its subnet, but how do I know which IP address to use between 2 routers?

Is it to do with which end is DCE?

 

1 Accepted Solution

Accepted Solutions

Hmm, it took me a while to figure out what, I think (?), @TotallyTodd is describing.  Assuming I do correctly understand his point, perhaps my difficulty in understanding his post was because what he is describing I didn't immediately (or still) see as directly relevant to OP or other postings in this thread.

Anyway, I think what he is reminding us of, is an address mask used in an OSPF network statement doesn't necessary become the network mask OSPF advertises for an interface's network; which is, of course, correct.

Again assuming I understand Totally's point, then:

interface e0
ip address 192.168.1.1 255.255.255.0 !i.e. /24 network

routing ospf 10 !any of the following would advertise the above's 192.168.1.0/24 network
network 192.168.1.1 0.0.0.0 area #
network 192.168.1.1 0.0.0.255 area #
network 192.168.1.1 0.0.255.255 area #
network 192.168.1.1 0.255.255.255 area #
network 192.168.1.1 255.255.255.255 area #

View solution in original post

17 Replies 17

Hello,

 

The only requirement for OSPF to be neighbors in the context of IP addresses is the interface has to be in the same subnet for its primary IP. So any IP addresses in the same subnet will work.

-David

"So any IP addresses in the same subnet will work."

BTW: Excluding the first and last IP addresses within a subnet, except for /31s, if your OSPF equipment supports those.

check below lab

"I am not so sure but I read that even the network broadcast IP (last) can be use as host IP in P2P link."

For just a /31 or for /30 and larger or for both?  Also or for OSPF defined p2p regardless of /#?

If broadcast (last) IP network works, wonder whether first subnet IP would too.

sure I will run small lab friend and share result here 

R2 use 100.0.0.0/31 and you can see the ping success 
so we can use IP from /31
both I use 100.0.0.0 and 100.0.0.1

NOTE:- @MG33  this only for info. I prefer use /30 for real network 
Untitled.png

Screenshot (475).png

Yup, that's expected behavior for /31, I believe.

"I prefer use /30 for real network"

Old school, eh?  (Laugh)

Personally I prefer using /31s for p2p.  (Of course, even using such, in the last company I worked out, we started to run out of [all] private IPv4 address space even using /31s.  Moving to IPv6 became rather important.  Although using IPv6 /64s for p2p links does seem, to me, déjà vu.)

it not OLD school but as I mention the using of some IP work only in P2P (L2) link like serial 
today no body use serial, all use High BW ether link which is by default broadcast, 
so using this link with /31 and use net-ID or broadcast I think not work. 

"today no body use serial, all use High BW ether link which is by default broadcast,"

All likely true but

"so using this link with /31 and use net-ID or broadcast I think not work. "

I recall it worked fine on gig and 10g Ethernet with OSPF.

I will make double check,
thanks 
MHM

Don't recall if it matters, but with OSPF we used to also define OSPF p2p with Ethernet, whether /31, /30 (or even larger /# if only two OSPF routers on a shared segment - like two routers with gateways on the same /24).

When I say any IN the subnet I am not referring to the Network or broadcast address. Just the addresses "within" those IPs. But I should have clarified given the context of the question. Good catch.

serial and DCE is L1 
IP is L3 
to not consume a IP use subnet with /30 to connect two router 

TotallyTodd
Level 1
Level 1

The network address is totally the first address on the designated subnet. Although you can totally specify the correct network address, even if you used a /24, the interface would totally only advertise the configured network prefix.