Jeremy’s IT Lab lecture video:
Commands
Commands List
ACL Show Commands
11. ACL
Link to original
- show access-lists
-->Shows ALL configured access-lists on the router- show ip access-lists
-->Shows IP related access-lists on the routerACL Global Commands
ACL Global
1. General
- access-list number remark description
-->Gives the specified access list a remark/description- ip access-list resequence acl-name/acl-number starting-seq-number increment
-->Modifies the access list’s sequencing numbers according to specified arguments2. Standard
- access-list number { deny
|permit } ip wildcard-mask-->Configures a standard numbered ACL- ip access-list standard acl-name/acl-number
-->Enters standard named ACL configuration mode
- [entry-number] { deny
|permit } ip wildcard-mask3. Extended
Link to original
- access-list number { deny
|permit } protocol src-ip dst-ip-->Configures an extended numbered ACL- ip access-list extended acl-name/acl-number
-->Enters standard named ACL configuration mode
- [entry-number] { deny
|permit } protocol src-ip dst-ip- [entry-number] { deny
|permit } protocol src-ip argument source-port-num dst-ip argument dst-port-num (Arguments: eq/gt/lt/neq/range )ACL Interface Commands
ACL Interface
Link to original
- ip access-group number/name { in
|out }-->Applies the specified access-list onto the interface, either inbound or outbound
ACL Information
What Are Access Control Lists (ACLs)?
Access Control Lists (ACLs) are traffic filters which contain ordered lists of rules called ‘Access Control Entries’ (ACEs).
- ACLs function as a packet filter, as they instruct the router to permit or deny traffic based on the defined ACEs.
- ACLs can filter traffic based on source/destination IP addresses, source/destination Layer 4 ports, and etc.
ACL Config General Info
- ACLs are configured globally on the router (global configuration mode), but they must be applied onto an interface in order to take effect.
- ACLs are applied either inbound or outbound on interfaces.
- When the router checks a packet against the configured ACL, it processes the ACEs in order, from top to bottom.
- If the packet matches one of the ACEs in the ACL, the router will take action (apply the ACE rule) and stops processing the ACL (all entries below the matching entry will be ignored).
Implicit Deny
Implicit Deny is a feature that is present in all ACLs. The implicit deny tells the router to deny all traffic that doesn’t match any of the configured ACEs in the ACL.
ACL Types
There are two types of ACLs with both containing two subtypes:
- Standard ACLs
- Standard ACLs match based on source IP address only
- Standard ACLs can use the number range (1 - 99) and (1300 - 1999)
- They should be applied as close to the destination as possible.
- They include two subtypes:
- Standard numbered ACLs
- Standard named ACLs
- Extended ACLs
- Extended ACLs match based on source/destination IP address, source/destination port address, etc.
- Extended ACLs can use the number range (100 - 199) and (2000 - 2699)
- They should be applied as close to the source as possible.
- They include two subtypes:
- Extended numbered ACLs
- Extended named ACLs
Numbered ACLs
- Different types of numbered ACLs have a different range of numbers that they can use.
- So, each range can be used to identify what type of numbered ACL we’re looking it.
Standard ACL Types
1. Standard Numbered ACLs
Standard numbered ACLs are one of the Standard ACL subtypes. They are identified with a number.
- (Ex. ACL 1, ACL 2)
2. Standard Named ACLs
Standard named ACLs are one of the Standard ACL subtypes. They are identified with a name.
- (Ex. FIRST_ACL, CCNA_ACL)
Standard ACL Configuration
There are two ways to create a standard ACLs:
- Global configuration / directly
- This method only allows you to create numbered ACLs
- Done through the command:
access-list STANDARD-ACL-NUMBER { deny | permit } IP WILDCARD-MASK
- Examples:
- access-list 1 deny 1.1.1.1 0.0.0.0
- access-list 1 deny 1.1.1.1
<--(only possible in Standard ACLs) - access-list 1 deny host 1.1.1.1
- access-list 1 permit any
- access-list 1 permit 0.0.0.0 255.255.255.255
- ACL configuration mode
- Done through the command:
ip access-list standard NAME/NUMBER
- Which puts you in Standard ACL configuration mode. ACEs can be set through the following command format:
- [entry-number] { deny | permit } ip wildcard-mask
- Done through the command:
Access-list arguments
After the ’{ deny | permit }’ part of your command, you usually specify the ip and wildcard-mask. But, there are some arguments you could use as well:
- host
- Instead of specifying a wildcard-mask for a host address (/32) like this:
access-list 1 deny 1.1.1.1 0.0.0.0- You can use the host argument and the router will automatically translate it into a host address (/32):
access-list 1 deny host 1.1.1.1
- any
- Instead of specifying an ip and wildcard-mask to match/deny all traffic like this:
access-list 1 permit 0.0.0.0 255.255.255.255- You could use the any argument, which will match/deny all traffic:
access-list 1 permit any
Notes on how routers handle ACLs
- The router may re-order the /32 entries.
- This improves the efficiency of processing the ACL.
- It does not change the effect of the ACL.
- This applies to both standard named and standard numbered ACLs.
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
ACL Show Parancsok
11. ACL
Eredeti hivatkozása
- show access-lists
-->Megjeleníti az ÖSSZES konfigurált hozzáférési listát a routeren- show ip access-lists
-->Megjeleníti az IP alapú hozzáférési listákat a routerenACL Globális Parancsok
ACL Globális
1. Általános
- access-list number remark description
-->Megjegyzést/leírást rendel a megadott hozzáférési listához- ip access-list resequence acl-name/acl-number starting-seq-number increment
-->Újraszámozza az ACL bejegyzéseinek sorszámait a megadott paraméterek szerint2. Standard
- access-list number { deny
|permit } ip wildcard-mask-->Számozott standard ACL bejegyzést konfigurál- ip access-list standard acl-name/acl-number
-->Belép a nevesített standard ACL konfigurációs módjába
- [entry-number] { deny
|permit } ip wildcard-mask3. Extended
Eredeti hivatkozása
- access-list number { deny
|permit } protocol src-ip dst-ip-->Számozott kiterjesztett (extended) ACL bejegyzést konfigurál- ip access-list extended acl-name/acl-number
-->Belép a nevesített kiterjesztett (extended) ACL konfigurációs módjába
- [entry-number] { deny
|permit } protocol src-ip dst-ip- [entry-number] { deny
|permit } protocol src-ip argument source-port-num dst-ip argument dst-port-num (Paraméterek: eq/gt/lt/neq/range )ACL Interfész Parancsok
ACL Interfész
Eredeti hivatkozása
- ip access-group number/name { in
|out }-->Alkalmazza a megadott hozzáférési listát az interfészre, bejövő (inbound) vagy kimenő (outbound) irányban
ACL Információk
Mik azok az Access Control List-ek (ACL-ek)?
Az Access Control List-ek (ACL-ek) olyan forgalomszűrők, amelyek rendezett szabálylistákat, úgynevezett Access Control Entry-ket (ACE) tartalmaznak.
- Az ACL-ek csomagszűrőként működnek: utasítják a routert a forgalom engedélyezésére (permit) vagy megtagadására (deny) a definiált ACE szabályok alapján.
- Az ACL-ek szűrhetik a forgalmat forrás/cél IP címek, forrás/cél Layer 4 portok stb. alapján.
ACL Konfiguráció - Általános Információk
- Az ACL-ek globálisan konfigurálhatók a routeren (global configuration mode), de a működéshez alkalmazni kell őket egy interfészre.
- Az ACL-ek egy interfészre inbound (bejövő) vagy outbound (kimenő) irányban alkalmazhatók.
- Amikor a router ellenőrzi a csomagot a beállított ACL alapján, sorrendben, felülről lefelé haladva értékeli ki az ACE bejegyzéseket.
- Ha egy csomagra illeszkedik az ACL valamelyik ACE szabálya, a router végrehajtja a szabályt (permit vagy deny), és azonnal leállítja az ACL további vizsgálatát (az illeszkedő bejegyzés alatti összes többi sort figyelmen kívül hagyja).
Implicit Deny (Implicit Megtagadás)
Az Implicit Deny minden ACL végén automatikusan ott lévő láthatatlan szabály. Az implicit deny eldob (megtagad) minden olyan forgalmat, amely az ACL egyetlen explicit ACE bejegyzésére sem illeszkedett.
ACL Típusok
Két fő ACL típus létezik, és mindkettő két altípussal rendelkezik:
- Standard ACL-ek
- A Standard ACL-ek kizárólag a forrás IP cím (source IP) alapján végeznek illesztést.
- A Standard ACL-ek a (1 - 99) és (1300 - 1999) számtartományokat használhatják.
- A szabály szerint a lehető legközelebb kell őket alkalmazni a célhoz (destination).
- Két altípusuk létezik:
- Standard számozott (numbered) ACL-ek
- Standard nevesített (named) ACL-ek
- Extended (Kiterjesztett) ACL-ek
- Az Extended ACL-ek a forrás/cél IP cím, forrás/cél portszám, protokoll stb. alapján végeznek szűrést.
- Az Extended ACL-ek a (100 - 199) és (2000 - 2699) számtartományokat használhatják.
- A szabály szerint a lehető legközelebb kell őket alkalmazni a forráshoz (source).
- Két altípusuk létezik:
- Extended számozott (numbered) ACL-ek
- Extended nevesített (named) ACL-ek
Számozott ACL-ek
- A különböző típusú számozott ACL-ek eltérő számtartományokat használnak.
- Így a szám alapján egyértelműen beazonosítható, hogy milyen típusú számozott ACL-ről van szó.
Standard ACL Típusok
1. Standard Számozott (Numbered) ACL-ek
A Standard számozott ACL-ek a Standard ACL-ek egyik altípusa, amelyeket számmal azonosítunk.
- (Pl. ACL 1, ACL 2)
2. Standard Nevesített (Named) ACL-ek
A Standard nevesített ACL-ek a Standard ACL-ek másik altípusa, amelyeket névvel azonosítunk.
- (Pl. FIRST_ACL, CCNA_ACL)
Standard ACL Konfiguráció
Kétféle módon hozhatunk létre standard ACL-eket:
- Globális konfigurációban / közvetlenül
- Ez a módszer csak számozott ACL-ek létrehozását teszi lehetővé.
- Parancs formátuma:
access-list STANDARD-ACL-NUMBER { deny | permit } IP WILDCARD-MASK
- Példák:
- access-list 1 deny 1.1.1.1 0.0.0.0
- access-list 1 deny 1.1.1.1
<--(csak a Standard ACL-eknél lehetséges a wildcard elhagyása) - access-list 1 deny host 1.1.1.1
- access-list 1 permit any
- access-list 1 permit 0.0.0.0 255.255.255.255
- ACL konfigurációs módban
- Belépés a paranccsal:
ip access-list standard NAME/NUMBER
- Ez beléptet a Standard ACL konfigurációs módjába. Az ACE bejegyzések az alábbi formátumban adhatók meg:
- [entry-number] { deny | permit } ip wildcard-mask
- Belépés a paranccsal:
Access-list kulcsszavak és paraméterek
A '{ deny | permit }' rész után általában megadjuk az ip címet és a wildcard-mask-ot. Azonban használhatunk kényelmi kulcsszavakat is:
- host
- Ahelyett, hogy egyetlen hoszt címhez (/32) megadnánk a wildcard-mask-ot így:
access-list 1 deny 1.1.1.1 0.0.0.0- Használhatjuk a host kulcsszót, és a router automatikusan átalakítja host címként (/32):
access-list 1 deny host 1.1.1.1
- any
- Ahelyett, hogy az összes forgalom illesztéséhez megadnánk a 0.0.0.0-t a 255.255.255.255 wildcarddal így:
access-list 1 permit 0.0.0.0 255.255.255.255- Használhatjuk az any kulcsszót, ami minden forgalomra illeszkedik:
access-list 1 permit any
Megjegyzések az ACL-ek router általi kezeléséről
- A router átrendezheti (re-order) a /32-es bejegyzéseket a lista elejére.
- Ez növeli az ACL kiértékelésének hatékonyságát.
- Nem változtatja meg az ACL tényleges hatását és logikáját.
- Ez mind a standard nevesített, mind a standard számozott ACL-ekre érvényes.