Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 01-22-2004, 08:57 AM   #1 (permalink)
Junkie
 
Location: RI
Don King explaining Access Lists

I dunno, I got a kick outta this. So I thought I'd share it with you all.
Quote:
Don King Explains IP Extended Access Lists

Here at RouterGod Online Magazine we are philosophically opposed to access lists. Access lists are a sneaky, underhanded way to grant some packets special rights while denying other packets those same rights. Sometimes packets are discriminated against because "they don't have the right address" or are from an undesirable subnet. Sometimes perfectly good packets are discriminated against because of the "wrong protocol or port" or they come from an undesirable interface. Packets that hit a repressive ACL are treated like garbage and dropped unceremoniously. This causes the network infrastructure to suffer from low self esteem and poor morale. But the harsh reality is that Cisco continues this evil practice and it is our duty to point out injustice where we find it. So to lecture on the basics of IP Extended Access Lists we present world famous boxing promoter Don King:


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

My, my, my...Just look at all of you. Bright, shiny faces filled with hope and enthusiasm, wanting to learn about access lists and how they work. Well I'm here to explain how access lists work, IP extended access lists in particular. What goes on inside of a Cisco router is not always pretty and some of you may want to leave the room during the lecture and that's OK. The inner machinations of a router can be most puzzling but I will not obfuscate, prevaricate or denigrate and you have my solemn word on that!
Think of a router as a boxing ring. A boxing ring into which 2 packets will enter, with only one to leave victorious. Imagine the pugilistic majesty as 2 noble packets do battle. Which packet will win? How long will this epic struggle take? Will the winning packet, even though victorious, suffer injury and not be able to continue his journey?

These brave packets enter the router knowing of how important victory is. For it is their desire to move up to bigger and more impressive routers, until they reach the core router. Each packet has it's own unique strengths, one packet might be bigger then his opponent. One packet might have an impressive source IP address. Thousands of other packets will observe this spectacle from the safety of the input and output buffers. Another night of wonderful entertainment is on hand and many have placed bets on the outcome. But there is something that the unwitting public is unaware of. The fight is fixed!

Yes, I too reel in horror at the very notion that things may not be on the "up and up"...Who would do such a thing? What vile, reprehensible, low down, no good villain would seek to alter the outcome of our noble sport? Well as God is my witness, the Network Administrator did it!

Why did he do such a dastardly, despicable deed? Who can say what goes on in the dark, depraved mind of a Network Administrator? Perhaps he likes to play God and control the destinies of these fine, upstanding packets? Perhaps he simply dislikes these innocent packets and wants to do them harm...I cannot attest to his ignominious, unscrupulous and disingenuous motivation but I can tell you how he did it. He committed this atrocity with an access list!

You see, every packet has unique attributes, such as where they are from and where they are going. They have other attributes such as their protocol, address and port. The router positions a big burly bouncer by the door and he remembers what interface the packet entered the router from. All of these attributes can be used to permit or deny the packet from enjoying liberty and freedom. I will show you how to configure the router to filter packets but I urge you not to take part in such nefarious shenanigans. In fact, when ever you find an access list in a router's configuration, please remove it. It's the decent thing to do.

An IP extended access list is a series of statements that are created in global mode. Each statement is a test that each packet is subjected to. Each statement contains the keywords permit or deny. When a packet is being tested by a access list statement 3 things can happen:

The packet can match the exact arguments of the statement, and if the statement contains the word permit, the packet is allowed to continue on his travels.
The packet can match the exact arguments of the statement, and if the statement contains the word deny, the router will viciously delete the packet from his buffers and act like he never saw him.
If the packet does not match any of the arguments in the statement, he is passed downward to another statement in the access list where he is subjected to another test, but with different arguments.


Here's some more horrific details to keep in mind: The access list is a series of statements, the router starts from the top and works downward testing each packet, if the packet is really lucky, he will have hit a permit statement and went on his merry way. If the packet does not match the arguments on one line, he is sent downward to the next line, if he does not match any of those arguments, he is sent down to be tested by the next line. After the packet is subjected to 2 or 3 lines in an access list without a match, he starts to get worried. Just before the packet is sent to the final line in an access list something unusual happens to the packet, he starts to say his prayers...

The packet is saying his prayers because he knows he's doomed. If the last line in the access list does not match his attributes exactly and contain the word permit, he router will murder the packet and we will never hear from that packet again. This inhumane policy is what Cisco euphemistically calls the "Implied Deny Any" statement.

Say you at your girlfriends place and you and she are laying in bed watching TV, She lives in one of those tall buildings in New York city and suddenly her husband comes home, you grab your clothes and haul ass down the fire escape on the outside of the building, you are climbing down the ladder at the bottom of the fire escape to alley below, one rung at a time until you realize that you are on the last rung and the street is still 50 feet below you, now you know how that packet must've felt!

If you put at statement a the end of your access list that permits any packet from anywhere going to anywhere to be permitted to pass, that will put an end to this senseless killing:

access-list 100 permit ip any any

Before we get down to the actual configuration, here are some things to remember, access lists are created globally but applied to the actual interface you want to filter at. At the interface they can be applied to incoming packets or outgoing packets. Applying the access lists to incoming packets causes a little more work for the router's processor. You can only apply 1 list per protocol per interface per direction. Access lists are often called by other IOS functions and the extended access list is most effective when applied as near as possible to the source of packets that you want to deny. Access lists can also take into account the time of day for increased functionality.

All access lists start out with the term access-list followed by the group number of the access list. IP extended access lists are numbered from 100 to 199. The next term in an access list is permit or deny. The next term is the protocol the access list statement deals with. Next is the source address and wildcard mask and destination address and wildcard mask. A wildcard mask is a backwards subnet mask where, when you convert the mask to binary, the "1" bits represent the bit positions in the address to ignore. Maybe I should show you an IP address with a wildcard mask:

192.168.45.121 0.0.0.255

The 255 in the last octet of the wildcard mask tells the access list to ignore the last 8 bits of the ip address. So this means that any number in the last octet would be acceptable by the access list.

So here's a simple IP extended access list:

access-list 100 permit ip 172.16.0.0 0.0.255.255 172.17.0.0 0.0.255.255

The above line allows the 172.16 network to reach the 172.17 network using IP. If you want to be permissive and allow everybody you can substitute the word any for the IP address. Say we want to allow all clients to reach a certain network:

access-list 175 permit ip any 172.28.2.0 0.0.0.255

You can also specify a specific host in your list by using the word host. Access lists are processed from top down so be careful about the order in which your statements appear. When you are writing an access list for TCP you can append the port number or service on the end of your list by using the equal or eq keyword:

access-list 121 permit tcp any host 172.22.230.2 eq www

The above list allows anybody to access the web server at 172.22.230.2

To apply your access list you go to the interface and use the ip access-group command and specify the direction you want the filtering to take place:

ip access-group 121 in

Remember the access-list and access-group commands must use the same number for it to work.
Fallon is offline  
Old 01-22-2004, 10:21 PM   #2 (permalink)
Insane
 
Location: Plugged In
Heh, I forgot about <a href="http://www.routergod.com/">RouterGod</a>.

Some others:
Gary Coleman on Priority Queuing
Agent Smith Explains Syslog!
Alicia Silverstone on ISDN
Charles Manson On Static Routes
Anna Nicole Smith on Catalyst 1900
The Iraqi Information Minister Tells All!
Mister Rogers on the RS 232
Tonya Harding on the 700 Series
7 of 9 on OSPF Part 1
7 of 9 on OSPF Part 2
Darva Conger on the Config Register
Juliette Lewis Troubleshoots Frame Relay
Gillian Anderson on LAN Switching Part 1
Gillian Anderson on LAN Switching Part2
Gunney Sgt. Hartman at CCNA Boot Camp
Paul Hogan Tells Us About HSRP!
Elizabeth Hurley On the Cisco 2600 Series
Drunken Dwarf Dissects DHCP!
Cisco Psychic Helpdesk
Robert Downey Jr On Ethernet
Fabio on IGRP
Trinity on IP-Helper addresses
Max Throughput CCIE
Denise Richards On the PIX Firewall
Boner is offline  
Old 01-23-2004, 03:46 AM   #3 (permalink)
Quadrature Amplitude Modulator
 
oberon's Avatar
 
Location: Denver
That's a really cheesy article if you ask me. I got turned off just reading the dude get all snotty about access lists.
__________________
"There are finer fish in the sea than have ever been caught." -- Irish proverb
oberon is offline  
Old 01-23-2004, 07:03 AM   #4 (permalink)
Tilted
 
that's..... different
mystix is offline  
Old 01-23-2004, 07:36 AM   #5 (permalink)
Junkie
 
Location: RI
I guess it's more for people who play with routers.
Since I just started playing with Routers, I thought it was kind of funny.
Fallon is offline  
Old 01-23-2004, 05:50 PM   #6 (permalink)
I am Winter Born
 
Pragma's Avatar
 
Location: Alexandria, VA
RouterGod is an excellent website, there are so many times that I've turned to it for a cheap laugh, while also expanding/refreshing my knowledge.
__________________
Eat antimatter, Posleen-boy!
Pragma is offline  
Old 01-23-2004, 09:24 PM   #7 (permalink)
Psycho
 
you should have just linked to Fark and saved the TFP.
Be original or, link it to the source.
poof is offline  
Old 01-23-2004, 09:29 PM   #8 (permalink)
Junkie
 
Location: RI
bah, I swore I put the link in. I remember copying the link to, sorry.
Fallon is offline  
Old 01-24-2004, 12:07 AM   #9 (permalink)
Psycho
 
No Harm, No Foul, Fallon.
poof is offline  
 

Tags
access, don, explaining, king, lists


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 09:31 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360