一、实验内容
二、实验步骤
第一步:IP规划
设备 | 地址 | 接口/网关 |
PC1 | 192.168.1.1/24 | 192.168.1.2/24 |
PC2 | ||
PC3 | ||
PC4 | ||
PC5 | ||
R1 | 16.0.0.1/24 | G0/0/1 |
61.0.0.1/24 | G0/0/2 | |
R2 | 26.0.0.1/24 | G0/0/0 |
R3 | 36.0.0.1/24 | G0/0/0 |
R4 | 46.0.0.1/24 | G0/0/0 |
R5 | 56.0.0.1/24 | G0/0/0 |
R6 | 16.0.0.2/24 | G0/0/0 |
26.0.0.2/24 | G0/0/1 | |
36.0.0.2/24 | G0/0/2 | |
46.0.0.2/24 | G4/0/1 | |
56.0.0.2/24 | G4/0/2 | |
61.0.0.2/24 | G4/0/0 |
第二步:IP配置(R1为例)
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
<Huawei>sysname R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[R1-GigabitEthernet0/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add 16.0.0.1 24
[R1-GigabitEthernet0/0/0]int g 0/0/2
[R1-GigabitEthernet0/0/2]ip add 61.0.0.1 24
第三步: 缺省路由(R1为例)
[r1]ip route-static 0.0.0.0 0.0.0.0 16.0.0.2
[r1]ip route-static 0.0.0.0 0.0.0.0 61.0.0.2
第四步:MGRE配置(R1-R3)
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 192.168.6.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 16.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.6.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source g0/0/0
[R2-Tunnel0/0/0]nhrp entry 192.168.6.1 16.0.0.1 register
[R2-Tunnel0/0/0]nhrp network-id 100
第五步:MGRE配置(R1/4/5)
[R1]interface Tunnel0/0/1
[R1-Tunnel0/0/0]ip address 192.168.7.1 255.255.255.0
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 61.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 200
[R1-Tunnel0/0/0]nhrp entry 192.168.7.2 46.0.0.1 register ---找r4注册
[R1-Tunnel0/0/0]nhrp entry 192.168.7.3 56.0.0.1 register ---找r5注册
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R4]interface Tunnel0/0/1
[R4-Tunnel0/0/0]ip address 192.168.7.2 255.255.255.0
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source 46.0.0.1
[R4-Tunnel0/0/0]nhrp entry multicast dynamic
[R4-Tunnel0/0/0]nhrp network-id 100
[R4-Tunnel0/0/0] nhrp entry 192.168.7.2 56.0.0.1 register --- 找r5注册
--- 不用找在找r1进行注册,
[R3 interface Tunnel0/0/1
[R3-Tunnel0/0/0]ip address 192.168.7.3 255.255.255.0
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 56.0.0.1
[R3-Tunnel0/0/0]ospf network-type broadcast
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp network-id 100
第六步:ospf配置(R1为例)
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]
[R1-ospf-1]area 0.0.0.0
[R1-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0] network 192.168.6.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0] network 192.168.7.0 0.0.0.255