现场一台S7503E设备,上行配置OSPF 2,下行配置OSPF 1,组网简化图如下:
现场在S7503E上正常和上下行设备建立了OSPF 1和OSPF 2,邻居建立正常,之后配置将OSPF 1的路由引入到OSPF 2 中:
#
ospf 1
area 0.0.0.0
network 10.203.2.12 0.0.0.3
network 10.203.2.25 0.0.0.0
#
ospf 2
import-route ospf 1
area 0.0.0.0
network 10.203.2.29 0.0.0.0
network 10.203.10.0 0.0.0.255
#
设备间邻居建立正常,但查看OSPF路由,在OSPF 2中没有看到OSPF 1中的路由,现场认为路由引入失败:
[R3_1_26U_SW_S7503E_01]dis ospf rou
OSPF Process 1 with Router ID 10.203.2.25
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
10.203.4.0/24 4 Stub 10.203.2.13 10.203.14.254 0.0.0.0
10.203.5.0/24 4 Stub 10.203.2.13 10.203.14.254 0.0.0.0
10.203.6.0/24 4 Stub 10.203.2.13 10.203.14.254 0.0.0.0
10.203.6.1/32 3 Stub 10.203.2.13 10.203.6.1 0.0.0.0
10.203.6.2/32 3 Stub 10.203.2.13 10.203.6.2 0.0.0.0
10.203.6.3/32 2 Stub 10.203.2.13 10.203.3.3 0.0.0.0
10.203.6.4/32 1 Stub 10.203.2.13 10.203.2.5 0.0.0.0
10.203.6.5/32 3 Stub 10.203.2.13 10.203.2.9 0.0.0.0
10.203.9.0/24 2 Stub 10.203.2.26 10.203.9.254 0.0.0.0
10.203.11.0/24 3 Stub 10.203.2.13 10.203.3.3 0.0.0.0
10.203.1.1/32 3 Stub 10.203.2.13 10.203.6.1 0.0.0.0
10.203.1.2/32 3 Stub 10.203.2.13 10.203.6.2 0.0.0.0
10.203.1.3/32 2 Stub 10.203.2.13 10.203.3.3 0.0.0.0
10.203.2.0/30 3 Transit 10.203.2.13 10.203.14.254 0.0.0.0
10.203.2.4/30 2 Transit 10.203.2.13 10.203.2.5 0.0.0.0
10.203.2.8/30 3 Transit 10.203.2.13 10.203.3.3 0.0.0.0
10.203.2.12/30 1 Transit 0.0.0.0 10.203.2.5 0.0.0.0
10.203.2.16/30 3 Transit 10.203.2.13 10.203.6.1 0.0.0.0
10.203.2.20/30 3 Transit 10.203.2.13 10.203.6.2 0.0.0.0
10.203.2.24/30 1 Transit 0.0.0.0 10.203.9.254 0.0.0.0
Total nets: 20
Intra area: 20 Inter area: 0 ASE: 0 NSSA: 0
OSPF Process 2 with Router ID 10.203.2.25
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
10.203.10.0/24 1 Transit 0.0.0.0 10.203.11.1 0.0.0.0
10.203.2.28/30 1 Transit 0.0.0.0 10.203.9.254 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
0.0.0.0/0 1 Type2 1 10.203.2.30 10.203.9.254
192.100.100.5/32 1 Type2 5000 10.203.10.1 10.203.11.1
192.100.100.8/32 1 Type2 0 10.203.10.1 10.203.11.1
Total nets: 5
Intra area: 2 Inter area: 0 ASE: 3 NSSA: 0
(1)
[R3_1_26U_SW_S7503E_01]dis ospf lsdb
OSPF Process 1 with Router ID 10.203.2.25
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.203.2.9 10.203.2.9 836 48 80000468 0
Router 10.203.2.5 10.203.2.5 1376 60 800002BE 0
Router 10.203.2.25 10.203.2.25 1375 48 8000001A 0
Router 10.203.3.3 10.203.3.3 1222 120 80000532 0
Router 10.203.6.2 10.203.6.2 96 60 80000339 0
Router 10.203.6.1 10.203.6.1 1032 60 8000033F 0
Router 10.203.14.254 10.203.14.254 1088 72 80000213 0
Router 10.203.9.254 10.203.9.254 1383 48 80000011 0
Network 10.203.2.13 10.203.2.5 1372 32 800001A5 0
Network 10.203.2.10 10.203.3.3 104 32 800000E2 0
Network 10.203.2.5 10.203.2.5 854 32 8000029C 0
Network 10.203.2.1 10.203.14.254 962 32 80000208 0
Network 10.203.2.26 10.203.9.254 1369 32 80000008 0
Network 10.203.2.21 10.203.6.2 96 32 80000330 0
Network 10.203.2.17 10.203.6.1 556 32 8000010E 0
OSPF Process 2 with Router ID 10.203.2.25
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.203.11.1 10.203.11.1 1375 36 800002B3 0
Router 10.203.2.25 10.203.2.25 483 48 80000015 0
Router 10.203.9.254 10.203.9.254 1377 36 80000016 0
Network 10.203.2.30 10.203.9.254 1369 32 8000000A 0
Network 10.203.10.1 10.203.11.1 1367 32 80000013 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 10.203.6.5 10.203.2.25 485 36 80000005 1
External 10.203.6.4 10.203.2.25 485 36 80000005 1
External 10.203.6.1 10.203.2.25 485 36 80000005 1
External 10.203.6.0 10.203.2.25 485 36 80000005 1
External 10.203.6.3 10.203.2.25 485 36 80000005 1
External 10.203.6.2 10.203.2.25 485 36 80000005 1
External 10.203.4.0 10.203.2.25 485 36 80000005 1
External 10.203.5.0 10.203.2.25 485 36 80000005 1
External 10.203.2.20 10.203.2.25 485 36 80000005 1
External 10.203.2.16 10.203.2.25 485 36 80000005 1
External 10.203.2.8 10.203.2.25 485 36 80000005 1
External 10.203.2.4 10.203.2.25 485 36 80000005 1
External 10.203.2.0 10.203.2.25 485 36 80000005 1
External 10.203.1.1 10.203.2.25 485 36 80000005 1
External 10.203.1.3 10.203.2.25 485 36 80000005 1
External 10.203.1.2 10.203.2.25 485 36 80000005 1
External 10.203.11.0 10.203.2.25 483 36 80000005 1
External 10.203.9.0 10.203.2.25 483 36 80000005 1
External 0.0.0.0 10.203.9.254 1477 36 80000006 1
External 192.100.100.8 10.203.11.1 1091 36 80000036 1
External 192.100.100.5 10.203.11.1 579 36 80000036 1
External 10.203.10.0 10.203.11.1 119 36 80000295 1 5
怀疑其实路由已经成功引入了,只是由于路由优选没有加到本台设备的OSPF 2路由表中。
(2)
(3)
E#
ospf 1
area 0.0.0.0
network 10.0.0.0 0.0.0.255
#
ospf 2
import-route ospf 1
area 0.0.0.0
network 20.0.0.0 0.0.0.255
#
在SW1上查看路由信息如下:
[SW1]dis ospf routing
OSPF Process 1 with Router ID 20.0.0.1
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
10.0.0.0/24 1 Transit 0.0.0.0 20.0.0.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
2.2.2.2/32 1 Type2 1 10.0.0.2 2.2.2.2
Total nets: 2
Intra area: 1 Inter area: 0 ASE: 1 NSSA: 0
OSPF Process 2 with Router ID 20.0.0.1
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
20.0.0.0/24 1 Transit 0.0.0.0 20.0.0.2 0.0.0.0
Total nets: 1
Intra area: 1 Inter area: 0 ASE: 0 NSSA: 0 1
[SW1]dis ip routing-table
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 O_ASE2 150 1 10.0.0.2 Vlan10
10.0.0.0/24 Direct 0 0 10.0.0.1 Vlan10
10.0.0.0/32 Direct 0 0 10.0.0.1 Vlan10
10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.255/32 Direct 0 0 10.0.0.1 Vlan10
20.0.0.0/24 Direct 0 0 20.0.0.1 Vlan20
20.0.0.0/32 Direct 0 0 20.0.0.1 Vlan20
20.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.1 Vlan20
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[SW1]dis ospf lsdb
OSPF Process 1 with Router ID 20.0.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 14 36 80000005 0
Router 20.0.0.1 20.0.0.1 1689 36 80000003 0
Network 10.0.0.1 20.0.0.1 1688 32 80000002 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 10.0.0.0 2.2.2.2 52 36 80000002 1
External 2.2.2.2 2.2.2.2 52 36 80000002 1
OSPF Process 2 with Router ID 20.0.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 20.0.0.2 20.0.0.2 18 36 80000005 0
Router 20.0.0.1 20.0.0.1 1692 36 80000003 0
Network 20.0.0.2 20.0.0.2 18 32 80000002 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 2.2.2.2 20.0.0.1 1688 36 80000001 1
在模拟器上的实验现象与现场一致,此时在SW3上查看路由表:
[SW3]dis ip routing-table
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 O_ASE2 150 1 20.0.0.1 Vlan20
20.0.0.0/24 Direct 0 0 20.0.0.2 Vlan20
20.0.0.0/32 Direct 0 0 20.0.0.2 Vlan20
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 Vlan20
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[SW3]dis ospf routing
OSPF Process 2 with Router ID 20.0.0.2
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
20.0.0.0/24 1 Transit 0.0.0.0 20.0.0.2 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
2.2.2.2/32 1 Type2 1 20.0.0.1 20.0.0.1
Total nets: 2
Intra area: 1 Inter area: 0 ASE: 1 NSSA: 0
SW3上已经有了OSPF 1中的路由,说明路由已经成功引入了。
(4)
该问题为正常现象,OSPF 1的LSA已经引到了OSPF 2中,OSPF 2的对端设备也能学习到引入的路由,引入的路由可以在本设备的LSDB中看到。
附:相关思考:
在SW3上虽然学到了2.2.2.2的路由,但从SW3 ping 2.2.2.2是ping不通的,因为只有去的路由没有回程的路由,此时需要在SW2上写一条回程的静态路由即可。
[SW3]ping 2.2.2.2
Ping 2.2.2.2 (2.2.2.2): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- Ping statistics for 2.2.2.2 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Mar 5 15:46:00:790 2020 H3C PING/6/PING_STATISTICS: Ping statistics for 2.2.2.2: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.
20.0.0.0/24 Static 60 0 10.0.0.1 Vlan10---SW2上加的静态
那回程路由是否可以直接通过将OSPF 2 的路由也引入到OSPF 1中来实现呢?
经过试验发现是不可以的,在SW1上配置OSPF 1 中也引入OSPF 2中的路由:
#
ospf 1
import-route ospf 2
area 0.0.0.0
network 10.0.0.0 0.0.0.255
#
查看路由表相关信息如下:
[SW1]dis ospf routing
OSPF Process 1 with Router ID 20.0.0.1
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
10.0.0.0/24 1 Transit 0.0.0.0 20.0.0.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
2.2.2.2/32 1 Type2 1 10.0.0.2 10.0.0.2
Total nets: 2
Intra area: 1 Inter area: 0 ASE: 1 NSSA: 0
OSPF Process 2 with Router ID 20.0.0.1
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
20.0.0.0/24 1 Transit 0.0.0.0 20.0.0.2 0.0.0.0
Total nets: 1
Intra area: 1 Inter area: 0 ASE: 0 NSSA: 0
[SW1]dis ospf lsdb
OSPF Process 1 with Router ID 20.0.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.0.2 10.0.0.2 220 36 80000003 0
Router 2.2.2.2 2.2.2.2 1636 36 80000005 0
Router 20.0.0.1 20.0.0.1 42 36 8000000B 0
Network 10.0.0.1 20.0.0.1 219 32 80000001 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 10.0.0.0 10.0.0.2 260 36 80000001 1
External 10.0.0.0 2.2.2.2 1674 36 80000002 1
External 2.2.2.2 10.0.0.2 195 36 80000001 1
OSPF Process 2 with Router ID 20.0.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 20.0.0.2 20.0.0.2 1640 36 80000005 0
Router 20.0.0.1 20.0.0.1 1611 36 80000004 0
Network 20.0.0.2 20.0.0.2 1640 32 80000002 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 2.2.2.2 20.0.0.1 194 36 80000001 1
[SW1]dis ip routing-table
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 O_ASE2 150 1 10.0.0.2 Vlan10
10.0.0.0/24 Direct 0 0 10.0.0.1 Vlan10
10.0.0.0/32 Direct 0 0 10.0.0.1 Vlan10
10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.255/32 Direct 0 0 10.0.0.1 Vlan10
20.0.0.0/24 Direct 0 0 20.0.0.1 Vlan20
20.0.0.0/32 Direct 0 0 20.0.0.1 Vlan20
20.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.1 Vlan20
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[SW2]dis ip routing-table
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 Direct 0 0 10.0.0.2 Vlan10
10.0.0.0/32 Direct 0 0 10.0.0.2 Vlan10
10.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.255/32 Direct 0 0 10.0.0.2 Vlan10
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
---SW2中并没有到20网段的路由,在OSPF 1的lsa中也没有发布20网段的路由,同样OSPF 2的lsa中也没有10网段的路由
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作