实验要求![](https://img-blog.csdnimg.cn/e5808673f083454facf0c3653d9cb6bf.png)
拓补图
配置
IP配置
GigabitEthernet0/0/0 192.168.1.1/24 up up
Serial4/0/0 5.5.5.65/26 up up
Tunnel0/0/0 192.168.5.1/24 up up
Tunnel0/0/1 192.168.6.1/24 up up
[r1]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.4.1/24 up up
Serial4/0/1 5.5.5.129/26 up up
Tunnel0/0/0 192.168.5.2/24 up up
[r2]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 5.5.5.193/26 up up
GigabitEthernet0/0/1 192.168.2.1/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Tunnel0/0/0 192.168.5.4/24 up up
[r4]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 5.5.5.194/26 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
Serial3/0/0 5.5.5.66/26 up up
Serial3/0/1 5.5.5.130/26 up up
Serial4/0/0 5.5.5.2/26 up up
Serial4/0/1 unassigned down down
Tunnel0/0/0 192.168.5.5/24 *down down
[r5]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.3.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 5.5.5.1/26 up up
Serial4/0/1 unassigned down down
Tunnel0/0/0 192.168.5.3/24 up up
[r3]
缺省路由配置
ip route-static 0.0.0.0 0.0.0.0 5.5.5.66
ip route-static 192.168.2.0 255.255.255.0 192.168.6.2
#
return
[r1]
ip route-static 0.0.0.0 0.0.0.0 5.5.5.130
#
return
[r2]
ip route-static 0.0.0.0 0.0.0.0 5.5.5.2
#
return
[r3]
ip route-static 0.0.0.0 0.0.0.0 5.5.5.194
ip route-static 192.168.1.0 24 192.168.6.1
#
return
[r4]
Tunnel接口的创建已经GRE和MGRE实现
interface Tunnel0/0/0
ip address 192.168.5.1 255.255.255.0
undo rip split-horizon
tunnel-protocol gre p2mp
source 5.5.5.65
nhrp redirect
nhrp entry multicast dynamic
#
return
[r1-Tunnel0/0/0]
interface Tunnel0/0/1
ip address 192.168.6.1 255.255.255.0
tunnel-protocol gre
source 5.5.5.65
destination 5.5.5.193
#
return
[r1-Tunnel0/0/1]
interface Tunnel0/0/0
ip address 192.168.5.2 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/1
nhrp entry 192.168.5.1 5.5.5.65 register
#
return
[r2-Tunnel0/0/0]
interface Tunnel0/0/0
ip address 192.168.5.3 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
nhrp entry 192.168.5.1 5.5.5.65 register
#
return
[r3-Tunnel0/0/0]
ip address 192.168.5.4 255.255.255.0
tunnel-protocol gre
source 5.5.5.193
destination 5.5.5.65
#
return
[r4-Tunnel0/0/0]
开启RIP动态协议
rip 1version 2network 192.168.1.0network 192.168.5.0#return[r1-rip-1]rip 1version 2network 192.168.4.0network 192.168.5.0#return[r2-rip-1]#rip 1version 2network 192.168.3.0network 192.168.5.0#return[r3-rip-1][r1-Tunnel0/0/0]nhrp entry multicast dynamic ---开启伪广播功能undo rip split-horizon --- 关闭水平分割
设置nat
acl 2000:
rule 5 permit source 192.168.0.0 0.0.255.255nat outbound 2000
#
return
[r1-Serial4/0/0]
nat outbound 2000
#
return
[r2-Serial4/0/0]nat outbound 2000
#
return
[r3-Serial4/0/0]
nat outbound 2000
#
return
[r4-Serial4/0/0]
设置PAP认证和chap认证以及修改hdlc
link-protocol ppp
ppp pap local-user huawei password cipher %$%$54A1#')iWT()avD&F6r2,+M@%$%$
[r1-Serial4/0/0]
link-protocol ppp
ppp chap user admin
ppp chap password cipher %$%$"ye]~ZU+:5{^S4G=`4W=,,Cu%$%$
[r2-Serial4/0/1]
link-protocol hdlc
[r3-Serial4/0/0]
link-protocol ppp
ppp authentication-mode pap
[r5-Serial3/0/0]
link-protocol ppp
ppp authentication-mode chap
[r5-Serial3/0/1]
link-protocol hdlc
[r5-Serial4/0/0]
测试