cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7733
Views
5
Helpful
9
Replies

CIDR notation in IOS config?

hank
Level 1
Level 1

In all the IOS versions I know of, when doing a show conf I would see something like this:

interface GigabitEthernet9/1

ip address 12.13.22.129 255.255.255.0

Recently I think I saw a sho conf that showed it as:

interface GigabitEthernet9/1

ip address 12.13.22.129/24

What command do I use to enable CIDR notation like this in the IOS config?

Thanks!

9 Replies 9

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Definitely in a show conf and not a show interface?

Could it have been IOS XR?

100% in a sho conf as stated.  How can I know if it was IOS XR or not, if that is what I am asking.  I have

IOS-XR and older systems and cannot find the command to have the config appears in CIDR notation.

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

CIDR for interface addresses, in config, might not be an option in ordinary IOS (at least I'm unaware of such an option) yet it might be "standard" in IOS-XR.  I know the latter isn't exactly like ordinary IOS.

As to determining which IOS you're looking at, knowing the platform and/or show version (?) should indicate.

Joseph,

In ordinary IOS, the CIDR style of ip address command is not supported. I do not know about other IOS incarnations.

That being said, I absolutely do not understand why the CIDR style has not been implemented in IOS. Don't anyone tell me it is such an insurmountable programming feat to implement it - especially considering the fact that the code actually exists already (see the network command in DHCP pool or IPv6 address parser) and just needs to be adapted...

Someone at Cisco must love typing in all those 255s

Best regards,

Peter

Disclaimer

The    Author of this posting offers the information contained within this    posting without consideration and with the reader's understanding that    there's no implied or expressed suitability or fitness for any  purpose.   Information provided is for informational purposes only and  should not   be construed as rendering professional advice of any kind.  Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In    no event shall Author be liable for any damages whatsoever  (including,   without limitation, damages for loss of use, data or  profit) arising  out  of the use or inability to use the posting's  information even if  Author  has been advised of the possibility of such  damage.

Posting

Peter, thanks for the confirmation for "ordinary" IOS.

I agree "Someone at Cisco must love typing in all those 255s"!

Hi everyone!

Just found this topic regarding IOS and CIDR notation. It's a bit old, so sorry for reviving it...

I never saw it on any IOS, but would love to see it in the future ;-) Are there any chances/plans/thoughts/... that this might be implemented? Right now this can only be done with prefix lists afaik. Would be cool to have it implemented everywhere (ip address 10.1.1.1/24 or ip address 10.1.1.1 255.255.255.0), as well as for ACL to have an other way to enter the wildcard mask.

The old style should remain, but would be a cool option if CIDR is possible, too. Maybe we can convince the Cisco guy who loves the 255s ;-)

Have a nice weekend everyone,

uebi

CIDR notation has been included in NX-OS. So it may have been seen in some configuration.

Cisco had to change this. The likes of Juniper JUNOS, they had this in their OS from time and as everyone probably agrees, saves some time and is a lot better.

Also features like config staging and rollback have been introduced in NX-OS which is different from IOS - they were already in JUNOS.

Seems like catchup.
Hoping they will change IOS to this one day.

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Peter A
Level 1
Level 1

I read this in an ebook:

Although subnet masks are displayed as dotted decimals, the format can be changed on Cisco routers to bit count or hex with the 'ip netmask-format bit' command...

 

Router# terminal ip netmask-format ?

bit-count          Display netmask as number of significant bits

decimal            Display netmask in dotted decimal

hexadecimal     Display netmask in hexadecimal

 

Router# terminal ip netmask-format bit-count

 

Router# show interface serial 0

Internet address is 192.168.1.1/24

 

I tried this on Packet Tracer and none of these commands worked. Maybe somebody can try it on some real equipment or other simulator software and let me know if you have any luck.

 

I can confirm this appears to work on GNS3. Essentially changing the output of the show command as a decimal notation or CIDR notation. I could not set the ip with CIDR, only view it differently with the show ip interface type #/#.