GRE和MGRE实验

实验要求

拓补图

 

配置

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 1
 version 2
 network 192.168.1.0
 network 192.168.5.0
#
return
[r1-rip-1]
rip 1
 version 2
 network 192.168.4.0
 network 192.168.5.0
#
return
[r2-rip-1]
#
rip 1
 version 2
 network 192.168.3.0
 network 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.255 

nat 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]

测试

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值