配置命令:
pap 命令:
[RTA]aaa 主认证方—服务端
[RTA-aaa]local-user huawei password cipher huawei123
[RTA-aaa]local-user huawei service-type ppp
[RTA]interface Serial 1/0/0 连接客户端的接口
[RTA-Serial1/0/0]link-protocol ppp
[RTA-Serial1/0/0]ppp authentication-mode pap
[RTA-Serial1/0/0]ip address 10.1.1.1 30
[RTB]interface Serial 1/0/0 被认证方
[RTB-Serial1/0/0]link-protocol ppp
[RTB-Serial1/0/0]ppp pap local-user huawei password cipher huawei123
[RTB-Serial1/0/0]ip address 10.1.1.2 30
CHAP 密文
主认证方
[RTA]aaa
[RTA-aaa]local-user huawei password cipher huawei123
[RTA-aaa]local-user huawei service-type ppp
[RTA]interface Serial 1/0/0
[RTA-Serial1/0/0]link-protocol ppp
[RTA-Serial1/0/0]ppp authentication-mode chap
被认证方
[RTB]interface Serial 1/0/0
[RTB-Serial1/0/0]link-protocol ppp
[RTB-Serial1/0/0]ppp chap user huawei
[RTB-Serial1/0/0]ppp chap password cipher huawei123
GRE
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 12.1.1.1
[r1-Tunnel0/0/0]destination 23.1.1.2
MGRE
interface Tunnel0/0/0 创建tunnel口
ip address 10.1.1.1 255.255.255.0 配置接口ip地址
tunnel-protocol gre p2mp 先修改接口模式为多点GRE
source 15.1.1.1 再定义公有的源IP地址
nhrp entry multicast dynamic 本地成为NHRP中心,同时可以进行伪广播
nhrp network-id 100 默认为0号,该网段内所有节点tunnel接口必须为相同域
interface Tunnel0/0/0
ip address 10.1.1.2 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/2 假设分支站点ip地址不固定
nhrp network-id 100
nhrp entry 10.1.1.1 15.1.1.1 register 分支需要到中心站点注册