Solved

Reverse Masking.  I have at network 172.16.16.0 255.255.254.0

Posted on 2011-09-05
6
389 Views
Last Modified: 2012-05-12
In need to not nat the first 100 ip address of this subnet and nat the remaining ip addressess.  I'm using a Cisco router and access-lists  I'm having trouble what the reverse masking should be on the first line of this access-list and also the easiest way to caluclate it
example
access-list 146 deny ip 172.16.16.0 0.0.?.?  any
access-list 146 permit ip 172.16.16.0 0.0.1.225 any

Thanks
0
Comment
Question by:swensonj
6 Comments
 
LVL 28

Expert Comment

by:Jan Springer
ID: 36484954
access-list 146 deny ip 172.16.16.0 0.0.0.63
access-list 146 deny ip 172.16.16.0 0.0.0.31
access-list 146 deny ip 172.16.16.0 0.0.0.3
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 36485613
How about this one

access-list 146 deny ip 172.16.16.0 0.0.0.63
access-list 146 deny ip 172.16.16.64 0.0.0.31
access-list 146 deny ip 172.16.16.96 0.0.0.3
access-list 146 deny ip host 172.16.16.100
access-list 146 permit ip 172.16.16.0 0.0.1.255 any

0
 

Author Comment

by:swensonj
ID: 36486056
Can you guys explain why you did the access list this way?  I assume that one access-list with one reverse mask could be used instead of the 3 and 4 described above

Thanks
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 6

Expert Comment

by:Sanjeevloke
ID: 36487135
u said 100 IP dont require natting so.
access-list 146 deny ip 172.16.16.0 0.0.0.63 =64 IP
access-list 146 deny ip 172.16.16.64 0.0.0.31=32 IP
access-list 146 deny ip 172.16.16.96 0.0.0.3 =4 IP
Total 100IP

access-list 146 permit ip 172.16.16.0 0.0.1.255 any ----rest all will be permitted ..


0
 
LVL 14

Accepted Solution

by:
Otto_N earned 500 total points
ID: 36488630
Wildcard masking works the same as subnet masking, but just in reverse. (SM is 11111...100...0, while WC-mask is 000...011..1).  So wildcards masks also have the same characteristic than subnet masks:  It can only group IP's in groups of the power of 2: 1, 2, 4, 8, 16, 32, 64, ...

So, to get to the 100 IP's, you use a group of 63, a group of 32, a group of 4 (and a group of 1, if you want to exclude .100 also).  But if you have any freedom in the choice of the exclusion range, allign it with the powers of 2:  Either exclude 63 addresses (172.16.16.0-63, with "access-list 146 deny ip 172.16.16.0 0.0.0.63") or 127 (172.16.16.0-127, with "access-list 146 deny ip 172.16.16.0 0.0.0.127").  This prevents using multiple access-list entries.
0
 

Author Closing Comment

by:swensonj
ID: 36488736
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now