Solved

Reverse Masking.  I have at network 172.16.16.0 255.255.254.0

Posted on 2011-09-05
6
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 29

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
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…
Suggested Courses
Course of the Month11 days, 13 hours left to enroll

623 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