News

Cisco Switch Konfigurationen – medium Level

Kron Jobs erstellen:

  1. kron policy-list erstellen (=Name)
  2. angeben, welche Befehle die kron policy-list ausführen soll (=Was)
  3. kron occurence policy erstellen (=Wann)
    • at hh:mm:ss day_of_month/day/month/ oneshot/recurring
    • in hh:mm:ss oneshot/recurring
  4. angeben, welche policy-list zum eben konfigurieren Zeitplan gehört

(config)#kron policy-list clear_authentications

(config-kron-policy)#cli clear authentication sessions

(config)#

(config)#kron occurrence authentications_refresh at 19:30 recurring

(config-kron-occurence)#policy-list clear_authentications

(config)#show kron schedule

IBNS 2.0

DEUTSCH

IBNS2.0 / C3PL Switch Konfiguration:

Konfiguration:

 

authentication display new-sytle stellt Konfigurationsdarstellung für  Authentifizierung und Policy um! nach write und reload nicht zurücksetzbar.

 

Beispiel mit Erklärung für:

  • 802.1X und Mab gleichzeitig, 802.1X bevorzugt
  • Fallback zu MAB, falls 802.1X fehschlägt
  • Wenn RADIUS server down, eine ACL auf Port anwenden

a) Beispiel für ACL(„critical ACL“), wird angewendet in Template „CRITICAL“ (Step 2), wenn RADIUS Server down

ip access-list extended ACL-ALLOW

permit ip any any

b) Beispiel für service template  = Lokales Template, welches in der NOT von RADIUS Server down angewendet wird.

service-template CRITICAL

access-group ACL-ALLOW

vlan 999

c) Class-map erstellen, falls RADIUS Server down:

class-map type control subscriber match-any AAA-DOWN

match result-type aaa-timeout

d) Class-map erstellen, wenn 802.1X fehlschlägt

class-map type control subscriber match-all DOT1X-FAILED

match method dot1x

match result-type method dot1x authoritative

e) Class-map erstellen, wenn MAB fehlschlägt

class-map type control subscriber match-all MAB_FAILED

match method mab

match result-type method mab authorative

f) Control Policy erstellen( Event –> Class –> Action)

 

policy-map type control subscriber DOT1X-DEFAULT _______________________________________________________________ erstellt die Control Policy, welche definiert, welche Aktionen aufgrund von eingetroffenen Events und Bedingungen ausgelöst werden.

Eine große Anzahl an Aktionen, Bedingungen und Events können kombiniert werden

event session-started match-all wenn eine Session startet(=Event), werden alle(match-all) dazugehörigen Bedingungen durchgegangen. Hinweis: es gibt für Events nur die Optionen „match-all“ und „match-first“ für die dazugehörigen classes (=Bedingungen), d.h. bei match-first wird nur die erste class(Bedingung), die matched ausgeführt
10 class always do-until-failure matched allem, wenn eine Session startet – alle darauffolgenden untergeordneten Aktionen werden durchgeführt
10 authenticate using dot1x priority 10 Aktion ist mit DOT1X zu authentifizieren, Priorität von 10 (Hinweis: die Zahl vorne hat mit der Priorität nichts zu tun, ist nur die Reihenfolge, wie bei  ACLs)
20 authenticate using mab priority 20 Aktion ist mit MAB zu authentifizieren, Priorität von 20. Falls MAB und DOT1X erfolgreich, dann  „gewinnt“ DOT1X wegen der niedrigeren Prioritätszahl
event violation match-all Ein neuer Event, falls eine Control-Violation auftritt
10 class always do-all alle untergeordneten Aktionen werden ausgeführt
10 restrict verwirft violating packets und erzeugt einen syslog (alternativ  „err-disable“,  „protect“(=restrict ohne syslog),  „replace“(löscht die aktuelle Session und erzeugt eine  neue Session)
event agent-found match-all Event, falls dot1x-Supplicant  auf Anwendersystem vorhanden wird, d.h. falls ein EAPoL Frame auf den Switch trifft! Das Event ist praktisch, wenn DOT1X ausläuft und später der Host eine EAP Session initiiert.
10 class always do-until-failure alle untergeordneten Aktionen werden ausgeführt
10 terminate mab beendet Versuch, MAB zu verwenden
20 authenticate using dot1x Aktion ist mit DOT1X zu authentifizieren, optional  noch anhängen:  retries 2 retry-time 0 priority 10
event authentication-failure match-first Event ist Authentifizierungsfehler. Match-first beendet den Event, sobald ein Match gefunden wurde.
10 class AAA-DOWN do-all class-map von Step 3 wird geprüft. Fall wenn RADIUS Server nicht verfügbar.
10 authorize den Zugriff autorisieren
20 activate service-template CRITICAL das  lokale service-template aus Step 2 wird angewendet
30 terminate dot1x beendet Versuch, dot1x zu verwenden
40 terminate mab beendet Versuch, MAB zu verwenden
20 class DOT1X-FAILED do all class-map aus Step 4 wird geprüft
10 terminate dot1x
20 authenticate using mab Fallback zu MAB
30 class MAB_FAILED do-until-failure class-map aus Step 5 wird geprüft
10 terminate mab
20 authentication-restart 60 Timer für Reauthentifizierung auf 60 Sekunden
40 class always do-until-failure Falls 802.1X und MAB fehlgeschlagen
10 terminate dot1x
20 terminate mab
30 authentication-restart 60

g) Control Policy wird auf Interface gebunden:

interface range gigabitEthernet X/Y/A-Z

switchport host (=portfast + bpduguard)

switchport access vlan 999

access-session control-direction in

snmp trap mac-notification change added

snmp trap mac-notification change removed

service-policy type control subscriber DOT1X-DEFAULT

authentication periodic

authentication timer reauthenticate server

mab

access-session host-mode multi-auth

dot1x timeout tx-period 10

access-session port-control auto

(no access-session closed) (default is open)

h) Verifizierung –> show command:

show authentication session interface x/x/x detail      –> show access-session interface x/x/x details

i) weitere Ideen:

  • Wenn RADIUS Server down, aber Client noch authentifiziert, dann keine Reauthentifizierung und Port authentifiziert lassen!

class-map type control subscriber match-all RADIUS_DOWN_HOST_AUTH

match result-type aaa-timeout

match authorization-status authorized

 

event athentication-failure match-first

10 class RADIUS_DOWN_HOST_AUTH do-until-failure

10 pause reauthentication

  • Wenn RADIUS Server down und Client unauthentifiziert, die lokale „NOT-ACL“ anwenden und verlängerter Reauthentication-Timer

class-map type control subscriber match-all RADIUS_DOWN_HOST_UNAUTH

match result-type aaa-timeout

match authorization-status unauthorized

 

event athentication-failure match-first

10 class RADIUS_DOWN_HOST_UNAUTH do-until-failure

10 activate service-template CRITICAL

20 authorize

30 authentication-restart 14400

  • Wenn RADIUS Server wieder erreichbar, nachdem er weg war!

class-map type control subscriber match-any CRITICAL_APPLIED

match activated-service-template CRITICAL

 

class-map type control subscriber match-none CRITICAL_NOT_APPLIED

match activated-service-template CRITICAL

 

event aaa-available match-all

10 class CRITICAL_APPLIED do-until-failure

10 clear-session

20 class CRITICAL_NOT_APPLIED do-until-failure

10 resume reauthentication