鞍山到岫岩:ospf实验配置2
来源:百度文库 编辑:中财网 时间:2024/04/30 12:32:38
OSPF接口状态信息,可以描述接口的各种OSPF时间参数,接口的网络类型和OSPF路由的具体信息。
R1#sh ip ospf interface 查询OSPF的接口信息
Serial1/0 is up, line protocol is up 接口是完全的UP的
Internet Address 199.99.1.1/24, Area 0 接口地址在区域0中
Process ID 100, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64
进程ID是100,路由ID是1.1.1.1,网络类型是点对点,开销为64
Transmit Delay is 1 sec, State POINT_TO_POINT,
LSA通告从路由器接口发送后经历的时间,以Transmit Delay显示,缺省值为1sec
传输的延迟是1秒
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello的间隔时间为10秒,死亡时间为40秒,等待时间为40秒,中继为5
Hello due in 00:00:08 Hello的正当时间
Index 2/2, flood queue length 0 泛洪队列为0,证明不是广播模式
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1 邻居只发现了一个
Adjacent with neighbor 2.2.2.2 邻居的ID
Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up 环回接口是UP
Internet Address 1.1.1.1/24, Area 0
Process ID 100, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host 环回接口是一个标准的末节主机,含义是后面不会有任何网络设备。
OSPF的中继列表
R1#sh ip ospf retransmission-list 查询R1所连接的中继路由器
OSPF Router with ID (1.1.1.1) (Process ID 100)
Neighbor 2.2.2.2, interface Serial1/0 address 199.99.1.2
OSPF的链路状态数据库的路由链路状态信息
更加详细的描述R1路由器的链路状态数据库中每一个学习到的路由信息的具体状态信息。
R1#sh ip ospf database router 查询OSPF的链路状态数据库的路由链路状态信息
OSPF Router with ID (1.1.1.1) (Process ID 100)
路由ID是1.1.1.1,进程ID是100
Router Link States (Area 0)
LS age: 1320 链路状态的老化是1320
Options: (No TOS-capability, DC)
LS Type: Router Links 链路类型是路由链路
Link State ID: 1.1.1.1 链路状态ID是1.1.1.1
Advertising Router: 1.1.1.1 路由的ID是1.1.1.1
LS Seq Number: 80000007 链路状态的标识符
Checksum: 0x78A7 校验值
Length: 60 长度
Number of Links: 3 链路更新次数
Link connected to: another Router (point-to-point) 链路连接其他路由器的信息,是点对点的链路
(Link ID) Neighboring Router ID: 2.2.2.2 邻居ID是2.2.2.2
Number of TOS metrics: 0
TOS 0 Metrics: 64 接口开销COST为64
Link connected to: a Stub Network 链路连接为一个末节网络,这个表示这个网络的内部不会有其他的网络设备。
(Link ID) Network/subnet number: 199.99.1.0 末节网络的网段为199.99.1.0
(Link Data) Network Mask: 255.255.255.0 掩码信息
Number of TOS metrics: 0
TOS 0 Metrics: 64 开销为64
Link connected to: a Stub Network 接口链路为末节网络
(Link ID) Network/subnet number: 1.1.1.1 环回接口
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1 开销为64
LS age: 1316
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: 80000006
Checksum: 0x8B63
Length: 84
Number of Links: 5
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 199.99.2.2
(Link Data) Router Interface address: 199.99.2.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 199.99.2.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 199.99.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 199.99.1.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 2.2.2.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
LS age: 1318
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 199.99.2.2
Advertising Router: 199.99.2.2
LS Seq Number: 80000004
Checksum: 0xCCF4
Length: 60
Number of Links: 3
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 199.99.2.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 199.99.2.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 3.3.3.3
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
调试Debug信息分析
学习计算机网络,如果想要更加深层次的学习和掌握技能,就必须学会查看debug信息,这个是目前唯一的可以看到路由协议走向的查询工具。
R1#debug ip ospf adj 开始OSPF的邻居信息的debug
OSPF adjacency events debugging is on
R1#clear ip ospf process 重新启动OSPF的邻居计算
Reset ALL OSPF processes? [no]: y
R1#
01:12:04: OSPF: Interface Serial1/0 going Down 接口重置为down
01:12:04: OSPF: 1.1.1.1 address 199.99.1.1 on Serial1/0 is dead, state DOWN
01:12:04: OSPF: 2.2.2.2 address 199.99.1.2 on Serial1/0 is dead, state DOWN
01:12:04: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/0 from FULL to DOWN, Neighbor Down: Interface down or detached
R1#
01:12:04: OSPF: Interface Loopback0 going Down
01:12:04: OSPF: 1.1.1.1 address 1.1.1.1 on Loopback0 is dead, state DOWN
01:12:04: OSPF: Interface Serial1/0 going Up 接口开始UP
01:12:04: OSPF: Interface Loopback0 going Up
01:12:05: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000001 本地路由ID的计算和进程序列号的计算
R1#
01:12:08: OSPF: 2 Way Communication to 2.2.2.2 on Serial1/0, state 2WAY 路由OSPF计算的2WAY状态
01:12:08: OSPF: Send DBD to 2.2.2.2 on Serial1/0 seq 0x1968 opt 0x42 flag 0x7 len 32 发送自己的DBD数据库给邻居
01:12:08: OSPF: Rcv DBD from 2.2.2.2 on Serial1/0 seq 0x2234 opt 0x42 flag 0x7
收到对发的DBD数据库消息,包含了数据库的进程序列号,类型字段和标记
len 32 mtu 1500 state EXSTART 进入起始状态
01:12:08: OSPF: NBR Negotiation Done. We are the SLAVE 跟邻居彼此选举出主和从属的关系,这个关系关系到谁更新谁。
01:12:08: OSPF: Send DBD to 2.2.2.2 on Serial1/0 seq 0x2234 opt 0x42 flag 0x2 len 52
01:12:08: OSPF: Rcv DBD from 2.2.2.2 on Serial1/0 seq 0x2235 opt 0x42 flag 0x3 len 72 mtu 1500 state EXCHANGE
01:12:08: OSPF: Send DBD to 2.2.2.2 on Serial1/0 seq 0x2235 opt 0x42 flag 0x0 len 32
01:12:08: OSPF: Database request to 2.2.2.2 数据请求
01:12:08: OSPF: sent LS REQ packet to 199.99.1.2, length 24
01:12:08: OSPF: Rcv DBD from 2.2.2.2 on Serial1/0 seq 0x2236 opt 0x42 flag 0x1 len 32 mtu 1500 state EXCHANGE 状态变更为交换状态
01:12:08: OSPF: Exchange Done with 2.2.2.2 on Serial1/0
01:12:08: OSPF: Send DBD to 2.2.2.2 on Serial1/0 seq 0x2236 opt 0x42 flag 0x0 len 32
01:12:08: OSPF: Synchroni 彼此完成同步
R1#zed with 2.2.2.2 on Serial1/0, state FULL 完整状态
01:12:08: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/0 from LOADING to FULL, Loading Done
R1#
01:12:11: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000002