We continue from the tutorial part 1 on RIP. This tutorial will show you how to enable authetication for RIPv2.
In this scenario, we enable the simple authentication using plaintext password between R1 and R2 and Md5 authentication between R2 and R3.
Pls follow on the configuration and verification commands below.
Two options:
1. Plain text
2. MD5 Hash.
Step 1. Create a key chain, from global config mode using the “key chain” command. Give it a name (local significant)
Step 2. Create a key number, and put the password using the “key-string command” the string is your password so this should match on both routers.
Step 3. Apply the authentication on the interface facing the remote router. To apply use the “ip rip authentication” command. Use mode MD5 for Md5 authentication and “mode text” for plain text (default).
Note: Cisco documentation says Key number should match but it was found out not true. see for your self.
Verification:
Step 4. Debug ip rip, this should tell you “RIP: ignored v2 packet from .. invalid authentication” means remote side has not yet been configured for authentication or the password is not correct. So make sure password is the same on the both ends of the router. You can also see “RIP: received packet with MD5 authentication” if your MD5 auth is good. Plain text password can be seen on the debug ip rip output so a text password is never a secure option.
Step 5. Show key chain. This will show you the configured key available.
For more documentation of key chains for other IGP’s visit Cisco Doc CD.
HTH. Now back to the labs.
————————-R1————————— R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#key chain ? WORD Key-chain name R1(config)#key chain R1-R2-Key R1(config-keychain)#key ? <0-2147483647> Key identifier R1(config-keychain)#key 0 ? <cr> R1(config-keychain)#key 0 R1(config-keychain-key)#? Key-chain key configuration commands: accept-lifetime Set accept lifetime of key default Set a command to its defaults exit Exit from key-chain key configuration mode key-string Set key string no Negate a command or set its defaults send-lifetime Set send lifetime of key R1(config-keychain-key)#key-string ? 0 Specifies an UNENCRYPTED password will follow 7 Specifies a HIDDEN password will follow LINE The UNENCRYPTED (cleartext) user password R1(config-keychain-key)#key-string cisco123 R1(config-keychain-key)#int serial0/0 R1(config-if)#ip rip authentication ? key-chain Authentication key-chain mode Authentication mode R1(config-if)#ip rip authentication key-chain R1-R2-Key R1(config-if)#end R1#deb *Mar 1 07:34:49.366: %SYS-5-CONFIG_I: Configured from console by console R1#debug ip rip RIP protocol debugging is on R1# *Mar 1 07:35:12.070: RIP: sending v2 update to 192.168.1.2 via Serial0/0 (192.168.1.1) *Mar 1 07:35:12.074: RIP: build update entries *Mar 1 07:35:12.074: 172.16.10.0/24 via 0.0.0.0, metric 1, tag 0 *Mar 1 07:35:12.078: 172.16.40.0/24 via 0.0.0.0, metric 1, tag 0 R1# *Mar 1 07:35:19.638: RIP: ignored v2 packet from 192.168.1.2 (invalid authentication) R1# ———————–R2—————————- ! key chain R2-Key-Name key 200 key-string cisco123 ! R2#show key chain Key-chain R2-Key-Name: key 200 — text “cisco123″ accept lifetime (always valid) – (always valid) [valid now] send lifetime (always valid) – (always valid) [valid now] R2#s Interface IP-Address OK? Method Status Protocol Serial0/0 192.168.1.2 YES manual up up Serial0/1 10.10.10.2 YES NVRAM up up Serial0/2 202.78.98.2 YES NVRAM up up Serial0/3 unassigned YES NVRAM administratively down down R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#int s0/1 R2(config-if)#ip rip authentication ? key-chain Authentication key-chain mode Authentication mode R2(config-if)#ip rip authentication mode ? md5 Keyed message digest text Clear text authentication R2(config-if)#ip rip authentication mode md5 ? <cr> R2(config-if)#ip rip authentication mode md5 R2(config-if)#ip rip authentication key-chain R2-Key-Name R2(config-if)# ! interface Serial0/0 ip address 192.168.1.2 255.255.255.0 ip rip authentication key-chain R2-Key-Name serial restart-delay 0 ! interface Serial0/1 ip address 10.10.10.2 255.255.255.0 ip rip authentication mode md5 ip rip authentication key-chain R2-Key-Name serial restart-delay 0 ! ———————-R3——————- R3#sh key chain Key-chain R3-key: key 333 — text “cisco123″ accept lifetime (always valid) – (always valid) [valid now] send lifetime (always valid) – (always valid) [valid now] R3#sh run int s0/0 Building configuration… Current configuration : 160 bytes ! interface Serial0/0 ip address 10.10.10.3 255.255.255.0 ip rip authentication mode md5 ip rip authentication key-chain R3-key serial restart-delay 0 end R3#

