|
When a router starts an OSPF routing process on
an interface, it sends a hello packet and continues to send hellos at regular
intervals. The rules that govern the exchange of OSPF hello packets are
collectively referred to as the Hello Protocol.
At Layer 3 of the OSI model, hello packets are
addressed to the multicast address 224.0.0.5. This address effectively means
"all OSPF routers." OSPF routers use hello packets to initiate new
adjacencies and to ensure that adjacent neighbors have not disappeared. Hellos
are sent every 10 seconds by default on multiaccess and point-to-point networks.
On interfaces that connect to NBMA networks, such as Frame Relay, hellos are
sent every 30 seconds.
Although the hello packet is small (often less
than 50 bytes), hellos contain plenty of vital information. Like OSPF packet
types, hello packets include an OSPF packet header, which has the form shown in
Figure .
All five types of OSPF packets use the OSPF packet header, which consists of
eight fields.
The purpose of each of these fields is described below:
- Version, Type, and Packet Length - The
first three fields of the OSPF packet let the recipients know the version of
OSPF that is being used by the sender (version 1 and 2), the OSPF packet
type, and length. OSPF version 2 was first introduced in 1991 (RFC 1247) and
is not compatible with version 1, which is obsolete. The Cisco IOS uses OSPF
version 2 and cannot be configured to use OSPF version 1.
- Router ID - The function of the hello
packet is to establish and maintain adjacencies, so the sending router signs
the fourth field with its router ID, which is a 32-bit number used to
identify the router to the OSPF protocol. A router uses its IP address as
its ID because both the router ID and the IP address must be unique within a
network. Because routers support multiple IP addresses, a loopback IP
address is used as the router ID. In the absence of a loopback IP address,
the highest-value address interface IP is used as the router ID, regardless
of whether that interface is involved in the OSPF process.
If the interface associated with that IP address
goes down, the router can no longer use that IP address as its router ID. When a
router's ID changes for any reason, the router must reintroduce itself to its
neighbors on all links. To avoid the unnecessary overhead caused by
re-establishing adjacency and readvertising link states, an administrator
typically assigns an IP address to a loopback interface. Unless an administrator
shuts down a loopback interface, it always stays up, so loopback interfaces make
ideal router IDs.
Note: If a loopback interface is configured with
an IP address, the Cisco IOS will use that IP address as the router ID, even if
the other interfaces have higher addresses.
- Area ID - You can define multiple areas
within an OSPF network to reduce and summarize route information, which
allows large and complex networks to continue to grow. When configuring a
single-area OSPF network, you should always use Area 0 because it is defined
as the "backbone" area. You must have a backbone area to scale
(add other OSPF areas).
- Checksum - As you may have seen with
other protocols, a 2-byte checksum field is used to check the message for
errors. Good packets are retained and damaged packets are discarded.
- Authentication Type and Authentication Data
- OSPF supports different methods of authentication so that OSPF routers
will not believe just anyone sending hellos to 224.0.0.5. Routers with unequal
authentication fields will not accept OSPF information from each other.
The hello header ,
which is found only in Type-1 hello packets, carries essential information. The
following are the fields in the hello header:
- Network Mask - This 32-bit field
carries subnet mask information for the network.
- Hello Interval and Dead Interval - The
hello interval is the number of seconds that an OSPF router waits to send
the next hello packet. The default for multiaccess broadcast and
point-to-point networks is 10 seconds. The dead interval is the number of
seconds that a router waits before it declares a neighbor down (if the
neighbor's hello packets are no longer being received). The dead interval is
four times the hello interval by default, or 40 seconds. Both of these
intervals are configurable, which is the reason they are advertised. If two
routers have different hello intervals or if they have different dead
intervals, they will not accept OSPF information from each other.
- Options - The router can use this field
to indicate optional configurations, including the stub area flag, which is
discussed in Chapter 5.
- Router Priority - This field contains a
value that indicates the priority of this router when selecting a designated
router (DR) and backup designated router (BDR). The default priority is 1
and can be configured to a higher number to ensure that a specified router
becomes the DR.
- Designated Router and Backup Designated
Router - The router IDs of the DR and BDR are listed here, if known by
the source of the hello packet.
- Neighbor Address - If the source of the
hello packet has received a valid hello from any neighbor within the dead
interval, its router ID is included here.
|