REPOST: Using Windows Calc for Summary Access Lists

From: Michael Snyder (msnyder@revolutioncomputer.com)
Date: Sat May 15 2004 - 14:18:29 GMT-3


I like to repost the techniques I've developed during my lab candidacy.
The three years has been a long time, and I've developed two unique
techniques that as far as I know, didn't exist. One is the igp grading
script, do a search for `route not present script` in the archives.

The other is using the windows calc to do summarization. The reason
that it works is that logical operations work in any number base. Of
course you should know how to do it in binary, but speed is what we need
in the lab; not to mention less mistakes.

The method is as follows:

Assuming you have networks you want to summarize in octet columns

a1.b1.c1.d1
a2.b2.c2.d2

You do the logical operations in columns, of example all the a`s then
the b`s then the c`s, etc. Of course it only applies to the octets you
wish to summarize. If all the a`s and b`s and d`s are the same, you
only have to do is the c'`s. Wildcard zeros will do an exact match,
Wildcard 255 is a any match.

`and` all the c`s and call it result-1
`or` all the c`s and call it result-2

The finished access list will use the results in this way

Access-list 1 permit a.b.(result-1).d 0.0.(result-1 xor result-2).255

So the wildcard octet is really result-1 xor result-2 = wildcard

It's not as complex as it looks; I'll do some examples with real network
numbers.

-----------------------------------------------------------------------

Let's deny the odd subnets of 192.168.x.x/32

R2#show ip route 192.168.0.0 255.255.0.0 longer-prefixes

     192.168.9.0/32 is subnetted, 1 subnets
O E1 192.168.9.9 [110/1128] via 172.16.56.6, 1d16h, Serial0.56
     192.168.4.0/32 is subnetted, 1 subnets
D 192.168.4.4 [90/2297856] via 172.16.24.2, 1d16h, Serial0.24
     192.168.5.0/32 is subnetted, 1 subnets
O IA 192.168.5.5 [110/65] via 172.16.56.5, 1d16h, Serial0.56
     192.168.6.0/32 is subnetted, 1 subnets
O IA 192.168.6.6 [110/65] via 172.16.56.6, 1d16h, Serial0.56
     192.168.7.0/32 is subnetted, 1 subnets
O 192.168.7.7 [110/75] via 172.16.56.6, 1d16h, Serial0.56
                    [110/75] via 172.16.56.5, 1d16h, Serial0.56
     192.168.1.0/32 is subnetted, 1 subnets
R 192.168.1.1 [120/1] via 172.16.12.1, 00:00:22, Serial1
     192.168.2.0/32 is subnetted, 1 subnets
C 192.168.2.2 is directly connected, Loopback0
R2#

192.168.1.1
192.168.5.5
192.168.7.7
192.168.9.9

So, the third and fourth octets are same, let`s just do one of them.

First `and` the values

(1&5&7&9) = 1

'or' the values

(1|5|7|9) = 15

`xor` the results

1 xor 15 = 14

Answer in permit format (the show `ip route list` list command didn't
like my deny format)

access-list 12 permit 192.168.1.1 0.0.14.14

Let`s try it on the router.

R2#show ip route list 12
O E1 192.168.9.9 [110/1128] via 172.16.56.6, 1d17h, Serial0.56
O IA 192.168.5.5 [110/65] via 172.16.56.5, 1d17h, Serial0.56
O 192.168.7.7 [110/75] via 172.16.56.6, 1d17h, Serial0.56
                    [110/75] via 172.16.56.5, 1d17h, Serial0.56
R 192.168.1.1 [120/1] via 172.16.12.1, 00:00:17, Serial1

The final form would be

acess-list 12 deny 192.168.1.1 0.0.14.14
acess-list 12 permit any

Ok, some notes. The math works, but think about the answer it's giving
you. Permit 10.0.0.0 128.255.255.255 isn't much better than a default
route. If the single line answer has too much scope, try a multiline
answer. I've included a more complex example from a previous email
below.

Second, if any paysites wish to use my techniques please feel free. A
public post is a public post. Please list me as the contributor.

Third, for personal reasons I've appended some writing I have done of a
completely different subject at the end of this email.

Michael Snyder

-----------------------------------------------------------------------

Summarize the following list:
 
133.6.11.0
135.16.171.0
172.60.51.0
121.15.120.0
112.59.9.0

Now using windows calc in decimal mode, lets do some octet equations.

First will check the first octet for a common network. If there isn't a
common network, then granddaddy of all summaries is the single line
answer. 0.0.0.0/0

133&135&172&121&112=0, which means there's no common network for a one
line answer, other than a default network.

There's only 5 networks, so lets check pairs for common networks.

133&135 = 133, there's common network.

Just checking against the others, 133&172=132, another common network.

Note that we're using the result of the preceding common network check
to check against the next network.

Using 132&121=0; no good.

Checking 132&112=0; also no good.

Maybe 121&112 are common to each other. 121&112=112, which means we can
have a two line solution. The first three networks, then the next two.

A summary is defined as the networks `and` together for the common
network, then the values `or` together. Then take the two results and
`xor` for the wildcard mask.

You do one octet column at a time.

133.6.11.0
135.16.171.0
172.60.51.0

(133&135&172) xor (133|135|172)

answer 132, 132 xor 175

answer network 132 wildcard 43

Next octet,

(6&16&60) xor (6|16|60)

Network 0, 0 xor 62

Answer network 0 wildcard 62

Third octet

(11&171&51) xor (11|171|51)

Network 3, wildcard 184

Putting the answers together,

132.0.3.0 43.62.184.255

Applying the same treatment to

121.15.120.0
112.59.9.0

results as

112.11.8.0 9.52.113.255

My final answer

access-list 10 permit 132.0.3.0 43.62.184.255
access-list 10 permit 112.11.8.0 9.52.113.255

-----------------------------------------------------------------------

Here's a completely unrelated subject. I like to use the list for wide
distribution of my ideas at times.

The SSSAC

Ok, it's time to build this new energy source.

The good news we have all the needed parts. We got carbon 14, we got
copper, and we have high frequency diodes.

The basic concepts:

a) One Mole of carbon 14 is roughly 1 megawatt hour of energy.
b) The First year, one mole of carbon 14 should product around 150 watts
of power total.
c) Carbon 14 is safe to handle; heck we're made of some of it.
d) It is not that hard to produce. Nitrogen plus Neutrons equal Carbon
14
e) Many modern electronic devices could run on 150 watts of power per
year.

The advanced concepts:

f) I'm thinking of a process that uses liquid nitrogen placed inside
thermal shielding at commercial power plants to product carbon 14.
Thermal shielding also can be designed to slow down neutrons to the
needed nitrogen capture speed.
g) This would provide an addition source of revenue for the power
plants, and while I've been focusing on small power sources, I don't see
a reason we couldn't scale power production up to city size. Any
produced power sources will last for 6000 years. If you only added 1000
moles to a power bank at the end of 50 years you get 2K megawatt hours
per year of production, and you still have a 5000 year power cycle to
go!

That's 1600 pounds of fuel to supply 1130 megawatt years of power! How
many pounds of nitrogen do we have access too? :)

Back to basics, how do we build one of these?

A proof of concept lab project would be:

Take thin copper sheets, deposit a thin layer of carbon 14 on it. Fold
the sheet, press it (copper rolling press), fold it again, press it
again. We are done. Make some allowances for the nitrogen byproduct to
be gracefully released. With only four copper layers of this example, it
shouldn't be problem.

Now we have the fuel source, we need the circuit to make it work.
Something that took me a while to realize is that power is released both
in DC and AC forms from the self sourcing anode. To gain the benefit of
the AC output, we need high frequency diodes.

Ground --------|<|----(Carbon 14/copper fuelcell)---|<|----- Output

There's a important relationship between the amount of carbon fuel and
copper. Think of the copper/carbon ratio like a tub filled with water.
In this case a tub filled with electrons. When the a carbon 14 atom
releases it's high energy electron we want the other electrons in the
copper to get splashed out thru the diodes. Of course that leaves a lack
of electrons which needs to be back filled via the diodes. Hence, both a
DC and AC output.

The DC output is even more interesting. The resistance of the source
anode is nearly infinity. The released electron from the carbon has to
go somewhere! The circuit is only limited to breakdown voltages of it's
diodes and efficiency of the load capacitors. In other words there's
very little limit to the voltages you could charge a capacitor too.

On a side note, replace the diodes with leds and you have a 6 thousand
year lasting flash light.

I'm going to name this circuit after myself. The SSSAC.

The Snyder Self Sourcing Anode Circuit.

Ground --------|<|----(Carbon 14/copper fuelcell)---|<|----- Output

Ground to diode to Carbon14/copper fuelcell to diode to output.

Surely someone wants to build a 6000 year LED flashlight that weights
under an oz.



This archive was generated by hypermail 2.1.4 : Wed Jun 02 2004 - 11:12:12 GMT-3