RFC1247 - OSPF Version 2(2)

王朝other·作者佚名  2008-05-31
宽屏版  字体: |||超大  

5. Protocol Data Structures

The OSPF protocol is described in this specification in terms of its

operation on various protocol data structures. The following list

comprises the top-level OSPF data structures. Any initialization that

needs to be done is noted. Areas, OSPF interfaces and neighbors also

have associated data structures that are described later in this

specification.

Router ID

a 32-bit number that uniquely identifies this router in the AS. One

possible implementation strategy would be to use the smallest IP

interface address belonging to the router.

Pointers to area structures

Each one of the areas to which the router is connected has its own

data structure. This data structure describes the working of the

basic algorithm. Remember that each area runs a separate copy of

the basic algorithm.

Pointer to the backbone structure

The basic algorithm operates on the backbone as if it were an area.

For this reason the backbone is represented as an area structure.

Virtual links configured

The virtual links configured with this router as one endpoint. In

order to have configured virtual links, the router itself must be an

area border router. Virtual links are identified by the Router ID

of the other endpoint -- which is another area border router. These

two endpoint routers must be attached to a common area, called the

virtual link's transit area. Virtual links are part of the

backbone, and behave as if they were unnumbered point-to-point

networks between the two routers. A virtual link uses the intra-

area routing of its transit area to forward packets. Virtual links

are brought up and down through the building of the shortest-path

trees for the transit area.

List of external routes

These are routes to destinations external to the Autonomous System,

that have been gained either through direct experience with another

routing protocol (such as EGP), or through configuration

information, or through a combination of the two (e.g., dynamic

external info. to be advertised by OSPF with configured metric).

Any router having these external routes is called an AS boundary

router. These routes are advertised by the router to the entire AS

through AS external link advertisements.

List of AS external link advertisements

Part of the topological database. These have have originated from

the AS boundary routers. They comprise routes to destinations

external to the Autonomous System. Note that, if the router is

itself an AS boundary router, some of these AS external link

advertisements have been self originated.

The routing table

Derived from the topological database. Each destination that the

router can forward to is represented by a cost and a set of paths.

A path is described by its type and next hop. For more information,

see Section 11.

TOS capability

This item indicates whether the router will calculate separate

routes based on TOS. This is a configurable parameter. For more

information, see Sections 4.5 and 16.9.

Figure 9 shows the collection of data structures present in a typical

router. The router pictured is RT10, from the map in Figure 6. Note

that router RT10 has a virtual link configured to router RT11, with Area

2 as the link's transit area. This is indicated by the dashed line in

Figure 9. When the virtual link becomes active, through the building of

the shortest path tree for Area 2, it becomes an interface to the

backbone (see the two backbone interfaces depicted in Figure 9).

6. The Area Data Structure

The area data structure contains all the information used to run the

basic routing algorithm. Remember that each area maintains its own

topological database. Router interfaces and adjacencies belong to a

_______________________________________

(Figure not included in text version.)

Figure 9: Router RT10's Data Structures

_______________________________________

single area.

The backbone has all the properties of an area. For that reason it is

also represented by an area data structure. Note that some items in the

structure apply differently to the backbone than to areas.

The area topological (or link state) database consists of the collection

of router links, network links and summary links advertisements that

have originated from the area's routers. This information is flooded

throughout a single area only. The list of AS external advertisements

is also considered to be part of each area's topological database.

Area ID

A 32-bit number identifying the area. 0 is reserved for the area ID

of the backbone. If assigning subnetted networks as separate areas,

the IP network number could be used as the Area ID.

List of component address ranges

The address ranges that define the area. Each address range is

specified by an [address,mask] pair. Each network is then assigned

to an area depending on the address range that it falls into

(specified address ranges are not allowed to overlap). As an

example, if an IP subnetted network is to be its own separate OSPF

area, the area is defined to consist of a single address range - an

IP network number with its natural (class A, B or C) mask.

Associated router interfaces

This router's interfaces connecting to the area. A router interface

belongs to one and only one area (or the backbone). For the

backbone structure this list includes all the virtual adjacencies.

A virtual adjacency is identified by the router ID of its other

endpoint; its cost is the cost of the shortest intra-area path that

exists between the two routers.

List of router links advertisements

A router links advertisement is generated by each router in the

area. It describes the state of the router's interfaces to the

area.

List of network links advertisements

One network links advertisement is generated for each transit

multi-access network in the area. It describes the set of routers

currently connected to the network.

List of summary links advertisements

Summary link advertisements originate from the area's area border

routers. They describe routes to destinations internal to the

Autonomous System, yet external to the area.

Shortest-path tree

The shortest-path tree for the area, with this router itself as

root. Derived from the collected router links and network links

advertisements by the Dijkstra algorithm.

Authentication type

The type of authentication used for this area. Authentication types

are defined in Appendix E. All OSPF packet exchanges are

authenticated. Different authentication schemes may be used in

different areas.

External routing capability

Whether AS external advertisements will be flooded into/throughout

the area. This is a configurable parameter. If AS external

advertisements are excluded from the area, the area is called a

"stub". Internal to stub areas, routing to external destinations

will be based solely on a default summary route. The backbone

cannot be configured as a stub area. Also, virtual links cannot be

configured through stub areas. For more information, see Section

3.6.

StubDefaultCost

If the area has been configured as a stub area, and the router

itself is an area border router, then the StubDefaultCost indicates

the cost of the default summary link that the router should

advertise into the area. There can be a separate cost configured

for each IP TOS. See Section 12.4.3 for more information.

Unless otherwise specified, the remaining sections of this document

refer to the operation of the protocol in a single area.

7. Bringing Up Adjacencies

OSPF creates adjacencies between neighboring routers for the purpose of

exchanging routing information. Not every two neighboring routers will

become adjacent. This section covers the generalities involved in

creating adjacencies. For further details consult Section 10.

7.1 The Hello Protocol

The Hello Protocol is responsible for establishing and maintaining

neighbor relationships. It also ensures that communication between

neighbors is bidirectional. Hello packets are sent periodically out all

router interfaces. Bidirectional communication is indicated when the

router sees itself listed in the neighbor's Hello Packet.

On multi-access networks, the Hello Protocol elects a Designated Router

for the network. Among other things, the Designated Router controls

what adjacencies will be formed over the network (see below).

The Hello Protocol works differently on broadcast networks, as compared

to non-broadcast networks. On broadcast networks, each router

advertises itself by periodically multicasting Hello Packets. This

allows neighbors to be discovered dynamically. These Hello Packets

contain the router's view of the Designated Router's identity, and the

list of routers whose Hellos have been seen recently.

On non-broadcast networks some configuration information is necessary

for the operation of the Hello Protocol. Each router that may

potentially become Designated Router has a list of all other routers

attached to the network. A router, having Designated Router potential,

sends hellos to all other potential Designated Routers when its

interface to the non-broadcast network first becomes operational. This

is an attempt to find the Designated Router for the network. If the

router itself is elected Designated Router, it begins sending hellos to

all other routers attached to the network.

After a neighbor has been discovered, bidirectional communication

ensured, and (if on a multi-access network) a Designated Router elected,

a decision is made regarding whether or not an adjacency should be

formed with the neighbor (see Section 10.4). An attempt is always made

to establish adjacencies over point-to-point networks and virtual links.

The first step in bringing up an adjacency is to synchronize the

neighbors' topological databases. This is covered in the next section.

7.2 The Synchronization of Databases

In an SPF-based routing algorithm, it is very important for all routers'

topological databases to stay synchronized. OSPF simplifies this by

requiring only adjacent routers to remain synchronized. The

synchronization process begins as soon as the routers attempt to bring

up the adjacency. Each router describes its database by sending a

sequence of Database Description packets to its neighbor. Each Database

Description Packet describes a set of link state advertisements

belonging to the database. When the neighbor sees a link state

advertisement that is more recent than its own database copy, it makes a

note that this newer advertisement should be requested.

This sending and receiving of Database Description packets is called the

"Database Exchange Process". During this process, the two routers form

a master/slave relationship. Each Database Description Packet has a

sequence number. Database Description Packets sent by the master

(polls) are acknowledged by the slave through echoing of the sequence

number. Both polls and their responses contain summaries of link state

data. The master is the only one allowed to retransmit Database

Description Packets. It does so only at fixed intervals, the length of

which is the configured constant RxmtInterval.

Each Database Description contains an indication that there are more

packets to follow --- the M-bit. The Database Exchange Process is over

when a router has received and sent Database Description Packets with

the M-bit off.

During and after the Database Exchange Process, each router has a list

of those link state advertisements for which the neighbor has more up-

to-date instances. These advertisements are requested in Link State

Request Packets. Link State Request packets that are not satisfied are

retransmitted at fixed intervals of time RxmtInterval. When the

Database Description Process has completed and all Link State Requests

have been satisfied, the databases are deemed synchronized and the

routers are marked fully adjacent. At this time the adjacency is fully

functional and is advertised in the two routers' link state

advertisements.

The adjacency is used by the flooding procedure as soon as the Database

Exchange Process begins. This simplifies database synchronization, and

guarantees that it finishes in a predictable period of time.

7.3 The Designated Router

Every multi-access network has a Designated Router. The Designated

Router performs two main functions for the routing protocol:

o The Designated Router originates a network links advertisement on

behalf of the network. This advertisement lists the set of routers

(including the Designated Router itself) currently attached to the

network. The Link State ID for this advertisement (see Section

12.1.4) is the IP interface address of the Designated Router. The

IP network number can then be obtained by using the subnet/network

mask.

o The Designated router becomes adjacent to all other routers on the

network. Since the link state databases are synchronized across

adjacencies (through adjacency bring-up and then the flooding

procedure), the Designated Router plays a central part in the

synchronization process.

The Designated Router is elected by the Hello Protocol. A router's

Hello Packet contains its Router Priority, which is configurable on a

per-interface basis. In general, when a router's interface to a network

first becomes functional, it checks to see whether there is currently a

Designated Router for the network. If there is, it accepts that

Designated Router, regardless of its Router Priority. (This makes it

harder to predict the identity of the Designated Router, but ensures

that the Designated Router changes less often. See below.) Otherwise,

the router itself becomes Designated Router if it has the highest Router

Priority on the network. A more detailed (and more accurate)

description of Designated Router election is presented in Section 9.4.

The Designated Router is the endpoint of many adjacencies. In order to

optimize the flooding procedure on broadcast networks, the Designated

Router multicasts its Link State Update Packets to the address

AllSPFRouters, rather than sending separate packets over each adjacency.

Section 2 of this document discusses the directed graph representation

of an area. Router nodes are labelled with their Router ID. Broadcast

network nodes are actually labelled with the IP address of their

Designated Router. It follows that when the Designated Router changes,

it appears as if the network node on the graph is replaced by an

entirely new node. This will cause the network and all its attached

routers to originate new link state advertisements. Until the

topological databases again converge, some temporary loss of

connectivity may result. This may result in ICMP unreachable messages

being sent in response to data traffic. For that reason, the Designated

Router should change only infrequently. Router Priorities should be

configured so that the most dependable router on a network eventually

becomes Designated Router.

7.4 The Backup Designated Router

In order to make the transition to a new Designated Router smoother,

there is a Backup Designated Router for each multi-access network. The

Backup Designated Router is also adjacent to all routers on the network,

and becomes Designated Router when the previous Designated Router fails.

If there were no Backup Designated Router, when a new Designated Router

became necessary, new adjacencies would have to be formed between the

router and all other routers attached to the network. Part of the

adjacency forming process is the synchronizing of topological databases,

which can potentially take quite a long time. During this time, the

network would not be available for transit data traffic. The Backup

Designated obviates the need to form these adjacencies, since they

already exist. This means the period of disruption in transit traffic

lasts only as long as it take to flood the new link state advertisements

(which announce the new Designated Router).

The Backup Designated Router does not generate a network links

advertisement for the network. (If it did, the transition to a new

Designated Router would be even faster. However, this is a tradeoff

between database size and speed of convergence when the Designated

Router disappears.)

The Backup Designated Router is also elected by the Hello Protocol.

Each Hello Packet has a field that specifies the Backup Designated

Router for the network.

In some steps of the flooding procedure, the Backup Designated Router

plays a passive role, letting the Designated Router do more of the work.

This cuts down on the amount of local routing traffic. See Section 13.3

for more information.

7.5 The graph of adjacencies

An adjacency is bound to the network that the two routers have in

common. If two routers have multiple networks in common, they may have

multiple adjacencies between them.

One can picture the collection of adjacencies on a network as forming an

undirected graph. The vertices consist of routers, with an edge joining

two routers if they are adjacent. The graph of adjacencies describes

the flow of routing protocol packets, and in particular Link State

Updates, through the Autonomous System.

Two graphs are possible, depending on whether the common network is

multi-access. On physical point-to-point networks (and virtual links),

the two routers joined by the network will be adjacent after their

databases have been synchronized. On multi-access networks, both the

Designated Router and the Backup Designated Router are adjacent to all

other routers attached to the network, and these account for all

adjacencies.

These graphs are shown in Figure 10. It is assumed that router RT7 has

become the Designated Router, and router RT3 the Backup Designated

Router, for the network N2. The Backup Designated Router performs a

lesser function during the flooding procedure than the Designated Router

(see Section 13.3). This is the reason for the dashed lines connecting

the Backup Designated Router RT3.

8. Protocol Packet Processing

This section discusses the general processing of routing protocol

packets. It is very important that the router topological databases

remain synchronized. For this reason, routing protocol packets should

get preferential treatment over ordinary data packets, both in sending

and receiving.

Routing protocol packets are sent along adjacencies only (with the

exception of Hello packets, which are used to discover the adjacencies).

This means that all protocol packets travel a single IP hop, except

those sent over virtual links.

All routing protocol packets begin with a standard header. The sections

below give the details on how to fill in and verify this standard

header. Then, for each packet type, the section is listed that gives

more details on that particular packet type's processing.

8.1 Sending protocol packets

When a router sends a routing protocol packet, it fills in the fields of

that standard header as follows. For more details on the header format

consult Section A.3.1:

Version #

Set to 2, the version number of the protocol as documented in this

specification.

Packet type

The type of OSPF packet, such as Link state Update or Hello Packet.

Packet length

The length of the entire OSPF packet in bytes, including the

standard header.

Router ID

The identity of the router itself (who is originating the packet).

______________________________________

(Figure not included in text version.)

Figure 10: The graph of adjacencies

Figure 11: Interface state changes

______________________________________

Area ID

The area that the packet is being sent into.

Checksum

The standard IP 16-bit one's complement checksum of the entire OSPF

packet, excluding the 64-bit authentication field. This checksum

should be calculated before handing the packet to the appropriate

authentication procedure.

Autype and Authentication

Each OSPF packet exchange is authenticated. Authentication types

are assigned by the protocol and documented in Appendix E. A

different authentication scheme can be used for each OSPF area. The

64-bit authentication field is set by the appropriate authentication

procedure (determined by Autype). This procedure should be the last

called when forming the packet to be sent. The setting of the

authentication field is determined by the packet contents and the

authentication key (which is configurable on a per-interface basis).

The IP destination address for the packet is selected as follows. On

physical point-to-point networks, the IP destination is always set to

the the address AllSPFRouters. On all other network types (including

virtual links), the majority of OSPF packets are sent as unicasts, i.e.,

sent directly to the other end of the adjacency. In this case, the IP

destination is just the neighbor IP address associated with the other

end of the adjacency (see Section 10). The only packets not sent as

unicasts are on broadcast networks; on these networks Hello packets are

sent to the multicast destination AllSPFRouters, the Designated Router

and its Backup send both Link State Update Packets and Link State

Acknowledgment Packets to the multicast address AllSPFRouters, while all

other routers send both their Link State Update and Link State

Acknowledgment Packets to the multicast address AllDRouters.

Retransmissions of Link State Update packets are ALWAYS sent as

unicasts.

The IP source address should be set to the IP address of the sending

interface. Interfaces to unnumbered point-to-point networks have no

associated IP address. On these interfaces, the IP source should be set

to any of the other IP addresses belonging to the router. For this

reason, there must be at least one IP address assigned to the router.[2]

Note that, for most purposes, virtual links act precisely the same as

unnumbered point-to-point networks. However, each virtual link does

have an interface IP address (discovered during the routing table build

process) which is used as the IP source when sending packets over the

virtual link.

For more information on the format of specific packet types, consult the

sections listed in Table 10.

Type Packet name detailed section (transmit)

_________________________________________________________

1 Hello Section 9.5

2 Database description Section 10.8

3 Link state request Section 10.9

4 Link state update Section 13.3

5 Link state ack Section 13.5

Table 10: Sections describing packet transmission.

8.2 Receiving protocol packets

Whenever a protocol packet is received by the router it is marked with

the interface it was received on. For routers that have virtual links

configured, it may not be immediately obvious which interface to

associate the packet with. For example, consider the router RT11

depicted in Figure 6. If RT11 receives an OSPF protocol packet on its

interface to network N8, it may want to associate the packet with the

interface to area 2, or with the virtual link to router RT10 (which is

part of the backbone). In the following, we assume that the packet is

initially associated with the non-virtual link.[3]

In order for the packet to be accepted at the IP level, it must pass a

number of tests, even before the packet is passed to OSPF for

processing:

o The IP checksum must be correct.

o The packet's IP destination address must be the IP address of the

receiving interface, or one of the IP multicast addresses

AllSPFRouters or AllDRouters.

o The IP protocol specified must be OSPF (89).

o Locally originated packets should not be passed on to OSPF. That

is, the source IP address should be examined to make sure this is

not a multicast packet that the router itself generated.

Next, the OSPF packet header is verified. The fields specified in the

header must match those configured for the receiving interface. If they

do not, the packet should be discarded:

o The version number field must specify protocol version 2.

o The 16-bit checksum of the OSPF packet's contents must be verified.

Remember that the 64-bit authentication field must be excluded from

the checksum calculation.

o The Area ID found in the OSPF header must be verified. If both of

the following cases fail, the packet should be discarded. The Area

ID specified in the header must either:

(1) Match the Area ID of the receiving interface. In this case, the

packet has been sent over a single hop. Therefore, the packet's

IP source address must be on the same network as the receiving

interface. This can be determined by comparing the packet's IP

source address to the interface's IP address, after masking both

addresses with the interface mask.

(2) Indicate the backbone. In this case, the packet has been sent

over a virtual link. The receiving router must be an area

border router, and the router ID specified in the packet (the

source router) must be the other end of a configured virtual

link. The receiving interface must also attach to the virtual

link's configured transit area. If all of these checks succeed,

the packet is accepted and is from now on associated with the

virtual link (and the backbone area).

o Packets whose IP destination is AllDRouters should only be accepted

if the state of the receiving interface is DR or Backup (see Section

9.1).

o The Authentication type specified must match the authentication type

specified for the associated area.

Next, the packet must be authenticated. This depends on the

authentication type specified (see Appendix E). The authentication

procedure may use an Authentication key, which can be configured on a

per-interface basis. If the authentication fails, the packet should be

discarded.

If the packet type is Hello, it should then be further processed by the

Hello Protocol (see Section 10.5). All other packet types are

sent/received only on adjacencies. This means that the packet must have

been sent by one of the router's active neighbors. If the receiving

interface is a multi-access network (either broadcast or non-broadcast)

the sender is identified by the IP source address found in the packet's

IP header. If the receiving interface is a point-to-point link or a

virtual link, the sender is identified by the Router ID (source router)

found in the packet's OSPF header. The data structure associated with

the receiving interface contains the list of active neighbors. Packets

not matching any active neighbor are discarded.

At this point all received protocol packets are associated with an

active neighbor. For the further input processing of specific packet

types, consult the sections listed in Table 11.

Type Packet name detailed section (receive)

________________________________________________________

1 Hello Section 10.5

2 Database description Section 10.6

3 Link state request Section 10.7

4 Link state update Section 13

5 Link state ack Section 13.7

Table 11: Sections describing packet reception.

9. The Interface Data Structure

An OSPF interface is the connection between a router and a network.

There is a single OSPF interface structure for each attached network;

each interface structure has at most one IP interface address (see

below). The support for multiple addresses on a single network is a

matter for future consideration.

An OSPF interface can be considered to belong to the area that contains

the attached network. All routing protocol packets originated by the

router over this interface are labelled with the interface's Area ID.

One or more router adjacencies may develop over an interface. A

router's link state advertisements reflect the state of its interfaces

and their associated adjacencies.

The following data items are associated with an interface. Note that a

number of these items are actually configuration for the attached

network; those items must be the same for all routers connected to the

network.

Type

The kind of network to which the interface attaches. Its value is

either broadcast, non-broadcast yet still multi-access, point-to-

point or virtual link.

State

The functional level of an interface. State determines whether or

not full adjacencies are allowed to form over the interface. State

is also reflected in the router's link state advertisements.

IP interface address

The IP address associated with the interface. This appears as the

IP source address in all routing protocol packets originated over

this interface. Interfaces to unnumbered point-to-point networks do

not have an associated IP address.

IP interface mask

This indicates the portion of the IP interface address that

identifies the attached network. This is often referred to as the

subnet mask. Masking the IP interface address with this value

yields the IP network number of the attached network.

Area ID

The Area ID to which the attached network belongs. All routing

protocol packets originating from the interface are labelled with

this Area ID.

HelloInterval

The length of time, in seconds, between the Hello packets that the

router sends on the interface. Advertised in Hello packets sent out

this interface.

RouterDeadInterval

The number of seconds before the router's neighbors will declare it

down, when they stop hearing the router's hellos. Advertised in

Hello packets sent out this interface.

InfTransDelay

The estimated number of seconds it takes to transmit a Link State

Update Packet over this interface. Link state advertisements

contained in the update packet will have their age incremented by

this amount before transmission. This value should take into

account transmission and propagation delays; it must be greater than

zero.

Router Priority

An 8-bit unsigned integer. When two routers attached to a network

both attempt to become Designated Router, the one with the highest

Router Priority takes precedence. A router whose Router Priority is

set to 0 is ineligible to become Designated Router on the attached

network. Advertised in Hello packets sent out this interface.

Hello Timer

An interval timer that causes the interface to send a Hello packet.

This timer fires every HelloInterval seconds. Note that on non-

broadcast networks a separate Hello packet is sent to each qualified

neighbor.

Wait Timer

A single shot timer that causes the interface to exit the Waiting

state, and as a consequence select a Designated Router on the

network. The length of the timer is RouterDeadInterval seconds.

List of neighboring routers

The other routers attached to this network. On multi-access

networks, this list is formed by the Hello Protocol. Adjacencies

will be formed to some of these neighbors. The set of adjacent

neighbors can be determined by an examination of all of the

neighbors' states.

Designated Router

The Designated Router selected for the attached network. The

Designated Router is selected on all multi-access networks by the

Hello Protocol. Two pieces of identification are kept for the

Designated Router: its Router ID and its interface IP address on the

network. The Designated Router advertises link state for the

network. The network link state advertisement is labelled with the

Designated Router's IP address. This item is initialized to 0,

which indicates the lack of a Designated Router.

Backup Designated Router

The Backup Designated Router is also selected on all multi-access

networks by the Hello Protocol. All routers on the attached network

become adjacent to both the Designated Router and the Backup

Designated Router. The Backup Designated Router becomes Designated

Router when the current Designated Router fails. Initialized to 0

indicating the lack of a Backup Designated Router.

Interface output cost(s)

The cost of sending a packet on the interface, expressed in the link

state metric. This is advertised as the link cost for this

interface in the router links advertisement. There may be a

separate cost for each IP Type of Service. The cost of an interface

must be greater than zero.

RxmtInterval

The number of seconds between link state advertisement

retransmissions, for adjacencies belonging to this interface. Also

used when retransmitting Database Description and Link State Request

Packets.

Authentication key

This configured data allows the authentication procedure to generate

and/or verify the authentication field in the OSPF header. The

authentication key can be configured on a per-interface basis. For

example, if the authentication type indicates simple passWord, the

authentication key would be a 64-bit password. This key would be

inserted directly into the OSPF header when originating routing

protocol packets, and there could be a separate password for each

network.

9.1 Interface states

The various states that router interface may attain is documented in

this section. The states are listed in order of progressing

functionality. For example, the inoperative state is listed first,

followed by a list of intermediate states before the final, fully

functional state is achieved. The specification makes use of this

ordering by sometimes making references such as "those interfaces in

state greater than X".

Figure 11 shows the graph of interface state changes. The arcs of the

graph are labelled with the event causing the state change. These

events are documented in Section 9.2. The interface state machine is

described in more detail in Section 9.3.

Down

This is the initial interface state. In this state, the lower-level

protocols have indicated that the interface is unusable. No

protocol traffic at all will be sent or received on such a

interface. In this state, interface parameters should be set to

their initial values. All interface timers should be disabled, and

there should be no adjacencies associated with the interface.

Loopback

In this state, the router's interface to the network is looped back.

The interface may be looped back in hardware or software. The

interface will be unavailable for regular data traffic. However, it

may still be desirable to gain information on the quality of this

interface, either through sending ICMP pings to the interface or

through something like a bit error test. For this reason, IP

packets may still be addressed to an interface in Loopback state.

To facilitate this, such interfaces are advertised in router links

advertisements as single host routes, whose destination is the IP

interface address.[4]

Waiting

In this state, the router is trying to determine the identity of the

Backup Designated Router for the network. To do this, the router

monitors the Hellos it receives. The router is not allowed to elect

a Backup Designated Router nor Designated Router until it

transitions out of Waiting state. This prevents unnecessary changes

of (Backup) Designated Router.

Point-to-point

In this state, the interface is operational, and connects either to

a physical point-to-point network or to a virtual link. Upon

entering this state, the router attempts to form an adjacency with

the neighboring router. Hellos are sent to the neighbor every

HelloInterval seconds.

DR Other

The interface is to a multi-access network on which another router

has been selected to be the Designated Router. In this state, the

router itself has not been selected Backup Designated Router either.

The router forms adjacencies to both the Designated Router and the

Backup Designated Router (if they exist).

Backup

In this state, the router itself is the Backup Designated Router on

the attached network. It will be promoted to Designated Router when

the present Designated Router fails. The router establishes

adjacencies to all other routers attached to the network. The

Backup Designated Router performs slightly different functions

during the Flooding Procedure, as compared to the Designated Router

(see Section 13.3). See Section 7.4 for more details on the

functions performed by the Backup Designated Router.

DR In this state, this router itself is the Designated Router on the

attached network. Adjacencies are established to all other routers

attached to the network. The router must also originate a network

links advertisement for the network node. The advertisement will

contain links to all routers (including the Designated Router

itself) attached to the network. See Section 7.3 for more details

on the functions performed by the Designated Router.

9.2 Events causing interface state changes

State changes can be effected by a number of events. These events are

pictured as the labelled arcs in Figure 11. The label definitions are

listed below. For a detailed explanation of the effect of these events

on OSPF protocol operation, consult Section 9.3.

Interface Up

Lower-level protocols have indicated that the network interface is

operational. This enables the interface to transition out of Down

state. On virtual links, the interface operational indication is

actually a result of the shortest path calculation (see Section

16.7).

Wait Timer

The Wait timer has fired, indicating the end of the waiting period

that is required before electing a (Backup) Designated Router.

Backup seen

The router has detected the existence or non-existence of a Backup

Designated Router for the network. This is done in one of two ways.

First, a Hello Packet may be received from a neighbor claiming to be

itself the Backup Designated Router. Alternatively, a Hello Packet

may be received from a neighbor claiming to be itself the Designated

Router, and indicating that there is no Backup. In either case

there must be bidirectional communication with the neighbor, i.e.,

the router must also appear in the neighbor's Hello Packet. This

event signals an end to the Waiting state.

Neighbor Change

There has been a change in the set of bidirectional neighbors

associated with the interface. The (Backup) Designated Router needs

to be recalculated. The following neighbor changes lead to the

Neighbor Change event. For an explanation of neighbor states, see

Section 10.1.

o Bidirectional communication has been established to a neighbor.

In other words, the state of the neighbor has transitioned to

2-Way or higher.

o There is no longer bidirectional communication with a neighbor.

In other words, the state of the neighbor has transitioned to

Init or lower.

o One of the bidirectional neighbors is newly declaring itself as

either Designated Router or Backup Designated Router. This is

detected through examination of that neighbor's Hello Packets.

o One of the bidirectional neighbors is no longer declaring itself

as Designated Router, or is no longer declaring itself as Backup

Designated Router. This is again detected through examination

of that neighbor's Hello Packets.

o The advertised Router Priority for a bidirectional neighbor has

changed. This is again detected through examination of that

neighbor's Hello Packets.

Loop Ind

An indication has been received that the interface is now looped

back to itself. This indication can be received either from network

management or from the lower level protocols.

Unloop Ind

An indication has been received that the interface is no longer

looped back. As with the Loop Ind event, this indication can be

received either from network management or from the lower level

protocols.

Interface Down

Lower-level protocols indicate that this interface is no longer

functional. No matter what the current interface state is, the new

interface state will be Down.

9.3 The Interface state machine

A detailed description of the interface state changes follows. Each

state change is invoked by an event (Section 9.2). This event may

produce different effects, depending on the current state of the

interface. For this reason, the state machine below is organized by

current interface state and received event. Each entry in the state

machine describes the resulting new interface state and the required set

of additional actions.

When an interface's state changes, it may be necessary to originate a

new router links advertisement. See Section 12.4 for more details.

Some of the required actions below involve generating events for the

neighbor state machine. For example, when an interface becomes

inoperative, all neighbor connections associated with the interface must

be destroyed. For more information on the neighbor state machine, see

第一页    上一页    第2页/共7页    下一页    最后页
第01页 第02页 第03页 第04页 第05页 第06页 第07页 
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有