1

In old school IOS we used to do

router ospf 1
 network 0.0.0.0 255.255.255.255 area 0

But in Nexus switch i am not seeing any command or related doc, how do i announce my subnet in ospf in nx-os

My nexus 9k config

router ospf 100

interface loopback1
  ip router ospf 100 area 0.0.0.0

interface Ethernet2/11
  ip router ospf 100 area 0.0.0.0

Here is my interface config,

interface Ethernet2/11
  description Point-to-Point-link-of-ospf
  no switchport
  ip address 10.0.0.10/30
  ip router ospf 100 area 0.0.0.0

interface loopback1
  ip address 74.xx.xx.1/23
  ip router ospf 100 area 0.0.0.0

In my neighbor router i am seeing following in my route table

R2# sh ip route ospf-100
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>

74.xx.xx.1/32, ubest/mbest: 1/0
    *via 10.0.0.10, Eth2/11, [110/2], 00:08:08, ospf-100, intra

Why i am seeing following route /32 instead of /23 ????

74.xx.xx.1/23 i want to announce this route

  • "how do i announce my subnet in ospf in nx-os" The network statements do not announce the networks, they tell OSPF which interfaces participate in OSPF. Did you enable OSPF with the feature ospf command? – Ron Maupin Mar 2 '18 at 23:45
  • I did, without that command noway I can run any single ospf command on switch ;) – Satish Mar 3 '18 at 0:22
4

Cisco routers (and switches) treat loopback interfaces as host routes by default.

You can change this behavior by

interface loopback1
ip ospf network point-to-point
  • Why are you so awesome!!!! :) – Satish Mar 3 '18 at 0:47
  • 3
    @Satish I can't help it. I was born this way. – Ron Trunk Mar 3 '18 at 2:00
  • 1
    @Satish The truth is I've been doing this long enough to have made nearly every mistake before. – Ron Trunk Mar 3 '18 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.