Jeremy’s IT Lab lecture video:

Day 35 - Extended ACLs


Commands


ACL Info

ACL Configuration Methods

There are two ways of configuring ACLs. One is done through the ‘global configuration’ mode and the other is through the ‘ACL configuration’ mode where you write the configuration in sub-commands.

  • Global configuration is done through the command:
    • access-list NUMBER { permit | deny } IP WILDCARD-MASK
  • ACL configuration is done through the command:
    • ip access-list standard NAME/NUMBER

Advantages of Named ACL Config Mode

  • Going into the ACL configuration mode allows you to delete individual entries in the ACL with no ENTRY-NUMBER. (Deleting individual entries in global configuration will lead to the deletion of the whole ACL, even if one entry was specified)
  • You can insert new entries in between other entries by specifying the sequence number.

Resequencing ACLs

ACL has a resequencing function that allows you to edit ACL entries.

  • It is done through the command:
    • ip access-list resequence ACL-ID STARTING-SEQ-NUM INCREMENT

Extended ACLs

Extended ACLs are very similar to Standard 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:
    1. Extended numbered ACLs
    2. Extended named ACLs

Extended ACL Configuration

There are two ways to create a extended ACL:

  1. Global configuration / directly
    • This method only allows you to create numbered ACLs
    • Done through the command:
      • access-list EXTENDED-ACL-NUMBER { permit | deny } PROTOCOL SRC-IP DST-IP
  2. ACL configuration mode
    • Done through the command:
      • ip access-list extended NUMBER/NAME
    • Which puts you in Extended ACL configuration mode. ACEs can be set through the following command format:
      • [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

Standard and Extended ACL - Host addresses

In standard ACLs, you could specify the source IP address, insert the command, and the router would automatically assume that it’s a host route.
However, in extended ACLs, to specify a /32 source or destination you have to use either the host option or specify the wildcard mask. You can’t just write the address without either of those.


Extended ACL Protocols

In extended ACLs you can filter by what protocol is being used in the packet. Some of the important protocols you need to know for the CCNA are these ones:

IP Protocol Numbers

ProtocolNumber
ICMP1
TCP6
UDP17
EIGRP88
OSPF89
Link to original

Extended ACL Protocol Arguments

  • When matching TCP/UDP, you can optionally specify the source AND/OR destination ports to match.
  • This is accomplished through the protocol arguments that can be written after ‘src-ip’ or ‘dst-ip’ while configuring ACLs
ArgumentEffectExample
eq (Equal)Matches ports equal to the specified porteq 80
equal to port 80
gt (Greater than)Matches ports higher than the specified portgt 80
greater than 80 (81 and greater)
lt (Less than)Matches ports lower than the specified portlt 80
less than 80 (79 and less)
neq (Not equal)Matches ports that aren’t the specified portneq 80
not equal to 80
rangeMatches ports that fit into the specified rangerange 80 100
from port 80 to port 100

General note on Extended ACLs

If you specify the protocol, source IP, source port, destination IP, destination port, etc, a packet must match ALL of those values to match the ACL entry. Even if it matches all except one of the parameters, the packet won’t match that entry of the ACL.

Jeremy’s IT Lab előadásvideó:

35. Nap - Extended ACL-ek


Parancsok


ACL Információk

ACL Konfigurációs Módszerek

Kétféleképpen konfigurálhatunk ACL-eket: a 'globális konfigurációs' módban egyetlen sorban, vagy az ACL 'konfigurációs' módban alparancsok segítségével.

  • A globális konfiguráció az alábbi paranccsal történik:
    • access-list NUMBER { permit | deny } IP WILDCARD-MASK
  • Az ACL konfigurációs mód belépése:
    • ip access-list standard NAME/NUMBER

A Nevesített ACL Konfigurációs Mód Előnyei

  • Az ACL konfigurációs mód lehetővé teszi egyedi bejegyzések törlését a no ENTRY-NUMBER paranccsal. (A globális konfigurációs módban egyetlen bejegyzés `no` paranccsal való törlése a teljes ACL törlését eredményezi!)
  • Új szabályokat szúrhatsz be a meglévő bejegyzések közé a sequence number (sorszám) megadásával.

ACL-ek Újraszámozása (Resequencing)

Az ACL rendelkezik egy resequencing funkcióval, amellyel a bejegyzések sorszámai újraoszthatók.

  • Parancs formátuma:
    • ip access-list resequence ACL-ID STARTING-SEQ-NUM INCREMENT

Extended (Kiterjesztett) ACL-ek

Az Extended ACL-ek felépítésükben nagyon hasonlítanak a Standard ACL-ekhez:

  • Az Extended ACL-ek forrás/cél IP cím, forrás/cél portszám, protokoll stb. alapján szűrnek.
  • Az Extended ACL-ek a (100 - 199) és (2000 - 2699) számtartományokat használhatják.
  • A lehető legközelebb kell őket alkalmazni a forráshoz (source).
  • Két altípusuk van:
    1. Extended számozott (numbered) ACL-ek
    2. Extended nevesített (named) ACL-ek

Extended ACL Konfiguráció

Kétféleképpen hozhatunk létre extended ACL-t:

  1. Globális konfigurációban / közvetlenül
    • Ez a módszer csak számozott ACL-ek létrehozását engedi.
    • Parancs formátuma:
      • access-list EXTENDED-ACL-NUMBER { permit | deny } PROTOCOL SRC-IP DST-IP
  2. ACL konfigurációs módban
    • Belépés a paranccsal:
      • ip access-list extended NUMBER/NAME
    • Ez beléptet az Extended ACL konfigurációs módjába. Az ACE szabályok az alábbi formátumokban adhatók meg:
      • [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

Standard és Extended ACL - Host címek

A standard ACL-ekben elég megadni a forrás IP címet wildcard nélkül, és a router automatikusan host útvonalként kezeli.
Az extended ACL-ekben viszont a /32-es forrás vagy cél megadásához kötelező vagy a host opciót használni, vagy explicit kiírni a wildcard mask-ot. Nem lehet pusztán a címet beírni ezen kiegészítők nélkül.


Extended ACL Protokollok

Az extended ACL-ekben a csomagban használt protokoll szerint is szűrhetünk. A CCNA vizsgához szükséges legfontosabb protokollok:

IP Protokoll Számok

ProtokollSzám
ICMP1
TCP6
UDP17
EIGRP88
OSPF89
Eredeti hivatkozása

Extended ACL Protokoll Paraméterek

  • TCP/UDP illesztésekor tetszőlegesen megadhatjuk a szűrni kívánt forrás ÉS/VAGY cél portszámokat is.
  • Ezt a protokoll paraméterek segítségével érhetjük el, amelyeket az ACL konfigurálásakor a 'src-ip' vagy 'dst-ip' után írhatunk be.
ParaméterHatásPélda
eq (Equal)Pontosan a megadott portszámmal egyező portokeq 80
egyenlő a 80-as porttal
gt (Greater than)A megadott portszámnál nagyobb portokgt 80
nagyobb mint 80 (81 és felette)
lt (Less than)A megadott portszámnál kisebb portoklt 80
kisebb mint 80 (79 és alatta)
neq (Not equal)A megadott portszámmal nem egyező portokneq 80
nem egyenlő 80-nal
rangeA megadott tartományba eső portokrange 80 100
80-tól 100-ig tartó portok

Általános megjegyzés az Extended ACL-ekről

Ha megadod a protokoll, forrás IP, forrás port, cél IP, cél port stb. paramétereket, egy csomagnak az ÖSSZES felsorolt értékre kötelező illeszkednie az ACL bejegyzés érvényesüléséhez. Ha egyetlen paraméter sem egyezik, a csomag nem illeszkedik az adott ACE szabályra.