CCIE Pursuit Blog

May 29, 2007


Filed under: Cool Commands,IOS,Tech Tips — cciepursuit @ 11:15 am

So you’re labbing away and the scenario asks for an interface to be configured with an IP address in the subnet.  You don’t reach for the IP calculator as you know that this will not be available on the lab, but instead you activate the part of your brain that speaks binary and come up with the correct configuration:

interface GigabitEthernet0/0
 description ->VLAN22
 ip address
 duplex auto
 speed auto

Now you need to advertise this network in OSPF or EIGRP.  Crap.  Now you need to convert the subnet mask to wildcard bits*.  This isn’t rocket science, but it is another opportunity for you to make a minor error that will bite you in the butt later.

*I know that the best method for doing this is to simply use the IP address of the interface with an all-zeros wildcard mask, but I’ll blog on that another time.

Thankfully, there is an IOS “trick” you can use with EIGRP (I assume IGRP as well) and OSPF.  Instead of entering a wildcard mask, just enter in the subnet mask (the same one you configured the interface with) and IOS will make the conversion for you:

Use the Subnet Mask Instead of the Wildcard Mask:
r2(config)#router os 100
r2(config-router)#net area 0

IOS Makes the Conversion for you:
r2(config-router)#do sh run | sec ospf
router ospf 100
 network area 0


1 Comment »

  1. that is awesome, thanks!

    Comment by Shay — October 15, 2008 @ 9:47 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: