01-15-2012 10:52 PM - edited 03-04-2019 02:54 PM
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!
01-16-2012 04:36 AM
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?
01-16-2012 05:07 AM
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.
01-16-2012 05:14 AM
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.
01-16-2012 06:49 AM
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
01-16-2012 07:10 AM
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"!
06-07-2013 05:56 AM
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
06-07-2013 11:36 PM
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
04-22-2019 11:43 AM
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.
06-28-2019 10:30 PM
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 #/#.
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