Solved

Reverse Masking.  I have at network 172.16.16.0 255.255.254.0

Posted on 2011-09-05
6
391 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
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…

864 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

21 Experts available now in Live!

Get 1:1 Help Now