Thursday, April 29, 2010

Cisco PPP with authentication

Cisco use HDLC encapsulation by default for point-to-point serial links. This is to setup PPP encapsulation with authentication, but note that there is no encryption on this link.

Encapsulation must be the same on both routers. Note how the hostname of the reverse router was used as the username. Passwords must be the same on both routers. PAP or CHAP authentication can be enabled.

Router 01 setup:
Router(config)#hostname Router01
Router01(config)#username Router02 password mypassword
Router01(config)#int s1/0
Router01(config-if)#ip address 192.168.1.1 255.255.255.0
Router01(config-if)#encapsulation ppp
Router01(config-if)#ppp authentication chap
Router01(config-if)#no shut
Router 02 setup:
Router(config)#hostname Router02
Router02(config)#username Router01 password mypassword
Router02(config)#int s1/0
Router02(config-if)#ip address 192.168.1.2 255.255.255.0
Router02(config-if)#encapsulation ppp
Router02(config-if)#ppp authentication chap
Router02(config-if)#no shut
Verify:
Router01#sh int s1/0
Router02#sh int s1/0