Cisco OSPF 数据包类型指南

注:机翻,未校对。


OSPF Packet Types: The Ultimate Guide 2024

OSPF Packet Types OSPF 数据包类型

There are five types of OSPF packets, namely- Hello, Database description, Link-state request, Link-state update and Link-state acknowledgement. Let’s discuss all these OSPF packet types in detail:
OSPF报文有五种类型,分别是Hello、数据库描述、链路状态请求、链路状态更新和链路状态确认。让我们详细讨论所有这些 OSPF 数据包类型:

img

1. THE HELLO PACKET : 1. hello包:

ospf-packet-types

The hello packets are sent over a period of time on all interfaces for the purpose of establishing and maintaining neighbour relationships. Hello packets are multicast on the networks having multicast capability, which enables discovery of neighboring routers dynamically. The inhabitance of differences among hello packets can form neighbor relationships by agreeing certain parameters.
hello数据包在一段时间内在所有接口上发送,目的是建立和维护邻居关系。Hello 数据包是具有组播功能的网络上的组播,可以动态发现相邻路由器。hello数据包之间差异的驻留可以通过同意某些参数来形成邻居关系。

The purpose of Hello protocol can be summarized as follows:
Hello协议的目的可以概括为以下几点:

  • Hello packets are used to discover OSPF neighbours.
    Hello 数据包用于发现 OSPF 邻居。
  • Hello packets advertise certain parameters (some of the must match in order to become the router’s neighbor).
    Hello 数据包通告某些参数(其中一些参数必须匹配才能成为路由器的邻居)。
  • On Broadcast or NBMA networks Hello packets are used to elect DR/BDR roles.
    在广播或 NBMA 网络上,Hello 数据包用于选择 DR/BDR 角色。
  • Hello packets are used as a keepalive mechanism. If the router does not hear the neighbors’ Hello packets in a given time (DeadInterval), it considers it down and invalidates information obtained from it.
    Hello 数据包用作 keepalive 机制。如果路由器在给定时间 (DeadInterval) 内未听到邻居的 Hello 数据包,则认为该数据包已关闭并使从中获得的信息无效。
  • Hello packets ensure bidirectional communication. The router must see its own RouterID in the ‘neighbor’ field of the Hello packet it receives.
    Hello 数据包确保双向通信。路由器必须在它收到的 Hello 数据包的“neighbor”字段中看到自己的 RouterID。

The Hello Packet Structure and fields information is detailed below –
Hello 数据包结构和字段信息详述如下 –

ospf-packet-types

  • Network Mask is the address mask of the interface from which the packet was sent. If this mask does not match the mask of the interface on which the packet is received, the packet will be dropped. This technique ensures that routers become neighbors only if they agree on the exact address of their shared network.
    网络掩码是发送数据包的接口的地址掩码。如果此掩码与接收数据包的接口的掩码不匹配,则数据包将被丢弃。这种技术可确保路由器只有在就其共享网络的确切地址达成一致时才成为邻居。
  • Hello Interval, as discussed earlier, is the period, in seconds, between transmissions of Hello packets on the interface. If the sending and receiving routers don’t have the same value for this parameter, they do not establish a neighbor relationship.
    如前所述,Hello 间隔是接口上传输 Hello 数据包之间的时间间隔(以秒为单位)。如果发送路由器和接收路由器的此参数值不同,则它们不会建立邻居关系。
  • Options are described in “Options Field,” later in this chapter. This field is included in the Hello packet to ensure that neighbors have compatible capabilities. A router might reject a neighbor because of a capabilities mismatch.
    本章后面的“选项字段”中将对选项进行介绍。此字段包含在 Hello 数据包中,以确保邻居具有兼容的功能。路由器可能会因为功能不匹配而拒绝邻居。
  • Router Priority is used in the election of the DR and BDR. If set to zero, the originating router is ineligible to become the DR or BDR.
    路由器优先级用于 DR 和 BDR 的选举。如果设置为零,则原始路由器没有资格成为 DR 或 BDR。
  • Router Dead Interval is the number of seconds the originating router will wait for a Hello from a neighbor before declaring the neighbor dead. If a Hello is received in which this number does not match the Router Dead Interval of the receiving interface, the packet is dropped. This technique ensures that neighbors agree on this parameter.
    路由器死区间隔是原始路由器在宣布邻居失效之前等待邻居的 Hello 的秒数。如果收到的 Hello 中,此数字与接收接口的 Router Dead Interval 不匹配,则数据包将被丢弃。此技术可确保邻居在此参数上达成一致。
  • Designated Router is the IP address of the interface of the DR on the network (not its Router ID). During the DR election process, this may only be the originating router’s idea of the DR, not the finally elected DR. If there is no DR (because one has not been elected or because the network type does not require DRs), this field is set to 0.0.0.0.
    指定路由器是网络上 DR 接口的 IP 地址(而不是其路由器 ID)。在 DR 选举过程中,这可能只是原始路由器对 DR 的想法,而不是最终当选的 DR。如果没有 DR(因为尚未当选 DR 或因为网络类型不需要 DR),则此字段设置为 0.0.0.0。
  • Backup DR is the IP address of the interface of the BDR on the network. Again, during the DR election process, this may only be the originating router’s idea of the BDR. If there is no BDR, this field is set to 0.0.0.0.
    备份 DR 是网络上 BDR 接口的 IP 地址。同样,在 DR 选举过程中,这可能只是原始路由器对 BDR 的想法。如果没有 BDR,则此字段设置为 0.0.0.0。
  • Neighbor is a recurring field that lists all RIDs of all neighbors on the network from which the originating router has received a valid Hello in the past Router Dead Interval.
    Neighbor 是一个重复字段,它列出了网络上所有邻居的所有 RID,源路由器在过去路由器死区期间从中接收了有效的 Hello。

Note – The fields Area ID, Hello Interval, Router Dead Interval and Authentication information (AuType & Authentication) should match on neighbors to form adjacency. For example, when the Hello interval is changed on a router, the receiving router does not accept the Hello packet due to mismatch of Hello timer.
注 – Area ID、Hello Interval、Router Dead Interval 和 Authentication information(AuType & Authentication)字段应在邻居上匹配以形成邻接关系。例如,当路由器上的 Hello 间隔发生变化时,由于 Hello 计时器不匹配,接收路由器不接受 Hello 数据包。

2. THE DATABASE DESCRIPTION PACKET : 2. 数据库描述包:

ospf-packet-types

At the time of adjacency is being initialized, these packets are exchanged. These packets describe topological database contents. The database may be described by using multiple packets. A poll-response procedure is used for the description of multiple packets usage. Among the routers, one is designated to be master, and the other a slave. The Database Description packets are sent by the slave after sending the Database Description packets by the master.
在初始化邻接关系时,将交换这些数据包。这些数据包描述拓扑数据库内容。可以使用多个数据包来描述数据库。轮询响应过程用于描述多个数据包的使用情况。在路由器中,一个被指定为主路由器,另一个被指定为从路由器。数据库描述报文由主服务器发送数据库描述报文后由从站发送。

The Database Description Packet Structure and fields information is detailed below –
数据库描述数据包结构和字段信息详述如下 –

ospf-packet-types

  • Interface MTU is the size, in octets, of the largest IP packet that can be sent out the originator’s interface without fragmentation. This field is set to 0x0000 when the packet is sent over virtual links.
    接口 MTU 是最大 IP 数据包的大小(以八位字节为单位),该数据包可以从发起方的接口发出而不会分段。当数据包通过虚拟链路发送时,此字段设置为0x0000。
  • Options are described in “Options Field,” later in this chapter. The field is included in the Database Description packet so that a router may choose not to forward certain LSAs to a neighbor that doesn’t support the necessary capabilities.
    本章后面的“选项字段”中将对选项进行介绍。该字段包含在数据库描述数据包中,以便路由器可以选择不将某些 LSA 转发到不支持必要功能的邻居。
  • The first five bits of the next octet are unused and are always set to 00000b.
    下一个八位字节的前五位未使用,并且始终设置为 00000b。
  • I-bit, or Initial bit, is set to 1 when the packet is the initial packet in series of DD packets. Subsequent DD packets have I-bit = 0.
    当数据包是 DD 数据包系列中的初始数据包时,I 位或初始位设置为 1。后续 DD 数据包的 I 位 = 0。
  • M-bit, or More bit, is set to 1 to indicate that the packet is not the last in a series of DD packets. The last DD packet has M-bit = 0.
    M 位或更多位设置为 1 表示数据包不是一系列 DD 数据包中的最后一个。最后一个 DD 数据包的 M 位 = 0。
  • MS-bit, or Master/Slave bit, is set to 1 to indicate that the originator is the master (that is, is in control of the polling process) during a database synchronization. The slave has MS-bit = 0.
    MS 位或主/从位设置为 1,表示在数据库同步期间,发起方是主节点(即控制轮询过程)。从机的 MS 位 = 0。
  • DD Sequence Number ensures that the full sequence of DD packets is received in the database synchronization process. The sequence number is set by the master to some unique value in the first DD packet, and the sequence is incremented in subsequent packets.
    DD序列号保证在数据库同步过程中接收到DD报文的完整序列。序列号由主机在第一个 DD 数据包中设置为某个唯一值,并且该序列在后续数据包中递增。
  • LSA Headers list some or all of the headers of the LSAs in the originator’s link-state database. See the section “Link State Header,” for a full description of the LSA header; the header contains enough information to uniquely identify the LSA and the particular instance of the LSA.
    LSA 标头列出了发起方的链接状态数据库中 LSA 的部分或全部标头。有关 LSA 标头的完整说明,请参阅“链接状态标头”部分;标头包含足够的信息来唯一标识 LSA 和 LSA 的特定实例。

3. THE LINK STATE REQUEST PACKET: 3. 链路状态请求数据包:

ospf-packet-types

A router may find the parts of its topological database are out of date, after database description package exchange with a neighboring router. The Link State Request packet is utilized for requesting the pieces of the neighbor’s database which are more up to date. There may be a need to utilize multiple Link State Request packets.
在与相邻路由器交换数据库描述包后,路由器可能会发现其拓扑数据库的部分已过期。链路状态请求数据包用于请求邻居数据库中更新的部分。可能需要使用多个链路状态请求数据包。

The Link State Request Packet Structure and fields information is detailed below –ospf-packet-types
链路状态请求数据包结构和字段信息详述如下 –

  • Link State Type is the LS type number, which identifies the LSA as a Router LSA, Network LSA, and so on. Type numbers are listed in Table 8-4.
    链路状态类型是 LS 类型编号,用于将 LSA 标识为路由器 LSA、网络 LSA 等。型号列于表 8-4 中。
  • Link State ID is a type-dependent field of the LSA header. See the section “Link State Header” and the LSA-specific sections for a full description of how the various LSAs use this field.
    链接状态 ID 是 LSA 标头的类型相关字段。请参阅“链接状态标头”部分和特定于 LSA 的部分,了解各种 LSA 如何使用此字段的完整说明。
  • Advertising Router is the Router ID of the router that originated the LSA.
    Advertising Router 是发起 LSA 的路由器的路由器 ID。

4. THE LINK STATE UPDATE PACKETS: 4. 链路状态更新数据包:

ospf-packet-types

The Link State Update Packet Structure and fields information is detailed below
链路状态更新数据包结构和字段信息详见下文 –

ospf-packet-types

  • Number of LSAs specifies the number of LSAs included in this packet.
    Number of LSA 指定此数据包中包含的 LSA 数量。
  • LSAs are the full LSAs as described in OSPF LSA formats. Each update can carry multiple LSAs, up to the maximum packet size allowed on the link.
    LSA 是 OSPF LSA 格式中所述的完整 LSA。每个更新都可以携带多个 LSA,最多不超过链路上允许的最大数据包大小。

5. THE LINK STATE ACKNOWLEDGE PACKETS: 5. 链路状态确认数据包:

ospf-packet-types

The reliability of flooding link state advertisement is made by explicitly acknowledging flooded advertisements. The accomplishment of this acknowledgement is done through the sending and receiving of Link Sate Acknowledgement packets. A single Link State Acknowledgement packet is used to acknowledge the multiple link state advertisements.
泛洪链路状态通告的可靠性是通过明确确认泛洪通告来实现的。此确认的实现是通过发送和接收 Link Sate 确认数据包来完成的。单个链路状态确认数据包用于确认多个链路状态通告。

The Link State Acknowledge Packet Structure and fields information is detailed below –
链路状态确认数据包结构和字段信息详述如下 –

img

  • LSA Header is List of LSA Headers being acknowledged.
    LSA 标头是要确认的 LSA 标头的列表。

via:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值