R2(config)#ip local pool l2tp 172.16.0.1 172.16.0.254 //配置L2TP的地址池 % Invalid address range! R2(config)#username Test@123 password Test@123 //配置L2TP使用的服务端本地用户
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R2(config)#interface virtual-template 1 R2(config-if-Virtual-Template 1)#ppp authentication ? chap Challenge Handshake Authentication Protocol (CHAP) ms-chap Microsoft Challenge Handshake Authentication Protocol (MS-CHAP) ms-chap-v2 Microsoft CHAP Version 2 (MS-CHAP-V2) pap Password Authentication Protocol (PAP) R2(config-if-Virtual-Template 1)#ppp authentication pap chap //pap密码认证,chap握手认证; //这里我们优先使用密码认证,也支持握手认证
R2(config-if-Virtual-Template 1)#ip unnumbered loopback 1 //virtual-template接口绑定loopback 1的IP R2(config-if-Virtual-Template 1)#peer default ip address pool l2tp //L2TP邻居的地址池 R2(config-if-Virtual-Template 1)#end