<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Binary Math &#8211; Part I</title>
	<atom:link href="http://blog.ine.com/2008/09/15/binary-math-part-i/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ine.com/2008/09/15/binary-math-part-i/</link>
	<description>Helping you become a Cisco Certified Internetwork Expert</description>
	<lastBuildDate>Wed, 28 Jul 2010 22:47:55 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: R&#38;S Short Notes – Security &#38; IP Services &#171; #sh ip route vrf CCIE 24163</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-49453</link>
		<dc:creator>R&#38;S Short Notes – Security &#38; IP Services &#171; #sh ip route vrf CCIE 24163</dc:creator>
		<pubDate>Wed, 27 May 2009 07:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-49453</guid>
		<description>[...] your binary voodoo as Scott Morris @ INE calls it,  Part I &amp; Part [...]</description>
		<content:encoded><![CDATA[<p>[...] your binary voodoo as Scott Morris @ INE calls it,  Part I &amp; Part [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madura</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-41637</link>
		<dc:creator>Madura</dc:creator>
		<pubDate>Wed, 15 Apr 2009 10:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-41637</guid>
		<description>Hi Scott, So what is the final answer for the second question? I see there two sets of answers from the above posts, but my answer is :

ip access-list 13 deny 200.100.1.0 0.0.254.0
ip access-list 13 permit 200.100.128.0 0.0.7.0
ip access-list 13 permit 200.100.136.0 0.0.3.0

Is this correct?

I don&#039;t understand how this will work though:
access-list 20 permit 200.100.128.0 0.0.6.0
access-list 20 permit 200.100.136.0 0.0.2.0</description>
		<content:encoded><![CDATA[<p>Hi Scott, So what is the final answer for the second question? I see there two sets of answers from the above posts, but my answer is :</p>
<p>ip access-list 13 deny 200.100.1.0 0.0.254.0<br />
ip access-list 13 permit 200.100.128.0 0.0.7.0<br />
ip access-list 13 permit 200.100.136.0 0.0.3.0</p>
<p>Is this correct?</p>
<p>I don&#8217;t understand how this will work though:<br />
access-list 20 permit 200.100.128.0 0.0.6.0<br />
access-list 20 permit 200.100.136.0 0.0.2.0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: csc</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-25918</link>
		<dc:creator>csc</dc:creator>
		<pubDate>Mon, 23 Feb 2009 09:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-25918</guid>
		<description>Hurrey !!!

I got it....

I configured eigrp and everything worked fine..

Scott...I really really thankful to you ...

Also surely i&#039;ll try packet filtering..

Again hats off to you..</description>
		<content:encoded><![CDATA[<p>Hurrey !!!</p>
<p>I got it&#8230;.</p>
<p>I configured eigrp and everything worked fine..</p>
<p>Scott&#8230;I really really thankful to you &#8230;</p>
<p>Also surely i&#8217;ll try packet filtering..</p>
<p>Again hats off to you..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Morris, CCIE #4713</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-25693</link>
		<dc:creator>Scott Morris, CCIE #4713</dc:creator>
		<pubDate>Sun, 22 Feb 2009 20:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-25693</guid>
		<description>You are a touch late, but we&#039;ll work with it.  :)

Your first big thing...  You&#039;re running OSPF.  You cannot do a distribute-list out in OSPF, because the rules of the protocol are that everyone in an area must have the same database!

If you are an ABR you can use an area filter-list to accomplish the same thing, but I think that command requires a prefix-list and not an ACL.  Ah well.

Otherwise, you&#039;re getting the idea of the binary.  Just the application is a little difficult!  Try them as packet filters (e.g. interface-based) and see if that makes things better for you!

HTH,

Scott</description>
		<content:encoded><![CDATA[<p>You are a touch late, but we&#8217;ll work with it.  <img src='http://blog.ine.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Your first big thing&#8230;  You&#8217;re running OSPF.  You cannot do a distribute-list out in OSPF, because the rules of the protocol are that everyone in an area must have the same database!</p>
<p>If you are an ABR you can use an area filter-list to accomplish the same thing, but I think that command requires a prefix-list and not an ACL.  Ah well.</p>
<p>Otherwise, you&#8217;re getting the idea of the binary.  Just the application is a little difficult!  Try them as packet filters (e.g. interface-based) and see if that makes things better for you!</p>
<p>HTH,</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: csc</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-25691</link>
		<dc:creator>csc</dc:creator>
		<pubDate>Sun, 22 Feb 2009 20:06:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-25691</guid>
		<description>Hi Scott,

This might be very late...

I was looking out for the nice explanation on access list and I got this fantastic link...

Your explanation is very great but it made me confused... Because I am still far behind in configuring access list.

I tried configuring as per your suggestion.. but did not get single output...I still din&#039;t understand how did you apply access list.. what are the commands..

My network is very simple

R1 ( s1/0 - 12.1.1.1 ) is connected to R2 ( s1/0 - 12.1.1.2 )

and I created some loopbacks on R1 as follows

int lo 1
ip add 172.16.31.1 255.255.255.0
int lo 2
ip add 172.16.32.1 255.255.255.0
int lo 3
ip add 172.16.33.1 255.255.255.0
int lo 4
ip add 172.16.34.1 255.255.255.0
int lo 5
ip add 172.16.35.1 255.255.255.0
int lo 6
ip add 172.16.36.1 255.255.255.0
int lo 7
ip add 172.16.37.1 255.255.255.0
int lo 8
ip add 172.16.38.1 255.255.255.0
int lo 9
ip add 172.16.39.1 255.255.255.0
int lo 10
ip add 172.16.40.1 255.255.255.0
int lo 11
ip add 172.16.41.1 255.255.255.0
int lo 12
ip add 172.16.42.1 255.255.255.0
int lo 13
ip add 172.16.43.1 255.255.255.0


and configured ospf on both the routers..

later on I advertised all the loopbacks and serial interface under ospf...


I tried configuring in different way .. but sill no luck

e.g

If i want to permit only 32 to 35 networks.

I configured :

R1&gt;access-list 11 permit 172.16.32.0 0.0.3.255

config-router&gt;distribute-list 11 out

No Luck..

I tried also

access-list 11 deny 172.16.38.0 0.0.1.255

again no luck...

Then I removed all the loopbacks.. made it very simple.. configured only 2 loopbacks..

int lo 1 
ip add 140.40.10.1 255.255.255.0

int lo 2
ip add 140.40.11.1 255.255.255.0

same I advertiesd in ospf..

Checked on R2.. got all the loopbacks..expected

then I tried allowing only 140.40.11.1

so configured :

access-list 1 permit 140.40.11.1

config-router&gt;distribute-list 1 out


But again n again NO LUCK...

Everytime I got all the routes on R2.. I did clear ospf process..did clear ip route... 

Please please advise me...

Hats off you...

Thanks..</description>
		<content:encoded><![CDATA[<p>Hi Scott,</p>
<p>This might be very late&#8230;</p>
<p>I was looking out for the nice explanation on access list and I got this fantastic link&#8230;</p>
<p>Your explanation is very great but it made me confused&#8230; Because I am still far behind in configuring access list.</p>
<p>I tried configuring as per your suggestion.. but did not get single output&#8230;I still din&#8217;t understand how did you apply access list.. what are the commands..</p>
<p>My network is very simple</p>
<p>R1 ( s1/0 &#8211; 12.1.1.1 ) is connected to R2 ( s1/0 &#8211; 12.1.1.2 )</p>
<p>and I created some loopbacks on R1 as follows</p>
<p>int lo 1<br />
ip add 172.16.31.1 255.255.255.0<br />
int lo 2<br />
ip add 172.16.32.1 255.255.255.0<br />
int lo 3<br />
ip add 172.16.33.1 255.255.255.0<br />
int lo 4<br />
ip add 172.16.34.1 255.255.255.0<br />
int lo 5<br />
ip add 172.16.35.1 255.255.255.0<br />
int lo 6<br />
ip add 172.16.36.1 255.255.255.0<br />
int lo 7<br />
ip add 172.16.37.1 255.255.255.0<br />
int lo 8<br />
ip add 172.16.38.1 255.255.255.0<br />
int lo 9<br />
ip add 172.16.39.1 255.255.255.0<br />
int lo 10<br />
ip add 172.16.40.1 255.255.255.0<br />
int lo 11<br />
ip add 172.16.41.1 255.255.255.0<br />
int lo 12<br />
ip add 172.16.42.1 255.255.255.0<br />
int lo 13<br />
ip add 172.16.43.1 255.255.255.0</p>
<p>and configured ospf on both the routers..</p>
<p>later on I advertised all the loopbacks and serial interface under ospf&#8230;</p>
<p>I tried configuring in different way .. but sill no luck</p>
<p>e.g</p>
<p>If i want to permit only 32 to 35 networks.</p>
<p>I configured :</p>
<p>R1&gt;access-list 11 permit 172.16.32.0 0.0.3.255</p>
<p>config-router&gt;distribute-list 11 out</p>
<p>No Luck..</p>
<p>I tried also</p>
<p>access-list 11 deny 172.16.38.0 0.0.1.255</p>
<p>again no luck&#8230;</p>
<p>Then I removed all the loopbacks.. made it very simple.. configured only 2 loopbacks..</p>
<p>int lo 1<br />
ip add 140.40.10.1 255.255.255.0</p>
<p>int lo 2<br />
ip add 140.40.11.1 255.255.255.0</p>
<p>same I advertiesd in ospf..</p>
<p>Checked on R2.. got all the loopbacks..expected</p>
<p>then I tried allowing only 140.40.11.1</p>
<p>so configured :</p>
<p>access-list 1 permit 140.40.11.1</p>
<p>config-router&gt;distribute-list 1 out</p>
<p>But again n again NO LUCK&#8230;</p>
<p>Everytime I got all the routes on R2.. I did clear ospf process..did clear ip route&#8230; </p>
<p>Please please advise me&#8230;</p>
<p>Hats off you&#8230;</p>
<p>Thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zsolt Maj</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-9378</link>
		<dc:creator>Zsolt Maj</dc:creator>
		<pubDate>Sun, 05 Oct 2008 21:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-9378</guid>
		<description>1. 

Because packets of all hosts from this subnets are allowed the fourth octet of inverse mask is 255.
The inverse mask of third octet is the key question. Let&#039;s see the binary form of every fourth subnet.

&lt;code&gt;
DCbits  11111100 ==&gt;&gt; 252
0	00000000
4	00000100
8	00001000
32	00100000
36	00100100
64	01000000
96	01100000
100	01100100
&lt;/code&gt;

Because only the last two bit is the same in every binary form, the inverse mask of third octet is 252.

&lt;code&gt;
access-list 10 permit 131.102.0.0 0.0.252.255
&lt;/code&gt;

2. 

The range of even subnets from 200.100.128.0/24 to 200.100.138.0/24 is union of two subnets. Let&#039;s see the binary form of third octets

&lt;code&gt;
DCbits       11
128	10000000
130	10000010
132	10000100
134	10000110
----------------
136	10001000
138	10001010
DCbit  	      1
&lt;/code&gt;

Based on the binary form two permit statements required

&lt;code&gt;
access-list 20 permit 200.100.128.0 0.0.6.0
access-list 20 permit 200.100.136.0 0.0.2.0
&lt;/code&gt;

3. 

Because we must not use any DENY statements we must subnetting the given &quot;C&quot; class subnet, and we must use two individual address.

The subnets are following:

&lt;code&gt;
158.1.100.0/26   - 158.1.100.63/26
158.1.100.64/28  - 158.1.100.79/28
158.1.100.80/29  - 158.1.100.87/29
158.1.100.88/30  - 158.1.100.91/30
158.1.100.92/32
158.1.100.107/32
158.1.100.108/30 - 158.1.100.111/30
158.1.100.112/28 - 158.1.100.127/28
158.1.100.128/25 - 158.1.100.255/25
&lt;/code&gt;

Access list:

&lt;code&gt;
access-list 30 permit 158.1.100.0 0.0.0.63
access-list 30 permit 158.1.100.64 0.0.0.15
access-list 30 permit 158.1.100.80 0.0.0.7
access-list 30 permit 158.1.100.88 0.0.0.3
access-list 30 permit 158.1.100.92 0.0.0.0
access-list 30 permit 158.1.100.107 0.0.0.0
access-list 30 permit 158.1.100.108 0.0.0.3
access-list 30 permit 158.1.100.112 0.0.0.15
access-list 30 permit 158.1.100.128 0.0.0.127
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>1. </p>
<p>Because packets of all hosts from this subnets are allowed the fourth octet of inverse mask is 255.<br />
The inverse mask of third octet is the key question. Let&#8217;s see the binary form of every fourth subnet.</p>
<p><code><br />
DCbits  11111100 ==&gt;&gt; 252<br />
0	00000000<br />
4	00000100<br />
8	00001000<br />
32	00100000<br />
36	00100100<br />
64	01000000<br />
96	01100000<br />
100	01100100<br />
</code></p>
<p>Because only the last two bit is the same in every binary form, the inverse mask of third octet is 252.</p>
<p><code><br />
access-list 10 permit 131.102.0.0 0.0.252.255<br />
</code></p>
<p>2. </p>
<p>The range of even subnets from 200.100.128.0/24 to 200.100.138.0/24 is union of two subnets. Let&#8217;s see the binary form of third octets</p>
<p><code><br />
DCbits       11<br />
128	10000000<br />
130	10000010<br />
132	10000100<br />
134	10000110<br />
----------------<br />
136	10001000<br />
138	10001010<br />
DCbit  	      1<br />
</code></p>
<p>Based on the binary form two permit statements required</p>
<p><code><br />
access-list 20 permit 200.100.128.0 0.0.6.0<br />
access-list 20 permit 200.100.136.0 0.0.2.0<br />
</code></p>
<p>3. </p>
<p>Because we must not use any DENY statements we must subnetting the given &#8220;C&#8221; class subnet, and we must use two individual address.</p>
<p>The subnets are following:</p>
<p><code><br />
158.1.100.0/26   - 158.1.100.63/26<br />
158.1.100.64/28  - 158.1.100.79/28<br />
158.1.100.80/29  - 158.1.100.87/29<br />
158.1.100.88/30  - 158.1.100.91/30<br />
158.1.100.92/32<br />
158.1.100.107/32<br />
158.1.100.108/30 - 158.1.100.111/30<br />
158.1.100.112/28 - 158.1.100.127/28<br />
158.1.100.128/25 - 158.1.100.255/25<br />
</code></p>
<p>Access list:</p>
<p><code><br />
access-list 30 permit 158.1.100.0 0.0.0.63<br />
access-list 30 permit 158.1.100.64 0.0.0.15<br />
access-list 30 permit 158.1.100.80 0.0.0.7<br />
access-list 30 permit 158.1.100.88 0.0.0.3<br />
access-list 30 permit 158.1.100.92 0.0.0.0<br />
access-list 30 permit 158.1.100.107 0.0.0.0<br />
access-list 30 permit 158.1.100.108 0.0.0.3<br />
access-list 30 permit 158.1.100.112 0.0.0.15<br />
access-list 30 permit 158.1.100.128 0.0.0.127<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rack009</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-8468</link>
		<dc:creator>Rack009</dc:creator>
		<pubDate>Tue, 16 Sep 2008 20:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-8468</guid>
		<description>START-&gt;RUN-&gt;CALC</description>
		<content:encoded><![CDATA[<p>START-&gt;RUN-&gt;CALC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rami</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-8458</link>
		<dc:creator>rami</dc:creator>
		<pubDate>Tue, 16 Sep 2008 16:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-8458</guid>
		<description>1.  Allow packets from all hosts in every fourth /24 network from 131.102.0.0/16

131.102.0.0 0.0.252.255

2.  In as few lines as possible, permit only the following networks (assume it will be a distribute-list):

200.100.128.0/24 0.0.6.0   
200.100.136.0/24 0.0.2.0

3. In as few lines as possible, allow access from all hosts in the 158.1.100.0/24 network except .93 through .106.  You are not allowed to use any “deny” statements.

150.1.100.0 0.0.0.63
150.1.100.64 0.0.0.15
150.1.100.80 0.0.0.7
150.1.100.92 0.0.0.0
150.1.100.107 0.0.0.0
150.1.100.108 0.0.0.3
150.1.100.112 0.0.0.15
150.1.100.128 0.0.0.127

This was great practice!</description>
		<content:encoded><![CDATA[<p>1.  Allow packets from all hosts in every fourth /24 network from 131.102.0.0/16</p>
<p>131.102.0.0 0.0.252.255</p>
<p>2.  In as few lines as possible, permit only the following networks (assume it will be a distribute-list):</p>
<p>200.100.128.0/24 0.0.6.0<br />
200.100.136.0/24 0.0.2.0</p>
<p>3. In as few lines as possible, allow access from all hosts in the 158.1.100.0/24 network except .93 through .106.  You are not allowed to use any “deny” statements.</p>
<p>150.1.100.0 0.0.0.63<br />
150.1.100.64 0.0.0.15<br />
150.1.100.80 0.0.0.7<br />
150.1.100.92 0.0.0.0<br />
150.1.100.107 0.0.0.0<br />
150.1.100.108 0.0.0.3<br />
150.1.100.112 0.0.0.15<br />
150.1.100.128 0.0.0.127</p>
<p>This was great practice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tibor Kasza</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-8456</link>
		<dc:creator>Tibor Kasza</dc:creator>
		<pubDate>Tue, 16 Sep 2008 15:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-8456</guid>
		<description>last version

1.
access-list 14 permit 131.102.0.0 0.0.252.255

2.
access-list 15 deny 200.100.140.0 0.0.2.0 
access-list 15 permit 200.100.128.0 0.0.14.0

3.
access-list 16 permit 158.1.100.0 0.0.0.63
access-list 16 permit 158.1.100.64 0.0.0.15
access-list 16 permit 158.1.100.80 0.0.0.7
access-list 16 permit 158.1.100.88 0.0.0.3
access-list 16 permit 158.1.100.92 0.0.0.0
access-list 16 permit 158.1.100.107 0.0.0.0
access-list 16 permit 158.1.100.108 0.0.0.3
access-list 16 permit 158.1.100.112 0.0.0.15
access-list 16 permit 158.1.100.128 0.0.0.127</description>
		<content:encoded><![CDATA[<p>last version</p>
<p>1.<br />
access-list 14 permit 131.102.0.0 0.0.252.255</p>
<p>2.<br />
access-list 15 deny 200.100.140.0 0.0.2.0<br />
access-list 15 permit 200.100.128.0 0.0.14.0</p>
<p>3.<br />
access-list 16 permit 158.1.100.0 0.0.0.63<br />
access-list 16 permit 158.1.100.64 0.0.0.15<br />
access-list 16 permit 158.1.100.80 0.0.0.7<br />
access-list 16 permit 158.1.100.88 0.0.0.3<br />
access-list 16 permit 158.1.100.92 0.0.0.0<br />
access-list 16 permit 158.1.100.107 0.0.0.0<br />
access-list 16 permit 158.1.100.108 0.0.0.3<br />
access-list 16 permit 158.1.100.112 0.0.0.15<br />
access-list 16 permit 158.1.100.128 0.0.0.127</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tibor Kasza</title>
		<link>http://blog.ine.com/2008/09/15/binary-math-part-i/comment-page-1/#comment-8455</link>
		<dc:creator>Tibor Kasza</dc:creator>
		<pubDate>Tue, 16 Sep 2008 15:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ine.com/?p=258#comment-8455</guid>
		<description>corrected

1.
access-list 14 permit 131.102.0.0 0.0.252.255

2.
access-list 15 deny 200.100.140.0 0.0.0.0
access-list 15 deny 200.100.142.0 0.0.0.0 
access-list 15 permit 200.100.128.0 0.0.14.0

3.
access-list 16 permit 158.1.100.0 0.0.0.63
access-list 16 permit 158.1.100.64 0.0.0.15
access-list 16 permit 158.1.100.80 0.0.0.7
access-list 16 permit 158.1.100.88 0.0.0.3
access-list 16 permit 158.1.100.92 0.0.0.0
access-list 16 permit 158.1.100.107 0.0.0.0
access-list 16 permit 158.1.100.108 0.0.0.3
access-list 16 permit 158.1.100.112 0.0.0.15
access-list 16 permit 158.1.100.128 0.0.0.127</description>
		<content:encoded><![CDATA[<p>corrected</p>
<p>1.<br />
access-list 14 permit 131.102.0.0 0.0.252.255</p>
<p>2.<br />
access-list 15 deny 200.100.140.0 0.0.0.0<br />
access-list 15 deny 200.100.142.0 0.0.0.0<br />
access-list 15 permit 200.100.128.0 0.0.14.0</p>
<p>3.<br />
access-list 16 permit 158.1.100.0 0.0.0.63<br />
access-list 16 permit 158.1.100.64 0.0.0.15<br />
access-list 16 permit 158.1.100.80 0.0.0.7<br />
access-list 16 permit 158.1.100.88 0.0.0.3<br />
access-list 16 permit 158.1.100.92 0.0.0.0<br />
access-list 16 permit 158.1.100.107 0.0.0.0<br />
access-list 16 permit 158.1.100.108 0.0.0.3<br />
access-list 16 permit 158.1.100.112 0.0.0.15<br />
access-list 16 permit 158.1.100.128 0.0.0.127</p>
]]></content:encoded>
	</item>
</channel>
</rss>
