Since 2 is the only even prime number, you could do a
access-list 1 deny host 192.168.1.2
access-list 1 permit 192.168.1.0 0.0.0.254
access-list 1 deny host 192.168.1.3
access-list 1 deny host 192.168.1.5
.....
That would make almost 50% of your hosts match in the 2nd line.
It would be nice if you could create a wildcard that would match all numbers
dividable by a number, but that's not possible. If you could do that with
for example 5, you would match another 25 hosts after having denied host .5
itself.
Hth,
Ole
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ole Drews Jensen
Systems Network Manager
CCNA, MCSE, MCP+I
RWR Enterprises, Inc.
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.RouterChief.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NEED A JOB ???
http://www.oledrews.com/job
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: W. Alan Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: access list w/ prime numers [7:14117]
At first I thought this was a joke... It can however, be done, but
certainly on in a 1-line access-list...
You'd basically have:
deny 192.168.1.2
deny 192.168.1.3
deny 192.168.1.5
deny 192.168.1.7
deny 192.168.1.11
...to whatever the greatest prime is below 254...
For exact syntax, read a book. :)
Alan
----- Original Message -----
From: "Wojtek Zlobicki"
To:
Sent: Monday, July 30, 2001 11:54 AM
Subject: Re: access list w/ prime numers [7:14117]
> > Hola All!
> >
> > I want to set up an access list that do the following:
> > deny all packets from subnet 192.168.1.0 with last octect a prime
numer.
>
> I dont think you realize the complexity of what you are asking for.
This is
> a very complex rule (I sure would not my router making such
decisions, they
> would be very time consuming). If I am wrong and this is a true
rule, I
> shall pay homage to the router gods..
[EMAIL PROTECTED]
Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=14257&t=14117
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]