From: Michael Snyder (msnyder@revolutioncomputer.com)
Date: Sat Feb 07 2004 - 21:54:49 GMT-3
I made a mistake on the earlier post. The examples were correct but the
intro had the `and` and `or` transposed.
----------------------------------------------------------------------
I like 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 list 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. It's a revenue
idea, first one to the patent office wins.
Michael Snyder
Lead Network Engineer
CCDP/SP, MCSE
Revolution Computer Systems
(270) 443-7400
------------------------------------------------------------------------
--------
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 wide distribution of my
ideas. First one to the patent office wins big.
Radio Carbon Free Veggies
I had another idea. I'm sure I'm not the first to think of this one. I
reinvent the wheel on a regular basis.
Carbon 14 is basically an impurity in our environment. The numbers I
found on the web is one carbon 14 atom to 848,000,000,000 atoms of
carbon 12.
Of course plants take it up in with the normal C02 during their
lifetimes and it's in the food we eat.
Something like 14 disintegrations per gram of carbon per minute from the
presence of the 14C impurity.
Simple idea, let's grow it without it.
How?
Any fossil fuel produces radiocarbon free CO2. Most greenhouses use CO2
enrichment anyway. I wonder if they realize that their product has less
radiocarbon than the normal tomato.
Venting your gas water heater to your home greenhouse could have a
similar effect.
I also know from an earlier failed idea; that carbon 14 CO2 has a weight
of 46 vs carbon 12 CO2 weight of 44. It's a 5% difference. And since we
can measure 14C with a thin wall Geiger counter, rigging up a slow speed
gas centrifuge is doable. Skim off 1% the heaviest part of the air, pass
it by the Geiger counter and let a computer control the speed and valves
of the centrifuge. What is left behind can be piped directly into the
green house.
So what do we do with the low 14C veggies? That's the easy part.
Think of every health food fan in the world.
Think TV commercial.
You point your Geiger counter at a normal tomato, beep beep beep beep
You point your Geiger counter at the new improved low radiocarbon
tomato, beep.
-----------------------------------------------------------------------
Another thought:
Did you know one mole (14 grams) of 14C = One Megawatt hour.
Carbon-14 emits beta with an average energy of 0.049 MeV.
0.049 mega electron volt = 7.85073933E-15 joule (energy)
1 mole of particles = 6.02214 x 10E23
7.85073933E-15 joule * 6.02214 x 10E23 = 4.72782513487662e+9 Joules per
Mole
4727825134.87662 joule = 1.31328475968795 mega watt hour (energy)
You would get half of that in the first 6000 years. :)
Be a good laptop battery.
This archive was generated by hypermail 2.1.4 : Fri Mar 05 2004 - 07:13:47 GMT-3