目录
拓扑结构:
要求
1、R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间使用公有IP
2、R3~R5/6/7为MGRE环境,R3为中心站点
3、整个OSPF环境IP地址为172.6.0.0/16
4、所有设备均可访问R4的环回
5、减少LSA的更新量,加快收敛,保障更新安全
6、全网可达
使用的设备:12台路由器、1台交换机
解决网络拓扑:
1、确定广播域的个数
2、分配网段
3、配置IP地址 (优先配置路由器)
确定广播域的个数
根据拓扑结构图以及要求可知,本拓扑结构一共拥有24个网段,包括13个环回网段和11个接口网段。但是,本次实验采用新的思想划分网络,即每个区域划分一个子网,共6个区域,为6个大子网,剩下的在区域内基于区域内的实际情况进行划分。公网的地址自己给。
分配网段
所有网段基于172.168.1.0/16进行划分,要划分出6个子网借3位掩码作为网络位
area0:172.16.0.0/19
每一个环回可能模拟50个用户,所以我们划分为
172.16.0.0/25、172.16.0.128/25、172.16.1.0/25、172.16.1.128/25一直到172.16.31.128/25
然后接口网段P2P: 172.16.0.0/25 划分为172.16.0.0/30、172.16.0.4/30、172.16.0.8/30、172.16.0.12/30......
MA网段:172.16.0.128/29、172.16.0.136/29、172.16.0.144/29......
注:这是一种全新的地址划分思路,所以以下的地址都是按照area0的样例划分的
172.16.0.0/29
172.16.0.128/25
172.16.1.0/25
172.16.1.128/25
area1:172.16.32.0/19
172.16.32.0/29
172.16.32.128/25
172.16.33.0/25
172.16.33.128/25
area2:172.16.64.0/19
172.16.64.0/30
172.16.64.4/30
172.16.64.128/25
area3:172.16.96.0/19
172.16.96.0/30
172.16.96.4/30
172.16.96.128/25
area4:172.16.128.0/19
172.16.128.0/30
172.16.128.128/25
172.16.129.0/25
EIGRP(RIP):172.16.160.0/19
172.16.160.0/25
172.16.160.128/25
备用地址:
172.16.192.0/19
172.16.224.0/19
公网地址:
10.1.1.0/24
20.1.1.0/24
30.1.1.0/24
40.1.1.0/24
和AR4的环回3.3.3.0/24
配置路由器IP地址-优先公网配通
以下的实际操作,先将R3、R4、R5、R6、R7公网配置,对他们优先进行IP地址的配置和MGRE配置并配置缺省路由,然后再配置其他的路由!!!
AR1:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 172.16.32.1 29
[r1-GigabitEthernet0/0/0]
May 8 2023 20:33:13-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 172.16.32.129 25
[r1-LoopBack0]q
[r1]
AR2:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 172.16.32.2 29
[r2-GigabitEthernet0/0/0]
May 8 2023 20:34:00-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 172.16.33.1 25
[r2-LoopBack0]q
[r2]
AR3:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 172.16.32.3 29
May 10 2023 19:25:02-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 10.1.1.1 24
May 10 2023 19:25:17-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]q
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 172.16.33.129 25
[r3-LoopBack0]q
[r3]
AR4:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname isp
[isp]interface GigabitEthernet 0/0/0
[isp-GigabitEthernet0/0/0]ip address 10.1.1.2 24
[isp-GigabitEthernet0/0/0]
May 8 2023 20:35:54-08:00 isp %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[isp-GigabitEthernet0/0/0]q
[isp]interface GigabitEthernet 0/0/1
[isp-GigabitEthernet0/0/1]ip address 20.1.1.2 24
[isp-GigabitEthernet0/0/1]
May 8 2023 20:36:11-08:00 isp %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[isp-GigabitEthernet0/0/1]q
[isp]interface GigabitEthernet 0/0/2
[isp-GigabitEthernet0/0/2]ip address 30.1.1.2 24
May 8 2023 20:36:28-08:00 isp %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state.
[isp-GigabitEthernet0/0/2]q
[isp]interface GigabitEthernet 1/0/0
[isp-GigabitEthernet1/0/0]ip address 40.1.1.2 24
May 8 2023 20:36:42-08:00 isp %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP on the interface GigabitEthernet1/0/0 has entered the UP state.
[isp-GigabitEthernet1/0/0]q
[isp]interface LoopBack 0
[isp-LoopBack0]ip address 3.3.3.3 24
[isp-LoopBack0]q
[isp]
AR5:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 20.1.1.1 24
May 8 2023 20:37:26-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]q
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 172.16.0.129 25
[r5-LoopBack0]q
[r5]
AR6:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]interface GigabitEthernet 0/0/0
[r6-GigabitEthernet0/0/0]ip address 30.1.1.1 24
[r6-GigabitEthernet0/0/0]
May 8 2023 20:38:27-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]q
[r6]interface GigabitEthernet 0/0/1
[r6-GigabitEthernet0/0/1]ip address 172.16.64.1 30
[r6-GigabitEthernet0/0/1]
May 8 2023 20:38:52-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r6-GigabitEthernet0/0/1]q
[r6]interface LoopBack 0
[r6-LoopBack0]ip address 172.16.1.1 25
[r6-LoopBack0]q
[r6]
AR7:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r7
[r7]interface GigabitEthernet 0/0/0
[r7-GigabitEthernet0/0/0]ip address 40.1.1.1 24
[r7-GigabitEthernet0/0/0]
May 8 2023 20:39:42-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r7-GigabitEthernet0/0/0]q
[r7]interface GigabitEthernet 0/0/1
[r7-GigabitEthernet0/0/1]ip address 172.16.96.1 30
May 8 2023 20:40:06-08:00 r7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r7-GigabitEthernet0/0/1]q
[r7]interface LoopBack 0
[r7-LoopBack0]ip address 172.16.1.129 25
[r7-LoopBack0]q
[r7]
AR8:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r8
[r8]interface GigabitEthernet 0/0/0
[r8-GigabitEthernet0/0/0]ip address 172.16.96.2 30
[r8-GigabitEthernet0/0/0]
May 8 2023 20:41:20-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r8-GigabitEthernet0/0/0]q
[r8]interface GigabitEthernet 0/0/1
[r8-GigabitEthernet0/0/1]ip address 172.16.96.5 30
May 8 2023 20:41:46-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r8-GigabitEthernet0/0/1]q
[r8]interface LoopBack 0
[r8-LoopBack0]ip address 172.16.96.129 25
[r8-LoopBack0]q
[r8]
AR9:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r9
[r9]interface GigabitEthernet 0/0/0
[r9-GigabitEthernet0/0/0]ip address 172.16.96.6 30
[r9-GigabitEthernet0/0/0]
May 8 2023 20:42:50-08:00 r9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r9-GigabitEthernet0/0/0]q
[r9]interface GigabitEthernet 0/0/1
[r9-GigabitEthernet0/0/1]ip address 172.16.128.1 30
May 8 2023 20:43:20-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r9-GigabitEthernet0/0/1]q
[r9]interface LoopBack 0
[r9-LoopBack0]ip address 172.16.128.129 25
[r9-LoopBack0]q
[r9]
AR10:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r10
[r10]interface GigabitEthernet 0/0/0
[r10-GigabitEthernet0/0/0]ip address 172.16.128.2 30
[r10-GigabitEthernet0/0/0]
May 8 2023 20:44:04-08:00 r10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r10-GigabitEthernet0/0/0]q
[r10]interface LoopBack 0
[r10-LoopBack0]ip address 172.16.129.1 25
[r10-LoopBack0]q
[r10]
AR11:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r11
[r11]interface GigabitEthernet 0/0/0
[r11-GigabitEthernet0/0/0]ip address 172.16.64.2 30
[r11-GigabitEthernet0/0/0]
May 8 2023 20:44:49-08:00 r11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r11-GigabitEthernet0/0/0]q
[r11]interface GigabitEthernet 0/0/1
[r11-GigabitEthernet0/0/1]ip address 172.16.64.5 30
May 8 2023 20:45:07-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r11-GigabitEthernet0/0/1]q
[r11]interface LoopBack 0
[r11-LoopBack0]ip address 172.16.64.129 25
[r11-LoopBack0]q
[r11]
AR12:
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r12
[r12]interface GigabitEthernet 0/0/0
[r12-GigabitEthernet0/0/0]ip address 172.16.64.6 30
[r12-GigabitEthernet0/0/0]
May 8 2023 20:46:08-08:00 r12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r12-GigabitEthernet0/0/0]q
[r12]interface LoopBack 0
[r12-LoopBack0]ip address 172.16.160.1 25
[r12-LoopBack0]q
[r12]interface LoopBack 1
[r12-LoopBack1]ip address 172.16.160.129 25
[r12-LoopBack1]q
[r12]
在R3、R5、R6、R7上配置指向R4的静态缺省路由:
[r3]ip route-static 0.0.0.0 0 10.1.1.2
[r5]ip route-static 0.0.0.0 0 20.1.1.2
[r6]ip route-static 0.0.0.0 0 30.1.1.2
[r7]ip route-static 0.0.0.0 0 40.1.1.2
配置MGRE部分
AR3:中心站点
[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 172.16.0.1 29
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 10.1.1.1
May 8 2023 20:50:55-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]q
[r3]
AR5:
[r5]interface Tunnel 0/0/0
[r5-Tunnel0/0/0]ip address 172.16.0.2 29
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source GigabitEthernet 0/0/0
May 8 2023 20:53:21-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register
[r5-Tunnel0/0/0]q
[r5]
AR6:
[r6]interface Tunnel 0/0/0
[r6-Tunnel0/0/0]ip address 172.16.0.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source GigabitEthernet 0/0/0
May 8 2023 20:54:43-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register
[r6-Tunnel0/0/0]q
[r6]
AR7:
[r7]interface Tunnel 0/0/0
[r7-Tunnel0/0/0]ip address 172.16.0.4 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source GigabitEthernet 0/0/0
May 8 2023 20:57:03-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register
[r7-Tunnel0/0/0]q
[r7]ip ro
此时配置了MGRE的设备之间可以相互通信,但是除了MGRE之外都不能通信,还得运行OSPF协议
因为篇幅太长就放在第二部分里了:OSPF综合实验(第二部分)