Tuesday, May 1, 2012

IP Netmask Format - Good To Know For Troubleshooting

Last weekend around 2 AM I got a call from a Help Desk guy stating that one of Unix Server is not reachable from certain parts of my client network. And my first reaction was :






but it's all part of job and entertainment. So few minutes later I logged into the network using my VPN access to see what's going on. So as I logged in into the network, I found ..... "Nothing". I mean everything was looking ok and there wasn't any log into the ACS (Used For AAA based Access) suggesting someone made changes into the network on Friday. Also no log into local log of concerned devices stating any reason.


So after this initial investigation I was pretty sure now that there wasn't any change made in the network since Friday. Which leads to conclusion that it's either problem with the Unix server itself or there is some configuration issues with the server.


Next I dropped any email back to unix guy stating I didn't find anything unusual, please confirm if:


> Any changes were made into the configuration of Unix Server recently ?
> Restart the network Services of the Unix Server
> Send me "ifconfig -a" command output from Unix Server command prompt.


BTW... "ifconfig -a" is equivalent to "sh protocols" in Cisco IOS world and "ipconfig /all" from Windows OS world.


and just a minute later the Unix guy replied me back stating:


> There were no changes made into the configuration since last few days
> Restarting network services didn't help
> ifconfig -a results attached



# ifconfig -a
lo0: flags=2001000849LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=1000843BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.136.110.149 netmask ff000000 broadcast 10.255.255.255
        ether 0:3:ba:f8:2e:39
bge1: flags=1000843BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 172.17.1.132 netmask ffff0000 broadcast 172.17.255.255
        ether 0:3:ba:f8:2e:3a


So as you guys can see, the E0 Ethernet interface is Running fine and even IP was looking good from my prospective since I already had checked the VLAN subnet for it. But did you see the mask highlighted with YELLOW color ? Isn't that looking weird ? I mean did you ever know that there are some devices out there which takes netmask/subnet mask into Hexadecimal format ?


At-least I didn't....


So next step was to determine the subnet mask into Decimal format to see if it matches my network device configuration. So I quickly took the windows calculator and tried to conver ff000000 into binary. Though It took a min or two to figure out how many digits from Hex needs to be picked up for each decimal block. And the answer was "Two"








so finally I had answer that subnet mask was put by unix administrator was "255.0.0.0" where my vlan subnet configuration was configured for different subnet mask. So I quickly replied unix administrator suggesting to change the subnet mask to the correct one and of course that fixed the issue.


After that next morning I did some research on Subnet mask in Hex format and found that some old Unix box use to support it in that format only.


But one interesting thing I found was that our very own Cisco IOS also supports that format. And I was like :






Yes. So I quickly did some test and here are results:



R1#sh ver | i IOS
Cisco IOS Software, 3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T5, RELEASE SOFTWARE (fc4)


R1#sh ip int brief | e una|do
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            20.20.20.20     YES manual up                    up
FastEthernet0/1            30.30.30.30     YES manual up                    up
Loopback0                   10.10.10.10      YES manual up                    up


R1#sh protocols
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 20.20.20.20/8
FastEthernet0/1 is up, line protocol is up
  Internet address is 30.30.30.30/16
Loopback0 is up, line protocol is up
  Internet address is 10.10.10.10/30


R1#terminal ip netmask-format ?
  bit-count    Display netmask as number of significant bits
  decimal      Display netmask in dotted decimal
  hexadecimal  Display netmask in hexadecimal


R1#terminal ip netmask-format hexadecimal

R1#sh protocols
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 20.20.20.20 0xFF000000
FastEthernet0/1 is up, line protocol is up
  Internet address is 30.30.30.30 0xFFFF0000
Loopback0 is up, line protocol is up
  Internet address is 10.10.10.10 0xFFFFFFFC

R1#sh run int f0/0
Building configuration...

Current configuration : 92 bytes
!
interface FastEthernet0/0
 ip address 20.20.20.20 255.0.0.0
 duplex auto
 speed auto
end


R1#terminal ip netmask-format decimal

R1#sh protocols
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 20.20.20.20 255.0.0.0
FastEthernet0/1 is up, line protocol is up
  Internet address is 30.30.30.30 255.255.0.0
Loopback0 is up, line protocol is up
  Internet address is 10.10.10.10 255.255.255.252

R1#sh run int f0/0
Building configuration...

Current configuration : 92 bytes
!
interface FastEthernet0/0
 ip address 20.20.20.20 255.0.0.0
 duplex auto
 speed auto
end


R1#terminal ip netmask-format bit-count

R1#sh protocols
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 20.20.20.20/8
FastEthernet0/1 is up, line protocol is up
  Internet address is 30.30.30.30/16
Loopback0 is up, line protocol is up
  Internet address is 10.10.10.10/30

R1#sh run int f0/0
Building configuration...

Current configuration : 92 bytes
!
interface FastEthernet0/0
 ip address 20.20.20.20 255.0.0.0
 duplex auto
 speed auto
end

Few other interesting facts I found were :

> If you ever change the netmask format from global mode, it never shows up into the running config

R1#terminal ip netmask-format hexadecimal


R1#sh run | i terminal
R1#

> You can change the format for particular line (VTY Vs Aux Vs Con) And this time it will reflect into the running configuration.

R1(config)#line con 0
R1(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

R1(config-line)#ip netmask-format hexadecimal
R1(config-line)#end


R1#sh run | b netmask
 ip netmask-format hexadecimal
line aux 0
line vty 0 4
!

HTH...
Deepak Arora
Evil CCIE

Monday, April 30, 2012

Cisco CAT OS - Still Alive



In my current project my customer has still got plenty of 2900s,4k,5k and 6500 switches running on CAT OS. For me, working with CAT OS is little hectic. The major reason being that it's kinda hard to find CAT OS documentation. Also no Cisco Networking course teaches CAT OS anyways so technically I was never been trained on this. But still customer has got plenty of those so I got to support these.


So I was looking for a consolidated reference/study material to learn CAT OS for quite some time and finally I found a nice book from Cisco Press:


http://www.amazon.com/Cisco-Field-Manual-Catalyst-Configuration/dp/1587050439/ref=sr_1_2?ie=UTF8&qid=1335768990&sr=8-2


The thing I very much liked about this book is that it has a parallel command reference for IOS vs Cat OS. Which makes it easy to find the right commands as if you know equivalent IOS command.


Further Readings:


http://en.wikipedia.org/wiki/Cisco_Catalyst

http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015bfa6.shtml

http://www.cisco.com/en/US/prod/collateral/switches/ps5718/ps708/prod_white_paper09186a00800c8441.html


http://en.wikipedia.org/wiki/CatOS


http://www.ciscopress.com/articles/article.asp?p=102093&seqNum=5


http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a008010c6eb.shtml


https://supportforums.cisco.com/docs/DOC-1773

HTH...
Deepak Arora
Evil CCIE

Sunday, April 1, 2012

Basic ASA Configuration - NAT,PAT & ACL (Coming Soon)


Solution -> OSPF AREA Challenge - A Little Tricky Stuff



Two months back I posted "OSPF Area Challenge" - http://deepakarora1984.blogspot.in/2012/02/ospf-area-challenge-little-tricky-stuff.html. Which so far only one person was able to solve - Siddharth Bhatia - http://www.linkedin.com/profile/view?id=113719254&locale=en_US&trk=tyah


Siddharth is a Dual CCIE in both R&S & Sec Tracks.


Now lets talk about solution indeed. The solution was actually simple one. If you look closely at the diagram & requirement you basically see multiple OSPF Area 0 islands separated by other areas. Now for lack of better term, lots of time you will see this called as "Dis-contiguous Area 0". Now technically it's only Area 0 which can not be dis-contiguous, but any other area can be dis-contiguous and there is absolutely no problem about it at all.


Now to connect these OSPF Area 0 islands we can use Virtual Links. But there is another hidden problem introduced in Area 34 by configuring it as stub area. By default Stub area doesn't allow you to run virtual links. Or if you have configured virtual links across area and later configure it as "Stub". The virtual link eventually will get break. Solution to this problem - Configure Tunnel and Run virtual link inside the tunnel.


Lets see how topology will look like now :




so lets review configurations now:











Further Readings :




HTH...
Deepak Arora
Evil CCIE