OSPF的综合实验

一、实验步骤

配置区域0:

〈Huawei〉sys
【Huawei】sys  r3
【r3】interface Serial 4/0/0
【r3-Serial 4/0/0】ip address 34.0.0.1 24
【r3-Serial 4/0/0】q
【r3】interface Tunnel 0/0/0
【r3-Tunnel 0/0/0】tunnel-protocol gre p2mp
【r3-Tunnel 0/0/0】ip address 172.16.1.4 29
【r3-Tunnel 0/0/0】q

〈Huawei〉sys
【Huawei】sys  r5
【r5】interface Serial 4/0/0
【r5-Serial 4/0/0】ip address 45.0.0.1 24
【r5-Serial 4/0/0】q
【r5】interface LoopBack 0
【r5-LoopBack 0】ip address 172.16.2.1 24
【r5-LoopBack 0】q
【r5】interface Tunnel 0/0/0
【r5-Tunnel 0/0/0】tunnel-protocol gre p2mp
【r5-Tunnel 0/0/0】ip address 172.16.1.1 29
【r5-Tunnel 0/0/0】q

〈Huawei〉sys
【Huawei】sys  r6
【r6】interface Serial 4/0/0
【r6-Serial 4/0/0】ip address 46.0.0.1 24
【r6-Serial 4/0/0】q
【r6】interface Tunnel 0/0/0
【r6-Tunnel 0/0/0】tunnel-protocol gre p2mp
【r6-Tunnel 0/0/0】ip address 172.16.1.2 29
【r6-Tunnel 0/0/0】q

〈Huawei〉sys
【Huawei】sys  r7
【r7】interface GigabitEthernet 0/0/0
【r7-GigabitEthernet 0/0/0】ip address 47.0.0.1 24
【r7-GigabitEthernet 0/0/0】q
【r7】interface LoopBack 0
【r7-LoopBack 0】ip address 172.16.3.1 24
【r7-LoopBack 0】q
【r7】interface Tunnel 0/0/0
【r7-Tunnel 0/0/0】tunnel-protocol gre p2mp
【r7-Tunnel 0/0/0】ip address 172.16.1.3 29
【r7-Tunnel 0/0/0】q

 配置区域1:〈Huawei〉sys
【Huawei】sys  r1
【r1】interface GigabitEthernet 0/0/0
【r1-GigabitEthernet 0/0/0】ip address 172.16.33.1 29
【r1-GigabitEthernet 0/0/0】q
【r1】interface LoopBack 0
【r1-LoopBack 0】ip address 172.16.34.1 24
【r1-LoopBack 0】q
【r1】interface Tunnel 0/0/0
【r1-Tunnel 0/0/0】tunnel-protocol gre p2mp
【r1-Tunnel 0/0/0】ip address 172.16.1.3 29
【r1-Tunnel 0/0/0】q

〈Huawei〉sys
【Huawei】sys  r2
【r2】interface GigabitEthernet 0/0/0
【r2-GigabitEthernet 0/0/0】ip address 172.16.33.2 29
【r2-GigabitEthernet 0/0/0】q
【r2】interface LoopBack 0
【r2-LoopBack 0】ip address 172.16.35.1 24
【r2-LoopBack 0】q

【r3】interface GigabitEthernet 0/0/0
【r3-GigabitEthernet 0/0/0】ip address 172.16.33.3 29
【r3-GigabitEthernet 0/0/0】q
【r3】interface LoopBack 0
【r3-LoopBack 0】ip address 172.16.36.1 24
【r3-LoopBack 0】q

配置区域2:

 【r6】interface GigabitEthernet 0/0/0
【r6-GigabitEthernet 0/0/0】ip address 172.16.64.1 30
【r6-GigabitEthernet 0/0/0】q

〈Huawei〉sys
【Huawei】sys  r11
【r11】interface GigabitEthernet 0/0/0
【r11-GigabitEthernet 0/0/0】ip address 172.16.64.2 30
【r11-GigabitEthernet 0/0/0】q
【r11】interface GigabitEthernet 0/0/1
【r11-GigabitEthernet 0/0/1】ip address 172.16.64.5 30
【r11-GigabitEthernet 0/0/1】q
【r11】interface LoopBack 0
【r11-LoopBack 0】ip address 172.16.66.1 24
【r11-LoopBack 0】q

〈Huawei〉sys
【Huawei】sys  r12
【r12】interface GigabitEthernet 0/0/0
【r12-GigabitEthernet 0/0/0】ip address 172.16.64.6 30
【r12-GigabitEthernet 0/0/0】q
【r12】interface LoopBack 0
【r12-LoopBack 0】ip address 172.16.162.1 24
【r12-LoopBack 0】q
【r12】interface LoopBack 1
【r12-LoopBack 1】ip address 172.16.163.1 24
【r12-LoopBack 1】q

配置区域3:

 【r7】interface GigabitEthernet 0/0/1
【r7-GigabitEthernet 0/0/1】ip address 172.16.96.1 30
【r7-GigabitEthernet 0/0/1】q

〈Huawei〉sys
【Huawei】sys  r8
【r8】interface GigabitEthernet 0/0/0
【r8-GigabitEthernet 0/0/0】ip address 172.16.96.2 30
【r8-GigabitEthernet 0/0/0】q
【r8】interface GigabitEthernet 0/0/1
【r8-GigabitEthernet 0/0/1】ip address 172.16.96.5 30
【r8-GigabitEthernet 0/0/1】q
【r8】interface LoopBack 0
【r8-LoopBack 0】ip address 172.16.98.1 24
【r8-LoopBack 0】q

〈Huawei〉sys
【Huawei】sys  r9
【r9】interface GigabitEthernet 0/0/0
【r9-GigabitEthernet 0/0/0】ip address 172.16.96.6 30
【r9-GigabitEthernet 0/0/0】q

配置区域4:

 【r9】interface GigabitEthernet 0/0/1
【r9-GigabitEthernet 0/0/1】ip address 172.16.128.1 30
【r9-GigabitEthernet 0/0/1】q
【r9】interface LoopBack 0
【r9-LoopBack 0】ip address 172.16.130.1 24
【r9-LoopBack 0】q

〈Huawei〉sys
【Huawei】sys  r10
【r10】interface GigabitEthernet 0/0/0
【r10-GigabitEthernet 0/0/0】ip address 172.16.128.2 30
【r10-GigabitEthernet 0/0/0】q
【r10】interface LoopBack 0
【r10-LoopBack 0】ip address 172.16.131.1 24
【r10-LoopBack 0】q

配置MGRE环境: 

〈Huawei〉sys
【Huawei】sys  isp
【isp】interface Serial 4/0/0
【isp-Serial 4/0/0】ip address 34.0.0.2 24
【isp-Serial 4/0/0】q
【isp】interface Serial 4/0/1
【isp-Serial 4/0/0】ip address 45.0.0.2 24
【isp-Serial 4/0/0】q
【isp】interface Serial 3/0/0
【isp-Serial 4/0/0】ip address 46.0.0.2 24
【isp-Serial 4/0/0】q
【isp】interface GigabitEthernet 0/0/0
【isp-GigabitEthernet 0/0/0】ip address 47.0.0.2 24
【isp-GigabitEthernet 0/0/0】q

【r3】IP route-static 0.0.0.0 0 34.0.0.2

【r5】IP route-static 0.0.0.0 0 45.0.0.2

【r6】IP route-static 0.0.0.0 0 46.0.0.2

【r7】IP route-static 0.0.0.0 0 47.0.0.2

【r3】interface Tunnel 0/0/0
【r3-Tunnel 0/0/0】source 34.0.0.1
【r3-Tunnel 0/0/0】nhrp network-id 100
【r3-Tunnel 0/0/0】nhrp enty multicast dynamic
【r3-Tunnel 0/0/0】q

【r5】interface Tunnel 0/0/0
【r5-Tunnel 0/0/0】source Serial 4/0/0
【r5-Tunnel 0/0/0】nhrp network-id 100
【r5-Tunnel 0/0/0】nhrp enty 172.16.1.4 34.0.0.1 register
【r5-Tunnel 0/0/0】q

【r6】interface Tunnel 0/0/0
【r6-Tunnel 0/0/0】source Serial 4/0/0
【r6-Tunnel 0/0/0】nhrp network-id 100
【r6-Tunnel 0/0/0】nhrp enty 172.16.1.4 34.0.0.1 register
【r6-Tunnel 0/0/0】q

【r7】interface Tunnel 0/0/0
【r7-Tunnel 0/0/0】source GigabitEthernet 0/0/1
【r7-Tunnel 0/0/0】nhrp network-id 100
【r7-Tunnel 0/0/0】nhrp enty 172.16.1.4 34.0.0.1 register
【r7-Tunnel 0/0/0】q

二、 配置OSPF环境:

区域0

【r3】ospf 1 router-id 3.3.3.3
【r3-ospf-1】area 0
【r3-ospf-1-area-0.0.0.0】network 172.16.32.0 0.0.31.255
【r5】ospf 1 router-id 5.5.5.5
【r5-ospf-1】area 0
【r5-ospf-1-area-0.0.0.0】network 172.16.0.0 0.0.255.255

【r6】ospf 1 router-id 6.6.6.6
【r6-ospf-1】area 0
【r6-ospf-1-area-0.0.0.0】network 172.16.1.2 0.0.0.0

【r7】ospf 1 router-id 7.7.7.7
【r7-ospf-1】area 0
【r7-ospf-1-area-0.0.0.0】network 172.16.1.3 0.0.0.0

【r3】interface Tunnel 0/0/0
【r3-Tunnel 0/0/0】ospf network-type p2mp

【r5】interface Tunnel 0/0/0
【r5-Tunnel 0/0/0】ospf network-type p2mp

【r6】interface Tunnel 0/0/0
【r6-Tunnel 0/0/0】ospf network-type p2mp

【r7】interface Tunnel 0/0/0
【r7-Tunnel 0/0/0】ospf network-type p2mp

区域1:

【r1】ospf 1 
【r1-ospf-1】area 1
【r1-ospf-1-area-0.0.0.1】network 172.16.0.0 0.0.255.255

【r2】ospf 1 router-id 2.2.2.2
【r2-ospf-1】area 1
【r2-ospf-1-area-0.0.0.1】network 172.16.0.0 0.0.255.255

区域2:

 【r6】ospf 1 router-id 6.6.6.6
【r6-ospf-1】area 2
【r6-ospf-1-area-0.0.0.2】network 172.16.64.1 0.0.0.0

【r11】ospf 1 router-id 11.11.11.11
【r11-ospf-1】area 2
【r11-ospf-1-area-0.0.0.2】network 172.16.0.0 0.0.255.255

【r12】ospf 1 router-id 12.12.12.12
【r12-ospf-1】area 2
【r12-ospf-1-area-0.0.0.2】network 172.16.64.6 0.0.0.0
【r12-ospf-1-area-0.0.0.2】q
【r12-ospf-1】q
【r12】rip
【r12-rip-1】version 2
【r12-rip-1】network 172.16.0.0
【r12-rip-1】q

区域3:

 【r7】ospf 1 
【r7-ospf-1】area 3
【r7-ospf-1-area-0.0.0.3】network 172.16.96.1 0.0.0.0

【r8】ospf 1 router-id 8.8.8.8
【r8-ospf-1】area 3
【r8-ospf-1-area-0.0.0.3】network 172.16.0.0 0.0.255.255

【r9】ospf 1 router-id 9.9.9.9
【r9-ospf-1】area 3
【r9-ospf-1-area-0.0.0.3】network 172.16.96.6 0.0.0.0

区域4:

 【r9】ospf 2 router-id 9.9.9.9
【r9-ospf-2】area 0
【r9-ospf-2-area-0.0.0.0】network 172.16.128.1 0.0.0.0
【r9-ospf-2-area-0.0.0.0】network 172.16.130.1 0.0.0.0

【r10】ospf 2 router-id 10.10.10.10
【r10-ospf-2】area 0
【r10-ospf-2-area-0.0.0.0】network 172.16.0.0 0.0.255.255

重发布:

 【r9】ospf 1
【r9-ospf-1】import-route ospf 2
【r9-ospf-1】q

【r12】ospf 1 
【r12-ospf-1】import-route rip

三、全网可达 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值