一.配置ip和缺省路由
省略
二.配置pap和chap
认证方pap
[isp]aaa
[isp-aaa]local-user xcnb@hauwei password cipher 123456
[isp-aaa]local-user xcnb@huawei service-type ppp [isp]int s3/0/0
[isp-Serial3/0/0]ppp authentication-mode pap [isp-Serial3/0/0]
被认证方
[r1-Serial4/0/0]ppp pap local-user xcnb@huawei password cipher 123456
chap认证方
[isp-aaa]local-user admin password cipher 123456
[isp-aaa]local-useradmin service-type ppp
[isp]int s4/0/0
[isp-Serial4/0/0]ppp authentication-mode chap
被认证方
[r2-Serial3/0/1]ppp chap user admin [isp-Serial3/0/1]ppp chap
password cipher 123456
hdlc
[r3-Serial4/0/0]link-protocol hdlc
[isp-Serial4/0/0]link-protocol hdlc
三.构建mgre环境,点到点的gre
hub(r1)
[r1-Tunnel0/0/0]ip address 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source15.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
r2
[r2-Tunnel0/0/0]ip address 192.168.5.3 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 entry192.168.5.1 15.0.0.1 register
r3
[r3-Tunnel0/0/0]ip address 192.168.5.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1register
r1
r1]interface t0/0/1
[r1-Tunnel0/0/1]ip address 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-Tunnel0/0/1]description 45.0.0.1
[r4]int t0/0/1
[r4-Tunnel0/0/1]ip address 192.168.6.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 45.0.0.1
[r4-Tunnel0/0/1]description 15.0.0.1
四.rip协议全网可达
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
(r2,r3,r4同理)
关闭水平分割
[r1-Tunnel0/0/0]undo rip split-horizon
配置nat
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-Serial4/0/0]nat outbound 2000