
配置:如圖A B 兩路由器原來通過E0/0 接口互聯(lián),192.168 網(wǎng)段為業(yè)務(wù)網(wǎng)段;172.16 網(wǎng)段為辦公網(wǎng)段,并運(yùn)行OSPF 協(xié)議?,F(xiàn)增加了一條低速的鏈路,想讓辦公網(wǎng)段走該鏈路,先欲用靜態(tài)路由的方法實(shí)現(xiàn)。配置如下:
A:
interface Ethernet0/0
ip address 10.0.0.1 255.255.255.252
#
interface Serial0/0
link-protocol ppp
ip address 10.0.0.5 255.255.255.252
#
interface LoopBack0
ip address 192.168.0.1 255.255.255.0
#
interface LoopBack1
ip address 172.16.0.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.0.0.1 0.0.0.0
network 172.16.0.0 0.0.0.255
network 192.168.0.0 0.0.0.255
#
ip route-static 172.16.1.0 255.255.255.0 10.0.0.6 preference 60
B:
interface Ethernet0/0
ip address 10.0.0.2 255.255.255.252
#
interface Serial0/0
clock DTECLK1
link-protocol ppp
ip address 10.0.0.6 255.255.255.252
#
interface LoopBack0
ip address 192.168.1.1 255.255.255.0
#
interface LoopBack1
ip address 172.16.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.0.0.2 0.0.0.0
network 172.16.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
#
ip route-static 172.16.0.0 255.255.255.0 10.0.0.5 preference 60
故障:查看路由表發(fā)現(xiàn)靜態(tài)輸入的條目并沒有添加。
[A]dis ip routing-table
Routing Table: public net

[A]
[B]dis ip routing-table
Routing Table: public net

[B]
分析:在H3C 中和CISCO 不同,H3C 中OSPF 域內(nèi)路由的優(yōu)先級(jí)是10,而靜態(tài)路由的優(yōu)先級(jí)默認(rèn)是60.這就造成了因優(yōu)先級(jí)不足,到時(shí)條目未能加入到全局路由表。修正靜態(tài)路由協(xié)議的優(yōu)先級(jí)后排除。
A:
#
ip route-static 172.16.1.0 255.255.255.0 10.0.0.6 preference 5
#
B:
#
ip route-static 172.16.0.0 255.255.255.0 10.0.0.6 preference 5
#


