Você está na página 1de 13

1 Objetivo

Este documento tem como objetivo demonstrar os testes e evidências coletadas em laboratório
com a utilização de EEM e Service Template para switches Cisco quando utilizar 802.1x com
Cisco ISE como servidor Radius.

2 Testes com EEM


Foi feita configuração de EEM baseada na configuração da DEFAULT-ACL e quando os
servidores radius fiquem off-line a configuração é feita em parâmetros de logs para a alteração
seja feita.

Server ISE1 e ISE2 - Off-line

Abaixo temos o teste de perda de comunicação com os servidores ISE1 e ISE2 e mesmo com
a perda, não há re-autenticação do usuário conectado, mantendo assim a interface em estado
inalterado (Autorizada e com a dACL que foi baixada do ISE).
Após os servidores ficarem totalmente off-line, de acordo com os parametros configurados é
feito um script para que seja adcionada uma linha de configuração da DEFAULT-ACL (1 permit
ip any any).
Com essa configuração, apenas as novas conexões não serão autenticadas no ISE (devido
estar off-line) e terão acesso a rede e internet devido a alteração na ACL, assim evitando que a
rede fique inoperante em caso de falha dos servidores de autenticação.

Abaixo está a configuração feita pelo script EEM após os servidores ficarem off-line.

Server ISE1 e ISE2 - On-line

Abaixo temos a coleta de evidencias após os servidores ISE1 e ISE2 ficarem on-line
novamente.
Quando o EEM der match nos parametros configurados para quando os servidores ficarem UP
novamente, é retirada configuração da ACL-DEFAULT, conforme podemos ver abaixo

Após os servidores ficarem on-line novamente a configuração (no 1 permit ip any any) na ACL-
DEFAULT ser aplicada, as novas aunteticações e autorizações ocorrem com sucesso, fazendo
o download da dACL do ISE, conforme evidencia abaixo.
3 Testes com Service Template
Para switches mais novos, é feita uma configuração utilizando o método de Service Template,
caso os servidores Radius fiquem off-line.

Autenticação com Service Template

Abaixo podemos ver que há autenticação e autorização com sucesso utilizando a opção de
service template.
Servidores ISE1 e ISE2 on-line.

Autenticação e autorização de usuário/interface:


Quando os servidores ISE1 e ISE2 ficarem off-line, não haverá reautenticação dos usuários já
autenticados, conforme abaixo:

Enquanto os servidores estiverem off-line, as novas autenticações identificadas no switch irão


utilizar as políticas configuradas de Service Template, onde é autorizada a voice vlan e a vlan
de dados com uma ACL NAC_PERMIT, onde essa ACL tem um permit ip any any e assim
liberando o tráfego na rede e internet para novas autenticações.
Quando os servidores ISE1 e ISE2 ficam on-line novamente, as configurações das interfaes
mudam automaticamente ao seu estado anterior, apenas com as autenticações e autorizações
sem a utilização do Service Template.
4 Configurações
EEM

Abaixo temos as configurações finais para o EEM;

version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 3750X
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$/Mot$m8slFpLcYZAEr7bL.YZSr0
!
username admin secret 5 $1$qF7d$U6WFmTHp4P92BNNAB0AzY.
!
!
!
aaa new-model
!
!
aaa group server radius ise-group
server 10.10.100.175 auth-port 1645 acct-port 1646
server 10.10.100.176 auth-port 1645 acct-port 1646
!
aaa authentication dot1x default group ise-group
aaa authorization network default group ise-group
aaa accounting dot1x default start-stop group ise-group
!
!
aaa server radius dynamic-author
client 10.10.100.175 server-key Cisco123
client 10.10.100.176 server-key Cisco123
!
aaa session-id common
clock timezone EET 2
switch 2 provision ws-c3750x-48p
system mtu routing 1500
authentication critical recovery delay 1000
!
!
ip name-server 10.10.210.20
ip device tracking
!
epm logging
epm access-control open
!
license boot level ipservices
dot1x system-auth-control
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
interface FastEthernet0
no ip address
shutdown
!
interface GigabitEthernet2/0/1
switchport access vlan 111
switchport mode access
ip device tracking maximum 2
ip access-group DEFAULT-ACL in
authentication event fail action next-method
authentication event server dead action authorize vlan 111
authentication event server dead action authorize voice
authentication event server alive action reinitialize
authentication host-mode multi-auth
authentication open
authentication order dot1x mab
authentication priority dot1x mab
authentication port-control auto
authentication periodic
authentication violation restrict
mab
snmp trap mac-notification change added
snmp trap mac-notification change removed
dot1x pae authenticator
dot1x timeout tx-period 10
spanning-tree portfast
spanning-tree bpduguard enable
!
interface GigabitEthernet2/0/48
switchport trunk encapsulation dot1q
switchport mode trunk
!
!
interface Vlan1
no ip address
shutdown
!
interface Vlan100
ip address x.x.x.x 255.255.255.0
!
ip default-gateway x.x.x.x
ip classless
!
ip http server
ip http secure-server
!
ip access-list extended DEFAULT-ACL
permit udp any eq bootpc any eq bootps
permit udp any any eq domain
permit icmp any any
permit udp any any eq tftp
permit tcp any host 10.10.100.175 eq www
permit tcp any host 10.10.100.175 eq 443
permit tcp any host 10.10.100.175 eq 8443
permit tcp any host 10.10.100.175 eq 8905
permit udp any host 10.10.100.175 eq 8905
permit udp any host 10.10.100.175 eq 8906
permit tcp any host 10.10.100.175 eq 8080
permit udp any host 10.10.100.175 eq 9996
permit tcp any host 10.10.100.176 eq www
permit tcp any host 10.10.100.176 eq 443
permit tcp any host 10.10.100.176 eq 8443
permit tcp any host 10.10.100.176 eq 8905
permit udp any host 10.10.100.176 eq 8905
permit udp any host 10.10.100.176 eq 8906
permit tcp any host 10.10.100.176 eq 8080
permit udp any host 10.10.100.176 eq 9996
deny ip any any log
!
ip radius source-interface Vlan100
!
radius-server attribute 6 on-for-login-auth
radius-server attribute 8 include-in-access-req
radius-server attribute 25 access-request include
radius-server dead-criteria time 15 tries 3
radius-server host 10.10.100.175 auth-port 1645 acct-port 1646 test username ise ignore-
acct-port idle-time 1 key Cisco123
radius-server host 10.10.100.176 auth-port 1645 acct-port 1646 test username ise ignore-
acct-port idle-time 1 key Cisco123
radius-server deadtime 1
radius-server vsa send accounting
radius-server vsa send authentication
!
!
line con 0
exec-timeout 0 0
logging synchronous
line vty 0 4
exec-timeout 0 0
line vty 5 15
!
event manager applet default-acl-fallback
event syslog pattern "%RADIUS-3-ALLDEADSERVER" maxrun 5
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 2.0 cli command "ip access-list extended ACL-DEFAULT"
action 3.0 cli command "1 permit ip any any"
action 4.0 cli command "end"
event manager applet default-acl-recovery
event syslog pattern "%RADIUS-4-RADIUS_ALIVE" maxrun 5
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 2.0 cli command "ip access-list extended ACL-DEFAULT"
action 3.0 cli command "no 1 permit ip any any"
action 4.0 cli command "end"
!

Service Template
Abaixo as configurações finais para Service Template.

version 15.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 2960X
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$h.T.$sE8KNKFxLjCNY9rJfSE9N1
!
username admin secret 5 $1$L.WK$6ed.ieEJuS8AD4lhSDMn8.
aaa new-model
!
!
aaa group server radius ise-group
server name psn-cluster1
server name psn-cluster2
!
aaa authentication dot1x default group ise-group
aaa authorization network default group ise-group
aaa authorization auth-proxy default group ise-group
aaa accounting system default start-stop group ise-group
!
!
!
!
!
aaa server radius dynamic-author
client 10.10.100.175 server-key Cisco123
client 10.10.100.176 server-key Cisco123
!
aaa session-id common
switch 1 provision ws-c2960x-24ps-l
!
!
!
!
!
!
!
access-session mac-move deny
!
!
!
dot1x system-auth-control
service-template webauth-global-inactive
inactivity-timer 3600
service-template DEFAULT_LINKSEC_POLICY_MUST_SECURE
service-template DEFAULT_LINKSEC_POLICY_SHOULD_SECURE
service-template DEFAULT_CRITICAL_VOICE_TEMPLATE
voice vlan
service-template CRITICAL_VOICE_VLAN
voice vlan
service-template CRITICAL_ACL
access-group NA_PERMIT
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
vlan internal allocation policy ascending
!
class-map type control subscriber match-all AAA_SVR_DOWN_AUTHD_HOST
match result-type aaa-timeout
match authorization-status authorized
!
class-map type control subscriber match-all AAA_SVR_DOWN_UNAUTHD_HOST
match result-type aaa-timeout
match authorization-status unauthorized
!
class-map type control subscriber match-all DOT1X_FAILED
match method dot1x
match result-type method dot1x authoritative
!
class-map type control subscriber match-all DOT1X_NO_RESP
match method dot1x
match result-type method dot1x agent-not-found
!
class-map type control subscriber match-any IN_CRITICAL_AUTH
match activated-service-template CRITICAL_ACL
match activated-service-template CRITICAL_VOICE_VLAN
!
class-map type control subscriber match-all MAB
match method mab
!
class-map type control subscriber match-all MAB_FAILED
match method mab
match result-type method mab authoritative
!
class-map type control subscriber match-none NOT_IN_CRITICAL_AUTH
match activated-service-template CRITICAL_VOICE_VLAN
match activated-service-template CRITICAL_ACL
!
!
!
policy-map type control subscriber IDENTITY-POLICY
event session-started match-all
10 class always do-until-failure
10 authenticate using dot1x retries 2 retry-time 0 priority 10
event authentication-failure match-first
10 class AAA_SVR_DOWN_UNAUTHD_HOST do-until-failure
10 activate service-template CRITICAL_VOICE_VLAN
20 activate service-template CRITICAL_ACL
30 authorize
40 pause reauthentication
20 class DOT1X_FAILED do-until-failure
10 terminate dot1x
20 authenticate using mab priority 10
30 class DOT1X_NO_RESP do-until-failure
10 terminate dot1x
20 authenticate using mab priority 10
40 class MAB_FAILED do-until-failure
10 terminate mab
20 authorize
30 authentication-restart 60
50 class always do-until-failure
10 terminate dot1x
20 terminate mab
30 authentication-restart 60
event agent-found match-all
10 class always do-until-failure
20 terminate mab
30 authenticate using dot1x priority 10
event aaa-available match-all
10 class IN_CRITICAL_AUTH do-until-failure
20 clear-session
20 class NOT_IN_CRITICAL_AUTH do-until-failure
10 resume reauthentication
event authentication-success match-all
10 class always do-until-failure
20 activate service-template DEFAULT_LINKSEC_POLICY_SHOULD_SECURE
event violation match-all
10 class always do-until-failure
10 restrict
!
!
interface GigabitEthernet1/0/13
switchport access vlan 111
switchport mode access
switchport voice vlan 40
ip access-group DEFAULT-ACL in
authentication periodic
authentication timer reauthenticate server
access-session port-control auto
mab
dot1x pae authenticator
dot1x timeout tx-period 10
spanning-tree portfast
service-policy type control subscriber IDENTITY-POLICY
!
interface GigabitEthernet1/0/24
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
interface Vlan100
ip address x.x.x.x 255.255.255.0
!
ip default-gateway x.x.x.x
ip http server
ip http secure-server
!
!
ip access-list extended ACL-DEFAULT
permit udp any eq bootpc any eq bootps
permit udp any any eq domain
permit icmp any any
permit udp any any eq tftp
permit tcp any host 10.10.100.175 eq www
permit tcp any host 10.10.100.175 eq 443
permit tcp any host 10.10.100.175 eq 8443
permit tcp any host 10.10.100.175 eq 8905
permit udp any host 10.10.100.175 eq 8905
permit udp any host 10.10.100.175 eq 8906
permit tcp any host 10.10.100.175 eq 8080
permit udp any host 10.10.100.175 eq 9996
permit tcp any host 10.10.100.176 eq www
permit tcp any host 10.10.100.176 eq 443
permit tcp any host 10.10.100.176 eq 8443
permit tcp any host 10.10.100.176 eq 8905
permit udp any host 10.10.100.176 eq 8905
permit udp any host 10.10.100.176 eq 8906
permit tcp any host 10.10.100.176 eq 8080
permit udp any host 10.10.100.176 eq 9996
deny ip any any log
ip access-list extended NAC_PERMIT
permit ip any any
!
!
radius-server attribute 6 on-for-login-auth
radius-server attribute 8 include-in-access-req
radius-server attribute 25 access-request include
radius-server attribute 31 mac format ietf upper-case
radius-server attribute 31 send nas-port-detail mac-only
radius-server dead-criteria time 5 tries 3
radius-server deadtime 1
radius-server accounting system host-config
!
radius server psn-cluster1
address ipv4 10.10.100.175 auth-port 1812 acct-port 1813
timeout 5
retransmit 3
automate-tester username ise idle-time 1
key Cisco123
!
radius server psn-cluster2
address ipv4 10.10.100.176 auth-port 1812 acct-port 1813
timeout 5
retransmit 3
automate-tester username ise idle-time 1
key Cisco123
!
!
!
line con 0
line vty 0 4
exec-timeout 0 0
line vty 5 15

Você também pode gostar