Skip to content

OSPF SHA Authentication

Le MD5 est considéré comme vulnérable aux attaques et ne devrait être utilisé que lorsqu'une authentification plus forte n'est pas disponible. A partir de la version 15.4(1)T Cisco IOS l'authentification OSPF SHA est prise en charge.

Etape 1: Spécifiez une key chain (porte-clés)

  • Configurez un nom de porte-clés
  • Attribuez au porte-clés un numéro et un mot de passe
  • Spécifiez l'authentification SHA
  • Précisez la date d'expiration de cette clé (Facultatif)
R1(config)# key chain <name>
R1(config-keychain)# key <key-id>
R1(config-keychain-key)# key-string <string>
R1(config-keychain-key)# cryptographic-algorithm hmac-sha-256
R1(config-keychain-key)# exit
R1(config-keychain)# exit
R1(config)# send-lifetime start-time {infinite | end-time | duration <seconde>}

Étape 2: Affectez la clé d'authentification aux interfaces

R1(config)# interface <type> <number>
R1(config-if)# ip ospf authentication key-chain <name>

Exemple

R1(config)# key chain SHA256
R1(config-keychain)# key 1
R1(config-keychain-key)# key-string ospfSHA256
R1(config-keychain-key)# cryptographic-algorithm hmac-sha-256
R1(config-keychain-key)# exit
R1(config-keychain)# exit
R1(config)#
R1(config)# interface gi0/1
R1(config-if)# ip ospf authentication key-chain SHA256