Solved

Reverse Masking.  I have at network 172.16.16.0 255.255.254.0

Posted on 2011-09-05
6
397 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
Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IPv6 question 1 75
Simultaneous work of Wi-Fi and LAN on Win10 laptop 4 87
Understanding Extended-Access List 6 77
Strange router problem - can't access hotmail.com 14 109
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 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…

752 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