实验要求及拓扑
IP分配等见上图
PAP认证
r5]aaa
[r5-aaa]local-user r1 password cipher 123
[r5-aaa]local-user r1 service-type ppp
[r5-aaa]int s3/0/0
[r5-Serial3/0/0]link-protocol ppp
[r5-Serial3/0/0]ppp authentication-mode pap
[r5-Serial3/0/0]ip ad 51.1.1.2 24
[r1]int s4/0/0
[r1-Serial4/0/0]link-protocol ppp
[r1-Serial4/0/0]ppp pap local-user r1 password c 123
[r1-Serial4/0/0]ip ad 51.1.1.1 24
CHAP认证
[r5]aaa
[r5-aaa]local-user r2 password cipher 123
[r5-aaa]local-user r2 service-type ppp
[r5-Serial3/0/1]link-protocol ppp
[r5-Serial3/0/1]ppp authentication-mode chap
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp chap user r2
[r2-Serial4/0/0]ppp c p c 123
HDLC封装
[r5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
点到点GRE
[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 11.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]destination 45.1.1.1
[R4]int Tunnel 0/0/1
[R4-Tunnel0/0/1]ip add 11.1.1.2 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 45.1.1.1
[R4-Tunnel0/0/1]destination 15.1.1.1
MGRE(多点GRE)
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip add 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source s4/0/0
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s4/0/0
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
acl,缺省漏油(r1-r5)
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]q
[R1]int s4/0/0
[R1-Serial4/0/0]nat outbound 2000
rip
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]undo summary
[R1-rip-1]net 192.168.1.0
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]undo summary
[R1-rip-1]net 192.168.1.0
[R1-rip-1]net 10.0.0.0
[R1-rip-1]net 11.0.0.0
[R1]int t0/0/0
[R1-Tunnel0/0/0]undo rip split-horizon 关闭rip的水平分割
serial模块
测试