一、配置IP地址
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[AR1-GigabitEthernet0/0/0]int se4/0/0
[AR1-Serial4/0/0]ip add 15.1.1.1 24
[AR1-Serial4/0/0]
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[AR2-GigabitEthernet0/0/0]int se4/0/0
[AR2-Serial4/0/0]ip add 25.1.1.2 24
[AR2-Serial4/0/0]
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.3.254 24
[AR3-GigabitEthernet0/0/0]int se4/0/0
[AR3-Serial4/0/0]ip add 35.1.1.3 24
[AR3-Serial4/0/0]
[AR4]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip add 192.168.4.254 24
[AR4-GigabitEthernet0/0/1]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 45.1.1.4 24
[AR4-GigabitEthernet0/0/0]
[AR5]int se3/0/1
[AR5-Serial3/0/1]ip add 25.1.1.5 24
[AR5-Serial3/0/1]
[AR5-Serial3/0/1]int se4/0/0
[AR5-Serial4/0/0]ip add 35.1.1.5 24
[AR5-Serial4/0/0]
[AR5-Serial4/0/0]int se4/0/1
[AR5-Serial4/0/1]ip add 15.1.1.5 24
[AR5-Serial4/0/1]
[AR5-Serial4/0/1]int g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 45.1.1.5 24
[AR5-GigabitEthernet0/0/0]int loo0
[AR5-LoopBack0]ip add 5.5.5.5 24
[AR5-LoopBack0]
二、配置缺省路由使公网可通
[AR1]ip rou 0.0.0.0 0 15.1.1.5
[AR2]ip rou 0.0.0.0 0 25.1.1.5
[AR3]ip rou 0.0.0.0 0 35.1.1.5
[AR4]ip rou 0.0.0.0 0 45.1.1.5
三、R1与R5间使用PPP的PAP认证,R5为主认证方
[AR5-aaa]local-user wangdaye pa ci wdy12345
Info: Add a new user.
[AR5-aaa]lo wangdaye ser ppp
[AR5-aaa]q
[AR5]int s4/0/1
[AR5-Serial4/0/1]ppp au pap
[AR5-Serial4/0/1]
[AR1]int s4/0/0
[AR1-Serial4/0/0]ppp pap lo wangdaye pass ci wdy1234
四、R2与R5间使用PPP的CHAP认证,R5为主认证方
[AR5-Serial4/0/1]aaa
[AR5-aaa]lo lidaye pa ci ldy12345
Info: Add a new user.
[AR5-aaa]lo lidaye ser ppp
[AR5-aaa]int se3/0/1
[AR5-Serial3/0/1]ppp au chap
[AR5-Serial3/0/1]
[AR2]int se4/0/0
[AR2-Serial4/0/0]ppp chap user lidaye
[AR2-Serial4/0/0]ppp chap pass cip ldy12345
[AR2-Serial4/0/0]
五、R3与R5之间使用HDLC封装
[AR3]int se4/0/0
[AR3-Serial4/0/0]link-protocol hdlc
[AR5]int se4/0/0
[AR5-Serial4/0/0]link-protocol hdlc
六、R1、R2、R3构建一个MGRE环境,R1为中心站点
[AR1]int tunn 0/0/0
[AR1-Tunnel0/0/0]ip add 10.1.2.1 24
[AR1-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR1-Tunnel0/0/0]sou 15.1.1.1
[AR1-Tunnel0/0/0]nhrp network-id 100
[AR1-Tunnel0/0/0]
[AR2]int t0/0/0
[AR2-Tunnel0/0/0]ip add 10.1.2.2 24
[AR2-Tunnel0/0/0]tu g p
[AR2-Tunnel0/0/0]sou 25.1.1.2
[AR2-Tunnel0/0/0]nh n 100
[AR2-Tunnel0/0/0]nh en 10.1.2.1 15.1.1.1 re
[AR2-Tunnel0/0/0]
[AR3]int t0/0/0
[AR3-Tunnel0/0/0]ip add 10.1.2.3 24
[AR3-Tunnel0/0/0]tu g p
[AR3-Tunnel0/0/0]sou 35.1.1.3
[AR3-Tunnel0/0/0]nhrp ne 100
[AR3-Tunnel0/0/0]nh en 10.1.2.1 15.1.1.1 re
[AR3-Tunnel0/0/0]
七、R1与R4间为点到点的GRE、
[AR1]int t 0/0/1
[AR1-Tunnel0/0/1]ip add 10.1.1.1 24
[AR1-Tunnel0/0/1]tu g
[AR1-Tunnel0/0/1]sou 15.1.1.1
[AR1-Tunnel0/0/1]de 45.1.1.4
[AR4]int t0/0/1
[AR4-Tunnel0/0/1]ip add 10.1.1.4 24
[AR4-Tunnel0/0/1]tu g
[AR4-Tunnel0/0/1]sou 45.1.1.4
[AR4-Tunnel0/0/1]de 15.1.1.1
八、配置RIP路由协议来传递两端私网路由
[AR1]rip 1
[AR1-rip-1]v 2
[AR1-rip-1]undo summ
[AR1-rip-1]net 192.168.0.0
[AR1-rip-1]net 10.0.0.0
[AR1-rip-1]
[AR2]rip 1
[AR2-rip-1]v 2
[AR2-rip-1]un sum
[AR2-rip-1]net 192.168.0.0
[AR2-rip-1]net 10.0.0.0
[AR2-rip-1]
[AR3]rip 1
[AR3-rip-1]v 2
[AR3-rip-1]un summ
[AR3-rip-1]net 192.168.0.0
[AR3-rip-1]net 10.0.0.0
[AR3-rip-1]
[AR4-Tunnel0/0/1]rip 1
[AR4-rip-1]v 2
[AR4-rip-1]un summ
[AR4-rip-1]net 192.168.0.0
[AR4-rip-1]net 10.0.0.0
[AR4-rip-1]
九、配置nat使PC可以访问R5环回,达到全网通
[AR1]acl 2000
[AR1-acl-basic-2000]rule per sou 192.168.1.0 0.0.0.255
[AR1-acl-basic-2000]int se4/0/0
[AR1-Serial4/0/0]nat out 2000
[AR1-Serial4/0/0]
[AR2]acl 2000
[AR2-acl-basic-2000]rule per sou 192.168.2.0 0.0.0.255
[AR2-acl-basic-2000]int se4/0/0
[AR2-Serial4/0/0]nat out 2000
[AR2-Serial4/0/0]
[AR3]acl 2000
[AR3-acl-basic-2000]rule per sou 192.168.3.0 0.0.0.255
[AR3-acl-basic-2000]int se4/0/0
[AR3-Serial4/0/0]nat out 2000
[AR3-Serial4/0/0]
[AR4]acl 2000
[AR4-acl-basic-2000]rule per sou 192.168.4.0 0.0.0.255
[AR4-acl-basic-2000]int g0/0/0
[AR4-GigabitEthernet0/0/0]nat out 2000
[AR4-GigabitEthernet0/0/0