- A virtual community of network engineers
 Home  BookStore  StudyNotes  Links  Archives  StudyRooms  HelpWanted  Discounts  Login
RE: Question for Brian McGahan and others posted 12/21/2005
[Chronological Index] [Thread Index] [Top] [Date Prev][Date Next] [Thread Prev][Thread Next]

IMHO, while mathematically the XOR works perfectly fine it's generally a way
to make things appear much more complicated than they really are (or at
least have to be).

0 in mask means the bit must stay the same.
1 in mask means you don't care the value (e.g. there are some things you're
trying to match where it's a 1 and some where it's a 0)

Looking your columns there, the only entries you have variance are in the
3rd column (32-bit position) and the 6th colum (4-bit position).  So if you
stick 1's in your mask (for "don't care") then you'll have a mask of 36.

An additional check you can do is to look at the number of "1" values in
your mask and take 2^x (where x = # of 1's).  That will tell you how many
matches your mask will make.  So in this case, the 1 in 32-bit and 1 in
4-bit positions makes two "1" bits in the mask.  2^2 = 4.  There are 4
things you're trying to match anyway, so it's all cool.  

Remember, no more, no less.  If you find a fancy mask that let's in the
stuff you're looking for plus 16,000 of its closest friends why not save
yourself the headache and do "permit ip any any"?  :)



PS.  I'm into conserving brain cells...  Blew too many of them in college! 

-----Original Message-----
From: nobody@xxxxxxxxxxxxxx [mailto:nobody@xxxxxxxxxxxxxx] On Behalf Of
nenad pudar
Sent: Wednesday, December 21, 2005 8:57 PM
To: bmcgahan@xxxxxxxxxxxxxxxxxxxxxx; ccielab@xxxxxxxxxxxxxx
Subject: Question for Brian McGahan and others

Hi Brian
I have the question regarding your paper on Computing Access-List and
Wildcard Pairs

There you have


I cannot get this trying in any way (for third column)

1) (((0 XOR 0) XOR 1) XOR 1)= ((0 XOR 1) XOR 1)= 1 XOR 1 =0

2) (0 XOR 0) XOR (1 XOR 1) = 0 XOR 0 = 0

I am doing something wrong or there is some other trick here ?


Subscription information may be found at: