eNSP:mgre与ospf的优化综合实验

实验要求:

请添加图片描述

第一步:路由器、IP的配置

r1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.1.1 20
[r1-GigabitEthernet0/0/0]int lo0
[r1-LoopBack0]ip add 172.16.32.1 20

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 172.16.32.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]network 172.16.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]

[r1]ospf
[r1-ospf-1]ar 1
[r1-ospf-1-area-0.0.0.1]stub
[r1-ospf-1-area-0.0.0.1]stub no-summary 

r2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.1.2 20
[r2-GigabitEthernet0/0/0]int lo0
[r2-LoopBack0]ip add 172.16.32.2 20

[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.32.2 0.0.0.0
[r2-ospf-1-area-0.0.0.1]network 172.16.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.1]

[r2]ospf
[r2-ospf-1]ar 1
[r2-ospf-1-area-0.0.0.1]stub
[r2-ospf-1-area-0.0.0.1]stub no-summary 

r3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.1.3 20
[r3-GigabitEthernet0/0/0]int lo0
[r3-LoopBack0]ip add 172.16.16.1 20
[r3-LoopBack0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24

[r3]ip route-static 0.0.0.0 0 34.1.1.2

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]are 1
[r3-ospf-1-area-0.0.0.1]network 172.16.1.3 0.0.0.0
[r3-ospf-1-area-0.0.0.1]network 172.16.16.1 0.0.0.0

[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.1 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]nhrp entry multicast dynamic 

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0

[r3-Tunnel0/0/0]ospf network-type broadcast 

[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.0.0 255.255.192.0

[r3]ospf
[r3-ospf-1]ar 1
[r3-ospf-1-area-0.0.0.1]stub
[r3-ospf-1-area-0.0.0.1]stub no-summary 

r4:

<Huawei>sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ISP
[ISP]int g 0/0/0
[ISP-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[ISP-GigabitEthernet0/0/0]int g 0/0/1
[ISP-GigabitEthernet0/0/1]ip add 45.1.1.2 24
[ISP-GigabitEthernet0/0/1]int g 0/0/2
[ISP-GigabitEthernet0/0/2]ip add 46.1.1.2 24
[ISP-GigabitEthernet0/0/2]int g 4/0/0
[ISP-GigabitEthernet4/0/0]ip add 47.1.1.2 24
[ISP-GigabitEthernet4/0/0]int lo0
[ISP-LoopBack0]ip add 4.4.4.4 24


r5:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[r5-GigabitEthernet0/0/0]int lo0
[r5-LoopBack0]ip add 172.16.64.1 18
[r5-LoopBack0]

[r5]ip route-static 0.0.0.0 0 45.1.1.2

[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 10.1.1.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source g0/0/0
[r5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register 
[r5-Tunnel0/0/0]nhrp entry multicast dynamic 

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 172.16.64.1 0.0.0.0

[r5-Tunnel0/0/0]ospf network-type broadcast 
[r5-Tunnel0/0/0]ospf dr-priority 0

r6:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r6
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.1.1.1 24
[r6-GigabitEthernet0/0/0]int lo0
[r6-LoopBack0]ip add 172.16.144.1 20
[r6-LoopBack0]int g 0/0/1
[r6-GigabitEthernet0/0/1]ip add 172.16.128.1 30
[r6-GigabitEthernet0/0/1]

[r6]ip route-static 0.0.0.0 0 46.1.1.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.128.1 0.0.0.0

[r6]int t  0/0/0
[r6-Tunnel0/0/0]ip add 10.1.1.3 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r6-Tunnel0/0/0]source g 0/0/0
[r6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register 
[r6-Tunnel0/0/0]nhrp entry multicast dynamic 

[r6]ospf 1
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 172.16.144.1 0.0.0.0

[r6-Tunnel0/0/0]ospf network-type broadcast 
[r6-Tunnel0/0/0]ospf dr-priority 0

[r6]ospf
[r6-ospf-1]asbr-summary 172.16.128.0 255.255.192.0

r7:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r7
[r7]int g 0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.1.1.1 24
[r7-GigabitEthernet0/0/0]int g 0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.192.1 30
[r7-GigabitEthernet0/0/1]int lo0
[r7-LoopBack0]ip add 172.16.208.1 20
[r7-LoopBack0]

[r7]ip route-static 0.0.0.0 0 47.1.1.2

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]network 172.16.192.1 0.0.0.0

[r7]int t 0/0/0
[r7-Tunnel0/0/0]ip add 10.1.1.4 24
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r7-Tunnel0/0/0]source g 0/0/0
[r7-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register 
[r7-Tunnel0/0/0]nhrp entry multicast dynamic 

[r7]ospf 1
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 10.1.1.4 0.0.0.0      	
[r7-ospf-1-area-0.0.0.0]network 172.16.208.1 0.0.0.0

[r7-Tunnel0/0/0]ospf network-type broadcast 
[r6-Tunnel0/0/0]ospf dr-priority 0

[r7]ospf
[r7-ospf-1]asbr-summary 172.16.192.0 255.255.192.0

r8:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r8
[r8]int g 0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.192.2 30
[r8-GigabitEthernet0/0/0]int lo0
[r8-LoopBack0]ip add 172.16.224.1 20
[r8-LoopBack0]int g 0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.192.5 30
[r8-GigabitEthernet0/0/1]

[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.224.1 0.0.0.0
[r8-ospf-1-area-0.0.0.3]network 172.16.192.2 0.0.0.0
[r8-ospf-1-area-0.0.0.3]network 172.16.192.5 0.0.0.0

r9:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r9
[r9]int g 0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.192.6 30
[r9-GigabitEthernet0/0/0]int g 0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.192.9 30
[r9-GigabitEthernet0/0/1]int lo0
[r9-LoopBack0]ip add 172.16.140.1 21
[r9-LoopBack0]

[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]are 3
[r9-ospf-1-area-0.0.0.3]network 172.16.192.6 0.0.0.0

[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]area 4
[r9-ospf-2-area-0.0.0.4]net 172.16.140.1 0.0.0.0
[r9-ospf-2-area-0.0.0.4]net 172.16.192.9 0.0.0.0
[r9-ospf-2-area-0.0.0.4]

[r9]ospf 1
[r9-ospf-1]import-route ospf 2
[r9-ospf-1]ospf 2
[r9-ospf-2]import-route ospf 1
[r9-ospf-2]

[r9]ospf 1
[r9-ospf-1]asbr-summary 172.16.192.8 255.255.255.252
[r9-ospf-1]asbr-summary 172.16.148.0 255.255.248.0

[r9]ospf 1
[r9-ospf-1]area 3
[r9-ospf-1-area-0.0.0.3]nssa
[r9-ospf-1-area-0.0.0.3]nssa no-summary

r10:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r10
[r10]int g 0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.192.10 30
[r10-GigabitEthernet0/0/0]int lo0
[r10-LoopBack0]ip add 172.16.148.1 21
[r10-LoopBack0]

[r10]ospf 1 router-id 10.10.10.10
[r10-ospf-1]area 4
[r10-ospf-1-area-0.0.0.4]network 172.16.148.1 0.0.0.0
[r10-ospf-1-area-0.0.0.4]network 172.16.192.10 0.0.0.0

r11:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r11
[r11]int g 0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.128.2 30
[r11-GigabitEthernet0/0/0]int g 0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.128.5 30
[r11-GigabitEthernet0/0/1]int lo0
[r11-LoopBack0]ip add 172.16.160.1 20
[r11-LoopBack0]

[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]ar 2
[r11-ospf-1-area-0.0.0.2]network 172.16.160.1 0.0.0.0
[r11-ospf-1-area-0.0.0.2]network 172.16.128.2 0.0.0.0
[r11-ospf-1-area-0.0.0.2]network 172.16.128.5 0.0.0.0

r12:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r12
[r12]int g  0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.128.6 30
[r12-LoopBack1]int lo0
[r12-LoopBack0]ip add 172.16.176.1 21
[r12-LoopBack0]int lo1
[r12-LoopBack1]ip add 172.16.184.1 21
[r12-LoopBack1]

[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.2]net 172.16.128.6 0.0.0.0

[r12]ospf 2
[r12-ospf-2]area 99
[r12-ospf-2-area-0.0.0.99]network 172.16.184.1 0.0.0.0
[r12-ospf-2-area-0.0.0.99]network 172.16.176.1 0.0.0.0

[r12]ospf 1
[r12-ospf-1]import-route ospf 2
[r12-ospf-1]ospf 2	
[r12-ospf-2]import-route ospf 1
[r12-ospf-2]

[r12]ospf 1
[r12-ospf-1]asbr-summary 172.16.176.0 255.255.240.0

[r12]ospf
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.2]nssa 
[r12-ospf-1-area-0.0.0.2]nssa no-summary

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值