Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ospf网络类型

根据不同的二层链路类型

广播多路访问网络(Broadcast Multi-Access)  以太网
NBMA  非广播多路访问 帧中继
P2MP 
P2P

224.0.0.5   所有运行ospf的接口都会监听
225.0.0.6   所有DR/BDR的接口会监听

​ ​ ​ [H3C]display ospf interface ​ [H3C-GigabitEthernet0/0/0]ospf network-type ? ​ display ospf statistics error ​ reset ospf process

ospf 报文类型 (五种)

邻接关系建立过程

// 2-way的前提
1. Router-id无冲突
2. 掩码长度一致
3. 区域id一致
4. 验证码一致
5. hello-time
6. dead-time

//full的前提
ospf的所有报文都不允许分片
1.mtu 不一致,会卡在exstart或exchange转态
2.网络类型 不一致,邻居状态FULL,但无法学习路由

常用配置

[H3C-GigabitEthernet0/0/0]ospf cost 100

router 
Network
Network Summary
ASBR Summary
AS External 
NSSA External

0. LSA header

//通用报文字段
LS Type
LS ID

1. router

	//3. 链路描述(可变长度,每条链路12 bytes)
	Link id (32 bits) 1.邻居Router ID 2.DR的接口ip地址 3. 网络ip地址 4. 虚链路对端Router-ID
	Link Data (32 bits) 接口ip或子网掩码
	link type  (8 bits) 1.P2P 2.Transit 3.Stub 4.Virtual Link
	#ToS  (8 bits)  Number of types of service (ToSs). 已弃用
	Metric	(16 bits)

2. network

1. Link State ID(32 bits) Interface IP address of the DR
2. Network Mask(32 bits) Mask of the broadcast or NBMA network
3. Attached Router(32 bits)  Router IDs of all devices on the broadcast or NBMA network, including the router ID of the DR

3. Summary

describes routes on a network segment in an area and is advertised to other related areas.

1. Network Mask (32 bits) Mask of the broadcast or NBMA network
2. Metric (24 bits)

查看命令

[H3C-GigabitEthernet0/0/0]ospf network-type ?

[H3C]display ospf lsdb
[H3C]display ospf lsdb router
<H3C>display ospf lsdb network
<H3C>display ospf lsdb summary

keyword

OSPF Packet Format
OSPF LSA Format
ospf router lsa packet format

references

https://support.huawei.com/enterprise/en/doc/EDOC1100262536/dd80564e/ospf-lsa-format