PPP CHAP Hostname Command on CISCO Router/Switch

Command

PPP CHAP Hostname

Use

This command is used to send a hostname to a remote CHAP server for authentication.

Syntax

Router(config-if)#ppp chap hostname <hostname>

Example

In this example R1’s S1/1 interface is configured to authenticate R3 using CHAP.

R1(config)#int s1/1
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#
*Mar 2 01:42:38.237: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
R1(config-if)#exit
R1(config)#username R3 password cisco

Here R3 sends its hostname and password to be authenticated by R1

R3(config-if)#int s1/1
R3(config-if)#encapsulation ppp
R3(config-if)#ppp chap hostname R3
R3(config-if)#ppp chap password cisco
R3(config-if)#
*Mar 2 01:43:43.697: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up

Below is the debug output for the CHAP authentication.

R3(config-if)#do debug ppp authe
PPP authentication debugging is on
R3(config-if)#
*Mar 2 02:32:21.521: %LINK-5-CHANGED: Interface Serial1/1, changed state to administratively down
*Mar 2 02:32:22.593: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
R3(config-if)#no shut
R3(config-if)#
*Mar 2 02:32:30.001: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
R3(config-if)#
*Mar 2 02:32:30.009: Se1/1 PPP: Using default call direction
*Mar 2 02:32:30.013: Se1/1 PPP: Treating connection as a dedicated line
*Mar 2 02:32:30.013: Se1/1 PPP: Session handle[FF00001B] Session id[28]
*Mar 2 02:32:30.017: Se1/1 PPP: Authorization required
*Mar 2 02:32:30.101: Se1/1 PPP: No authorization without authentication
*Mar 2 02:32:30.125: Se1/1 CHAP: I CHALLENGE id 27 len 23 from “R1”
*Mar 2 02:32:30.141: Se1/1 CHAP: Using hostname from interface CHAP
*Mar 2 02:32:30.141: Se1/1 CHAP: Using password from interface CHAP
*Mar 2 02:32:30.145: Se1/1 CHAP: O RESPONSE id 27 len 23 from “R3”
*Mar 2 02:32:30.161: Se1/1 CHAP: I SUCCESS id 27 len 4
R3(config-if)#

Related Articles

Leave a Reply

avatar