AAA implementationer

För att säkra åtkomst till en router/switch har vi två alternativ:

  • Via en lokal databas
  • Via en TACACS+ eller RADIUS server

Exempel

Studera en stund nätverkstopologin nedan. AAA autentisering konfigureras i tre olika alternativ: lokal databas, TACACS+, och RADIUS server.

Bild 1: AAA implementationer

Konfigurationer:

  • Router R1
  • Router# config term
  • Router(config)# hostname R1
  • R1(config)# interface g0/1
  • R1(config-if)# ip address 192.168.1.1 255.255.255.0
  • R1(config-if)# no shut
  • R1(config)# interface s0/0/0
  • R1(config-if)# ip address 10.1.1.2 255.255.255.252
  • R1(config-if)# clock rate 64000
  • R1(config-if)# no shut
  • R1(config-if)# end
  • Router R2
  • Router# config term
  • Router(config)# hostname R2
  • R2(config)# interface g0/1
  • R2(config-if)# ip address 192.168.2.1 255.255.255.0
  • R2(config-if)# no shut
  • R2(config)# interface s0/0/0
  • R2(config-if)# ip address 10.1.1.1 255.255.255.252
  • R2(config-if)# no shut
  • R2(config)# interface s0/0/1
  • R2(config-if)# ip address 10.2.2.1 255.255.255.252
  • R2(config-if)# clock rate 64000
  • R2(config-if)# no shut
  • R2(config-if)# end
  • Router R3
  • Router# config term
  • Router(config)# hostname R3
  • R3(config)# interface g0/1
  • R3(config-if)# ip address 192.168.3.1 255.255.255.0
  • R3(config-if)# no shut
  • R3(config-if)# exit
  • R3(config)# interface s0/0/1
  • R3(config-if)# ip address 10.2.2.2 255.255.255.252
  • R3(config-if)# no shut
  • R3(config-if)# end
  • Router R1
  • R1# configure terminal
  • R1(config)# router eigrp 1
  • R1(config-router)# no auto-summary
  • R1(config-router)# network 192.168.1.0 0.0.0.255
  • R1(config-router)# network 10.1.1.0 0.0.0.3
  • R1(config-router)# end
  • Router R2
  • R2# configure terminal
  • R2(config)# router eigrp 1
  • R2(config-router)# no auto-summary
  • R2(config-router)# network 192.168.2.0 0.0.0.255
  • R2(config-router)# network 10.1.1.0 0.0.0.3
  • R2(config-router)# network 10.2.2.0 0.0.0.3
  • R2(config-router)# end
  • Router R3
  • R3# configure terminal
  • R3(config)# router eigrp 1
  • R3(config-router)# no auto-summary
  • R3(config-router)# network 192.168.3.0 0.0.0.255
  • R3(config-router)# network 10.2.2.0 0.0.0.3
  • R3(config-router)# end
  • AAA autentisering för konsolåtkomst
  • R1#configure terminal
  • R1(config)# enable secret enpass
  • R1(config)# username admin privilege 15 secret cisco1515
  • R1(config)# username user1 privilege 1 secret cisco111
  • R1(config)# username user9 privilege 9 secret cisco999
  • R1(config)# aaa new-model
  • R1(config)# aaa authentication login default local-case
  • R1(config)# line console 0
  • R1(config-line)# login authentication default
  • R1(config-line)# end
  • Testa konsolåtkomst
  • R1# exit
  • Username: Admin1
  • Password: admin1pass
    R1>
  • AAA autentisering för SSH-åtkomst
  • R1#configure terminal
  • R1(config)# ip domain-name diginto.se
  • R1(config)# crypto key generate rsa
    How many bits in the modulus [512]: 1024
  • R1(config)# aaa authentication login SSH-LOGIN local
  • R1(config)# line vty 0 4
  • R1(config-line)# login authentication SSH-LOGIN
  • R1(config-line)# transport input ssh
  • R1(config-line)# end
  • R1#
  • Verifiera SSH anslutning från PC-A

    PC> ssh -l Admin1 192.168.1.1
    open
    Password: admin1pass

  • AAA autentisering för konsolåtkomst via TACACS+
  • R2#configure terminal
  • R2(config)# username admin privilege 15 secret cisco1515
  • R2(config)# username user1 privilege 1 secret cisco111
  • R2(config)# username user9 privilege 9 secret cisco999
  • R2(config)# tacacs-server host 192.168.2.2 key tacacspass
  • R2(config)# aaa new-model
  • R2(config)# aaa authentication login default group tacacs+ local
  • R2(config)# line console 0
  • R2(config-line)# login authentication default
  • R2(config-line)# end
  • AAA autentisering för SSH-åtkomst
  • R2#configure terminal
  • R2(config)# ip domain-name diginto.se
  • R2(config)# crypto key generate rsa
    How many bits in the modulus [512]: 1024
  • R2(config)# line vty 0 4
  • R2(config-line)# login authentication default
  • R2(config-line)# transport input ssh
  • R2(config-line)# end
  • R1#
  • Verifiera SSH anslutning från PC2
  • PC> ssh -l Admin1 192.168.2.1
    Password: admin2pass
  • Konfigurera TACACS-servern
    Client Name: R2 - Client IP 192.168.2.1
    Secret: tacacspass - ServerType: Tacacs
    Username: Admin2 - Password: admin2pass (fel på bilden)
  • Verifiera konsolåtkomsten
    Username: Admin2
    Password: admin2pass
    R2>
  • AAA autentisering för konsolåtkomst via RADIUS
  • R3# configure terminal
  • R3(config)# username admin previlege 15 secret cisco1515
  • R3(config)# username user1 previlege 1 secret cisco111
  • R3(config)# username user9 previlege 9 secret cisco999
  • R3(config)# radius-server host 192.168.3.2
  • R3(config)# radius-server key radiuspass
  • R3(config)# aaa new-model
  • R3(config)# aaa authentication login default group radius local
  • R3(config)# line console 0
  • R3(config-line)# login authentication default
  • R3(config-line)# exit
  • AAA autentisering för SSH-åtkomst
  • R3#configure terminal
  • R3(config)# ip domain-name diginto.se
  • R3(config)# crypto key generate rsa
    How many bits in the modulus [512]: 1024
  • R3(config)# line vty 0 4
  • R3(config-line)# login authentication default
  • R3(config-line)# transport input ssh
  • R3(config-line)# end
  • R3#
  • Verifiera SSH anslutning från PC-A
    PC3
    ssh -l Admin1 192.168.2.1
    Password: admin3pass
  • Konfigurera RADIUS-servern
    Client Name: R3 - Client IP 192.168.3.1
    Secret: radiuspass- ServerType: radius
    Username: Admin3 - Password: admin3pass (fel på bilden)
  • Verifiera konsolåtkomsten
    Username: Admin3
    Password: admin3pass
    R3>
  • R3#
  • Verifiera att användare exekveringsläge använder AAA RADIUS servern
  • R3# exit
    Username: Admin3
    Password: admin3pass
    R3>