标签:first 一个 2.0 最短路径 负载 协议 console sum with
拓扑配如下图:
每台路由器基本网络配置如下:
R1配置:
system-view
sysname R1
user-interface console 0
idle-timeout 1000
quit
interface GigabitEthernet0/0/2
ip address 192.168.1.254 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.17.1 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.12.1 255.255.255.0
quit
R2配置:
system-view
sysname R2
interface GigabitEthernet0/0/1
ip address 192.168.12.2 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.23.2 255.255.255.0
quit
R3配置:
system-view
sysname R3
interface GigabitEthernet0/0/1
ip address 192.168.23.3 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.34.3 255.255.255.0
quit
R4配置:
system-view
sysname R4
interface GigabitEthernet0/0/1
ip address 192.168.34.4 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.45.4 255.255.255.0
quit
R5配置:
system-view
sysname R5
interface GigabitEthernet0/0/1
ip address 192.168.45.5 255.255.255.0
interface GigabitEthernet0/0/2
ip address 192.168.5.254 255.255.255.0
interface GigabitEthernet0/0/0
ip address 100.1.1.5 255.255.255.0
PC1、PC2配置如下:
接下来我们配置OSPF多区域,配置如下:
R1配置
ospf 1 router-id 1.1.1.1
area 12
network 192.168.12.0 0.0.0.255
network 192.168.1.0 0.0.0.255
R2配置
ospf 1 router-id 2.2.2.2
area 0
network 192.168.23.0 0.0.0.255
area 12
network 192.168.12.0 0.0.0.255
R3配置
ospf 1 router-id 3.3.3.3
area 0
network 192.168.23.0 0.0.0.255
network 192.168.34.0 0.0.0.255
R4配置
ospf 1 router-id 4.4.4.4
area 0
network 192.168.34.0 0.0.0.255
area 45
network 192.168.45.0 0.0.0.255
R5配置
ospf 1 router-id 5.5.5.5
area 45
network 192.168.45.0 0.0.0.255
network 192.168.5.0 0.0.0.255
测试让了连通性,用PC1pingPC2,网络互通,如下:
查看R1的链路状态数据库如下:
[R1]display ospf lsdb
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Area: 0.0.0.12
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 1423 36 80000004 1
Router 1.1.1.1 1.1.1.1 1012 48 80000008 1
Network 192.168.12.2 2.2.2.2 1423 32 80000002 0
Sum-Net 192.168.5.0 2.2.2.2 1039 28 80000001 4
Sum-Net 192.168.45.0 2.2.2.2 1409 28 80000001 3
Sum-Net 192.168.23.0 2.2.2.2 1468 28 80000001 1
Sum-Net 192.168.34.0 2.2.2.2 1409 28 80000001 2
Sum-Asbr 5.5.5.5 2.2.2.2 1393 28 80000001 3
查看R2的链路状态数据库如下:
[R1]display ospf lsdb
OSPF Process 1 with Router ID 2.2.2.2
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 4.4.4.4 4.4.4.4 1323 36 80000005 1
Router 2.2.2.2 2.2.2.2 1332 36 80000005 1
Router 3.3.3.3 3.3.3.3 1322 48 80000008 1
Network 192.168.23.3 3.3.3.3 1323 32 80000002 0
Network 192.168.34.4 4.4.4.4 1324 32 80000002 0
Sum-Net 192.168.5.0 4.4.4.4 954 28 80000001 2
Sum-Net 192.168.45.0 4.4.4.4 1361 28 80000001 1
Sum-Net 192.168.12.0 2.2.2.2 1381 28 80000001 1
Sum-Net 192.168.1.0 2.2.2.2 964 28 80000001 2
Sum-Asbr 5.5.5.5 4.4.4.4 1308 28 80000001 1
Area: 0.0.0.12
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 1336 36 80000004 1
Router 1.1.1.1 1.1.1.1 927 48 80000008 1
Network 192.168.12.2 2.2.2.2 1336 32 80000002 0
Sum-Net 192.168.5.0 2.2.2.2 952 28 80000001 4
Sum-Net 192.168.45.0 2.2.2.2 1322 28 80000001 3
Sum-Net 192.168.23.0 2.2.2.2 1381 28 80000001 1
Sum-Net 192.168.34.0 2.2.2.2 1322 28 80000001 2
Sum-Asbr 5.5.5.5 2.2.2.2 1306 28 80000001 3
标签:first 一个 2.0 最短路径 负载 协议 console sum with
原文地址:http://blog.51cto.com/11806823/2325994