HCIP第三次实验——mgre综合实验

 配置如下:

第一步:配置IP

R1

[r1-Serial4/0/0]ip add 15.0.0.1 24
[r1-Serial4/0/0]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24

R2

[r2-Serial4/0/0]ip add 25.0.0.1 24
[r2-Serial4/0/0]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.2.1 24

R3

[r3-GigabitEthernet0/0/0]ip add 192.168.3.1 24

[r3-GigabitEthernet0/0/0]int s 4/0/0
[r3-Serial4/0/0]ip add 35.0.0.1 24

R4

[r4-GigabitEthernet0/0/1]ip add 192.168.4.1 24

[r4-GigabitEthernet0/0/0]ip add 45.0.0.1 24

R5

[r5]int s3/0/0
[r5-Serial3/0/0]ip add 15.0.0.2 24

[r5]int s 3/0/1
[r5-Serial3/0/1]ip add 25.0.0.2 24

[r5-Serial3/0/1]int s 4/0/0
[r5-Serial4/0/0]ip add 35.0.0.2 24

[r5-Serial4/0/0]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.2 24

[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 5.5.5.5 24

第二步:给所有边界设备配置缺省 --- 此时所有设备均可ping通

R1

[r1]ip route-static 0.0.0.0 0 15.0.0.2      

R2

[r2]ip route-static 0.0.0.0 0 25.0.0.2

R3

[r3]ip route-static 0.0.0.0 0 35.0.0.2

R4

[r4]ip route-static 0.0.0.0 0 45.0.0.2

R5

第三步:R1-5 PAP R2-5 PPP CHAP R3-5 HDLC封装  R5均为主

R1 - R5:

此时R1已经是PPP,直接认证即可

R5

[r5]aaa           -1

[r5-aaa]local-user admin password cipher 123456      

[r5-aaa]local-user admin service-type ppp              

[r5-Serial3/0/0]ppp authentication-mode pap   

R1 

[r1]int s 4/0/0

[r1-Serial4/0/0]ppp pap local-user admin password cipher 123456

R2-R5:

 R5

 此时aaa已经在R1-5运行过,不需要在配置

 [r5-Serial3/0/1]ppp authentication-mode chap

 R2

 [r2-Serial4/0/0]ppp chap user admin

 [r2-Serial4/0/0]ppp chap password cipher 123456

R3-R5:

R3

[r3-Serial4/0/0]link-protocol hdlc      选择链路协议hdlc

R5

[r5-Serial4/0/0]link-protocol hdlc       二者必须都修改封装方式

第四步:R1-2-3搭建一个MGRE,R1为中心,

R1 中心

[r1]interface t 0/0/0   ---创建隧道接口

[r1-Tunnel0/0/0]ip add 192.168.5.1 24

[r1-Tunnel0/0/0]tunnel-protocol gre p2mp   --定义封装类型

[r1-Tunnel0/0/0]source 15.0.0.1      ---封装内容,源IP
[r1-Tunnel0/0/0]nhrp network-id 100  创建nhrp域

[r1-Tunnel0/0/0]nhrp entry multicast dynamic   --- 开启伪广播

R2 分支

[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24

[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 

[r2-Tunnel0/0/0]source s4/0/0      --- 写出接口,防止IP改变

[r2-Tunnel0/0/0]nhrp network-id 100   ---和上对得上

[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1   register 分支找中心 中心的隧道IP和RIP

R2信息到!

 R3

[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 192.168.5.3 24 

[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 

 [r3-Tunnel0/0/0]source Serial 4/0/0

[r3-Tunnel0/0/0]nhrp network-id 100

[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 

 R3信息到!

 R1-R4为点到点GRE

R1

[r1]int t0/0/1
[r1-Tunnel0/0/1]ip add 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

[r4]int t0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24  
[r4-Tunnel0/0/0]tunnel-protocol gre   
[r4-Tunnel0/0/0]source 45.0.0.1  
[r4-Tunnel0/0/0]destination 15.0.0.1

RIP全网可达

R1

[r1]rip
[r1-rip-1]version 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

[r2]rip

[r2-rip-1]v 2
[r2-rip-1]net 192.168.5.0 
[r2-rip-1]network 192.168.2.0

R3

[r3]rip
[r3-rip-1]v 2
[r3-rip-1]net 192.168.3.0   
[r3-rip-1]network 192.168.5.0

R4

[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0

最后在R1

[r1-Tunnel0/0/0]undo rip split-horizon关闭水平分割,全网可达,路由表信息全了

display ip routing-table protocol rip 查看rip路由表

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值