今天我们要做的实验是ospf在MGRE和星型网络中的使用
实验要求是
实验步骤:1.拓扑搭建
2.IP地址分配与配置
3.配置路由
4.构建全连MGRE结构
5.构建星型的拓扑结构
6.ospf
7.测试
1.拓扑搭建
2、IP地址的分配与搭建
以R1为例
3.配置路由
配置到isp的路由
ip route-static 0.0.0.0 0 1.1.1.2
[Huawei]ip route-static 0.0.0.0 0 6.6.6.2
[Huawei]ip route-static 0.0.0.0 0 2.2.2.2
[Huawei]ip route-static 0.0.0.0 0 3.3.3.3
[Huawei]ip route-static 0.0.0.0 0 4.4.4.2
[Huawei]ip route-static 0.0.0.0 0 5.5.5.2
4、构建全连线的MGRE结构
在R1 R4 R5中
R1:
interface Tunnel0/0/0
ip address 10.1.1.1 255.255.255.0
tunnel-protocol gre p2mp
source 1.1.1.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.1.1.2 4.4.4.1 register
nhrp entry 10.1.1.3 5.5.5.1 register
R4:
interface Tunnel0/0/0
ip address 10.1.1.2 255.255.255.0
tunnel-protocol gre p2mp
source 4.4.4.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.1.1.3 5.5.5.1 register
nhrp entry 10.1.1.1 1.1.1.1 register
R5:
interface Tunnel0/0/0
ip address 10.1.1.3 255.255.255.0
tunnel-protocol gre p2mp
source 5.5.5.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.1.1.1 1.1.1.1 register
nhrp entry 10.1.1.2 4.4.4.1 register
5.构建星型拓扑结构
R1上:
interface Tunnel0/0/1
ip address 11.1.1.1 255.255.255.0
tunnel-protocol gre p2mp
source 6.6.6.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
R2上:
interface Tunnel0/0/1
ip address 11.1.1.2 255.255.255.0
tunnel-protocol gre p2mp
source 2.2.2.1
ospf network-type broadcast
ospf dr-priority 0
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 11.1.1.1 6.6.6.1 register
R3上:
interface Tunnel0/0/1
ip address 11.1.1.3 255.255.255.0
tunnel-protocol gre p2mp
source 3.3.3.1
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 11.1.1.1 6.6.6.1 register
6.配置ospf:
R1上:
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 192.168.1.1 0.0.0.0
R2上:
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 11.1.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
R3上:
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 11.1.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
R4上:
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 192.168.4.0 0.0.0.255
R5上:
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 192.168.5.0 0.0.0.255
7.测试:
到这实验就全部结束了