If you’re following me on Twitter then you might have seen my tweet last week about rebooting my CCIE studies. While I am moving really slow in reading, as usual, I am also taking notes as I go along. I am changing my strategy this time since I don’t retain information like I used to – the joys of getting older.
Chapter 1 of Routing TCP/IP Vol. 1 is really meant to be just a review. If you’re studying for the CCIE, then you’re at the level that you can skip this chapter. However, I’ve decided not to skip this chapter even though I’ve read this book already. Kind of glad that I didn’t skip it because I seem to have forgotten about the ability of Cisco IOS to change the display of the subnet mask. While not really important in CCIE studies, I just thought it is kind of cool to share it with you guys and girls.
Default Format
By default, the netmask is in a bit count format – meaning slash and bit count. The example of bit count format is shown below. Please look at the highlighted part of the show outputs.
R1#sh int s0/0 Serial0/0 is up, line protocol is up Hardware is GT96K Serial Internet address is 192.168.1.1/24 MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set Keepalive set (10 sec) Last input 00:00:01, output 00:00:07, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 1158 kilobits/sec 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 368 packets input, 24236 bytes, 0 no buffer Received 185 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 415 packets output, 23696 bytes, 0 underruns 0 output errors, 0 collisions, 8 interface resets 0 unknown protocol drops 0 output buffer failures, 0 output buffers swapped out 0 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up R1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.1.0/24 is directly connected, Serial0/0
Configuration
Configuring is really easy. There are two more formats that you can choose from, as shown below.
R2(config)#line con 0 R2(config-line)#ip netmask-format ? bit-count Display netmask as number of significant bits decimal Display netmask in dotted decimal hexadecimal Display netmask in hexadecimal
Verification
As the command names imply, they can be used as bit-count or slash, decimal or dotted, or hexadecimal format. I am sure that you already know how it will look like, but for completeness’ sake I am including the show outputs on both decimal and hexadecimal format.
R2#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.1.0 255.255.255.0 is directly connected, Serial0/0 R2#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.1.0 0xFFFFFF00 is directly connected, Serial0/0
Thoughts
This is not a CCIE content in my opinion, but this may be good for someone who is struggling with bit-count format. Another purpose I can think of is when you want to have fun with your colleague(s), then change the format to hexadecimal to throw him/her off. Though, I suggest that you only do this on a lab environment. Changing it to hexadecimal on a production environment while someone is troubleshooting a routing problem may upset your colleague! Worst case scenario, you may get fired for pulling a stunt like this.
Disclosure
NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.