03-29-2023 01:37 PM
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?
Solved! Go to Solution.
03-30-2023 07:57 AM
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 #
03-29-2023 01:57 PM
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
03-29-2023 02:56 PM
"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.
03-29-2023 02:59 PM - edited 03-29-2023 03:19 PM
check below lab
03-29-2023 03:09 PM
"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.
03-29-2023 03:10 PM
sure I will run small lab friend and share result here
03-29-2023 03:25 PM
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
03-29-2023 04:14 PM
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.)
03-29-2023 04:35 PM
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.
03-29-2023 05:33 PM
"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.
03-29-2023 05:39 PM
I will make double check,
thanks
MHM
03-29-2023 05:52 PM
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).
03-29-2023 03:12 PM
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.
03-29-2023 02:03 PM
serial and DCE is L1
IP is L3
to not consume a IP use subnet with /30 to connect two router
03-29-2023 09:38 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide