HCNP the principle and configuration of OSPF protocol for Learning Notes 3-establishment of a neighbor relationship

Source: Internet
Author: User

The neighbor relationship of the OSPF protocol is established by exchanging the Hello message, so we first understand the type of the message and the structure of the Hello message.


1 OSPF protocol has 5 protocol messages (very important, which are described in turn)


Hello message: for discovering and maintaining neighborhood relationships, hello messages on broadcast networks and NBMA networks are also used to elect Dr and BDR.

DD Message: describes the link status summary information by carrying the LSA (link state advertisement) header information.

LS Request message: The request information used to send the download LSA, which was discovered by receiving a DD message, but not on this router .

LS Update message: synchronizes the link state database by sending a detailed LSA.

LS ACK message: to ensure that the routing information exchange process is reliable through flooding confirmation information.

In addition to the Hello message, All other messages are only created adjacency Relationship sent between routers. . (It must be clear that it is important to understand the process of establishing the adjacency relationship)


2 OSPF packet Header

OSPF protocol all types of messages have the same header information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/53/wKiom1W2JcfzRHXeAADCRTL_42Q916.jpg "title=" 1.jpg " alt= "Wkiom1w2jcfzrhxeaadcrtl_42q916.jpg"/>

Version #: The OSPF protocol number should be set to 2.

Type: OSPF message type, OSPF has a total of five kinds of messages.

Packet LENGTH:OSPF The total length of the message, including the header of the message. Units are bytes.

Router ID: The Router ID of the router that generated this message.

Area ID: the region to which this message needs to be advertised .

Autype: The authentication method that should be used to verify this message.

Authentication: Information such as the password required to verify this message.


3 Hello Message

Neighbors and adjacency relationships are created by exchanging hello messages, so by understanding the header content of the Hello message, you can help us understand the establishment of neighbors and adjacency relationships.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/53/wKiom1W2JrywpDhgAAETn81PS0c155.jpg "title=" 2.jpg " alt= "Wkiom1w2jrywpdhgaaetn81ps0c155.jpg"/>


Network Mask : The netmask for the interface that sends the hello message.

Hellointerval: The time interval for sending a hello message. Unit is seconds. The default 10m, under NBMA and point-to-multipoint, is 40s

Options: Identifies the optional features supported by the OSPF router that sent this message. Specific optional features are not included in the scope of this course.

Rtr Pri: The router priority of the interface that sends the Hello message, which is used to elect the DR and BDR. In broadcast and NBMA networks, the DR and BDR are determined by priority, and the higher the router ID the higher the priority.

Routerdeadinterval: declares that the neighbor router does not continue to run OSPF on the network segment in seconds, typically four times times Hellointerval.

designated Router: the IP address of the Dr that was elected by the router that sent the hello message. If set to 0.0.0.0, indicates that the DR router is not elected.

Backup designated Router: the IP address of the BDR that was elected by the router that sent the hello message. If set to 0.0.0.0, the BDR router is not elected.

Active Neighbor: List of router IDs for neighbor routers. Indicates that the router has received a legitimate Hello message from the neighbor.

When you receive a Hello package that contains your own router-id, the neighbor relationship is considered established.


4 The process of forming a neighbor relationship and the transformation of the related state.

Note the two states of 2-way and Exstart


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/53/wKiom1W2J7-w5GCwAACWvlhV3Jo142.jpg "title=" 1.jpg " alt= "Wkiom1w2j7-w5gcwaacwvlhv3jo142.jpg"/>

Down : This is the initial state of the neighbor, indicating that no information was received from the neighbor. On NBMA networks, this state can still send a hello message to a statically configured neighbor, with a send interval of pollinterval, usually the same as the Routerdeadinterval interval.

Init: in this state, the router has received a hello message from the neighbor, but is not in the neighbor list of the received Hello message.

1-wayreceived: This event indicates that the router found itself in a neighbor list that did not send a hello message to the neighbor, usually because of a neighbor reboot.

2-wayreceived: This event indicates that the router discovers two-way communication with the neighbor has started (finds itself in the neighbor list of Hello messages sent by the neighbor). After this event is generated in the Init state , If you need to establish an adjacency relationship with a neighbor, enter the exstart state , start the database synchronization process, and enter 2-way if you cannot establish an adjacency relationship with the neighbor.

2-way: in this state, two-way communication is established, but no adjacency is established with the neighbor. This is the most advanced state before the adjacency relationship was established.

attempt: This state exists only on the NBMA network, indicating that no information was received from the neighbor, but that a message was sent periodically to the neighbor, with a send interval of hellointerval. If the neighbor's Hello message is not received within the Routerdeadinterval interval, it is turned down.





This article from "Day Up" blog, please be sure to keep this source http://4625416.blog.51cto.com/4615416/1678900

HCNP Learning Notes OSPF protocol principle and configuration 3-establishment of a neighbor relationship

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.