修改OSPF 开销,实现数据来回路径一致
未配置前,路由表有多条路径
[R1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 37 Routes : 43
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 13.1.1.2 GigabitEthernet
1/0/0
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
1.1.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
4.4.4.4/32 OSPF 10 1 D 14.1.1.2 GigabitEthernet
2/0/0
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/2
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
13.1.1.0/24 Direct 0 0 D 13.1.1.1 GigabitEthernet
1/0/0
13.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
1/0/0
13.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
1/0/0
14.1.1.0/24 Direct 0 0 D 14.1.1.1 GigabitEthernet
2/0/0
14.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
2/0/0
14.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
2/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.2.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.3.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.3.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.4.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.4.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.5.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.5.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.6.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.6.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.8.0/24 Direct 0 0 D 192.168.8.1 GigabitEthernet
0/0/0
192.168.8.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.8.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.23.0/24 Direct 0 0 D 192.168.23.1 GigabitEthernet
0/0/1
192.168.23.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.23.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.100.0/24 OSPF 10 2 D 14.1.1.2 GigabitEthernet
2/0/0
192.168.200.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.200.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[R1]
配置SVI OSPF开销值
[HX_SW1-Vlanif2]int vlanif 4
[HX_SW1-Vlanif4]ospf cost 4
[HX_SW1-Vlanif4]int vlanif 5
[HX_SW1-Vlanif5]ospf cost 4
[HX_SW1-Vlanif5]int vlanif 6
[HX_SW1-Vlanif6]ospf cost 4
---------
[HX_SW2]int vlanif 2
[HX_SW2-Vlanif2]ospf cost 4
[HX_SW2-Vlanif2]int vlanif 3
[HX_SW2-Vlanif3]ospf cost 4
[HX_SW2-Vlanif3]int vlanif 200
[HX_SW2-Vlanif200]ospf cost 4
配置OSPF开销后
[R1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 37 Routes : 37
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 13.1.1.2 GigabitEthernet
1/0/0
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
1.1.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
4.4.4.4/32 OSPF 10 1 D 14.1.1.2 GigabitEthernet
2/0/0
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/2
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
13.1.1.0/24 Direct 0 0 D 13.1.1.1 GigabitEthernet
1/0/0
13.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
1/0/0
13.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
1/0/0
14.1.1.0/24 Direct 0 0 D 14.1.1.1 GigabitEthernet
2/0/0
14.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
2/0/0
14.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
2/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.2.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.3.0/24 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.3.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.4.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.4.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.5.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.5.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.6.0/24 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.6.1/32 OSPF 10 2 D 192.168.23.2 GigabitEthernet
0/0/1
192.168.8.0/24 Direct 0 0 D 192.168.8.1 GigabitEthernet
0/0/0
192.168.8.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.8.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.23.0/24 Direct 0 0 D 192.168.23.1 GigabitEthernet
0/0/1
192.168.23.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.23.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.100.0/24 OSPF 10 2 D 14.1.1.2 GigabitEthernet
2/0/0
192.168.200.0/24 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
192.168.200.1/32 OSPF 10 2 D 192.168.8.2 GigabitEthernet
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0