本文档说明通过点对多点链路相连的两个开放最短路径优先 (OSPF) 路由器。
本文档没有任何特定的要求。
本文档不限于特定的软件和硬件版本。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
本部分提供有关如何配置本文档所述功能的信息。
注意:使用命令查找工具(仅限注册客户)可查找有关本文档中使用的命令的详细信息。
本文档使用以下网络设置:
本文档使用以下配置:
路由器 1.1.1.1 |
---|
Current configuration: hostname r1.1.1.1 interface Loopback0 ip address 1.1.1.1 255.0.0.0 interface Ethernet2/0/0 ip address 4.0.0.1 255.0.0.0 interface Serial2/1/0 ip address 5.0.0.1 255.0.0.0 ip ospf network point-to-multipoint router ospf 1 network 4.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
路由器 2.2.2.2 |
---|
Current configuration: hostname r2.2.2.2 interface Loopback0 ip address 2.2.2.2 255.0.0.0 interface Ethernet0/0/4 ip address 6.0.0.2 255.0.0.0 interface Serial2/1/0 ip address 5.0.0.2 255.0.0.0 ip ospf network point-to-multipoint router ospf 2 network 6.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
本部分所提供的信息可用于确认您的配置是否正常工作。
命令输出解释程序(仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。
show ip ospf database -显示Link State Advertisement (LSA)列表并且键入他们到连结状态数据库。此列表仅显示 LSA 报头中的信息。
show ip ospf database [router] [link-state-id] -显示在数据库中的一台路由器所有的LSA列表。LSA是由每个路由器生产的。这些基本LSA列出所有路由器链路或接口,以及状态和链路流出的开销。他们应只在产生的区内被泛洪。
要查看给定此网络环境下OSPF数据库的外观,请查看show ip ospf database命令的输出。
r2.2.2.2#show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 206 0x8000000A 0x158C 3 2.2.2.2 2.2.2.2 206 0x8000000B 0x791 3 r2.2.2.2#show ip ospf database router 1.1.1.1 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 224 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.1 !--- For router links, Link State Id is always the same !--- as the Advertising Router (next line). Advertising Router: 1.1.1.1 !--- This is the router ID of the router that created !--- this LSA. LS Seq Number: 8000000A Checksum: 0x158C Length: 60 Number of Links: 3 Link connected to: another Router (point-to-point) !--- This line shows that this router(1.1.1.1) is a !--- neighbor with 2.2.2.2. (Link ID) Neighboring Router ID: 2.2.2.2 (Link Data) Router Interface address: 5.0.0.1 !--- This line shows the interface on this router !--- (1.1.1.1) that connects the neighbor (2.2.2.2). Number of TOS metrics: 0 TOS 0 Metrics: 64 !--- The OSPF cost of the link is 64. Link connected to: a Stub Network !--- This router's (1.1.1.1) interface on the !--- point-to-multipoint network. (Link ID) Network/subnet number: 5.0.0.1 (Link Data) Network Mask: 255.255.255.255 !--- Notice the mask. Only the interface is advertised, !--- not the whole subnet. Number of TOS metrics: 0 TOS 0 Metrics: 0 !--- The OSPF cost for this router to reach its !--- own interface is zero. Link connected to: a Stub Network !--- Represents the subnet of the Ethernet segment 4.0.0.0/8. (Link ID) Network/subnet number: 4.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 !--- The cost of the link is 10. r2.2.2.2#show ip ospf database router 2.2.2.2 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 253 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 8000000B Checksum: 0x791 Length: 60 Number of Links: 3 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 1.1.1.1 (Link Data) Router Interface address: 5.0.0.2 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 5.0.0.2 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 0 Link connected to: a Stub Network (Link ID) Network/subnet number: 6.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10
此部分从Router2.2.2.2的角度计算最短路径树。
Router2.2.2.2在其自己的LSA中查找,发现Router1.1.1.1是邻居。路由器2.2.2.2查看1.1.1.1的路由器LSA,以检验1.1.1.1是否将2.2.2.2视为邻居。如果两个路由器互相看见作为邻居,则他们被认为可及的。
每台路由器还检查其本地邻居表(您可以使用show ip ospf neighbor命令检查它),以验证其接口和邻居的接口是否位于公共IP子网中。如果是,路由器会为邻居的路由器LSA中列出的任何末节网络安装路由。
在本例中,Router 2.2.2.2 保存了到4.0.0.0/8的路由在其路由表中,因为Router 1.1.1.1列出4.0.0.0/8在其自己的路由器LSA中作为一个末端网络。路由器1.1.1.1还将5.0.0.1/32列为末节,即它在点对多点网络上的接口。因此,Router 2.2.2.2在其路由表中为5.0.0.1/32安装了OSPF路由。
Router 2.2.2.2#show ip route ospf O 4.0.0.0/8 [110/74] via 5.0.0.1, 00:09:26, Serial0/1/0 O 5.0.0.1/32 [110/64] via 5.0.0.1, 00:09:26, Serial0/1/0 Router 1.1.1.1#show ip route ospf O 6.0.0.0/8 [110/74] via 5.0.0.2, 00:00:49, Serial2/1/0 O 5.0.0.2/32 [110/64] via 5.0.0.2, 00:00:49, Serial2/1/0
目前没有针对此配置的故障排除信息。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
10-Aug-2005 |
初始版本 |