8. Maintaining the Databases
Each switch advertises its state (also known as its link state) by originating switch link advertisements. In addition, the designated switch on each network link advertises the state of the link by originating network link advertisements. As described in Section 7.1, link state advertisements are uniquely identified by their type, link state ID, and advertising switch. Link state advertisements are distributed throughout the switch fabric using a reliable flooding algorithm that ensures that all switches in the fabric are notified of any link state changes.
8.1 Originating Link State Advertisements
A new instance of each link state advertisement is originated any time the state of the switch or link changes. When a new instance of a link state advertisement is originated, its sequence number is incremented, its age is set to zero, and its checksum is calculated. The advertisement is then installed into the local link state database and forwarded out all fully operational interfaces (that is, those interfaces with a state greater than Waiting) for distribution throughout the switch fabric. See Section 8.2.4 for a description of the installation of the advertisement into the link state database and Section 8.2.5 for a description of how advertisements are forwarded. A switch originates a new instance of a link state advertisement as a result of the following events: o The state of one of the switch's interfaces changes such that the contents of the associated switch link advertisement changes. o The designated switch on any of the switch's attached network links changes. The switch originates a new switch link advertisement. Also, if the switch itself is now the designated switch, it originates a new network link advertisement for the link. o One of the switch's neighbor states changes to or from Full. If this changes the contents of the associated switch link advertisement, a new instance is generated. Also, if the switch is the designated switch for the attached network link, it originates a new network link advertisement for the link. Two instances of the same link state advertisement must not be originated within the time period MinLSInterval. Note that this may require that the generation of the second instance to be delayed up to MinLSInterval seconds.8.1.1 Switch Link Advertisements
A switch link advertisement describes the collected states of all functioning links attached to the originating switch -- that is, all attached links with an interface state greater than Down. A switch originates an empty switch link advertisement when it first becomes functional. It then generates a new instance of the advertisement each time one of its interfaces reaches a fully functioning state (Point-to-Point or better).
Each link in the advertisement is assigned a type, based on the state of interface, as shown in Table 4. Interface state Link type Description Point-to-Point 1 Point-to-point link DS Other* 2 Multi-access link Backup* 2 Multi-access link DS** 2 Multi-access link *If a full adjacency has been formed with the designated switch. **If a full adjacency has been formed with at least one other switch on the link. Table 4: Link Types in a Switch Link Advertisement Each link in the advertisement is also assigned a link identifier based on its link type. In general, this value identifies another switch that also originates advertisements for the link, thereby providing a key for accessing other link state advertisements for the link. The relationship between link type and ID is shown in Table 5. Type Description Link ID 1 Point-to-point link Switch ID of neighbor switch 2 Multi-access link Switch ID of designated switch Table 5: Link IDs in a Switch Link Advertisement In addition to a type and an identifier, the description of each link specifies the interface ID of the associated network link. Finally, each link description includes the cost of sending a packet over the link. This output cost is expressed in the link state metric and must be greater than zero. To illustrate the format of a switch link advertisement, consider the switch fabric shown in Figure 4. In this example, switch SW1 has 5 neighboring switches (shown as boxes) distributed over 3 network links (shown as lines). The base MAC address of each switch is also shown adjacent to each box. On switch SW1, ports 01 and 02 attach to point-to-point network links,
while port 03 attaches to a multi-access network link with three attached switches. The interface state of each port is shown next to the line representing the corresponding link. 00-00-1d-22-23-c5 +-------+ | SW2 | +-------+ | | Point-to-Point | | 01 +-------+ Loopback +-------+ | SW3 |----------------| SW1 | 00-00-1d-1f-05-81 +-------+ 02 +-------+ 00-00-1d-17-35-a4 | 03 | | DS Other | +--------------------+--------------------+ | | | | DS Other | Backup | DS | | | +-------+ +-------+ +-------+ | SW4 | | SW5 | | SW6 | +-------+ +-------+ +-------+ 00-00-1d-4a-26-b3 00-00-1d-4a-27-1c 00-00-1d-7e-84-2e Figure 4: Sample Switch Fabric The switch link advertisement generated by switch SW1 would contain the following data items: ; switch link advertisement for switch SW1 LS age = 0 ; always true on origination Options = (T-bit|E-bit) ; options LS type = 1 ; this is a switch link advert
; SW1's switch ID Link State ID = 00-00-1d-1f-05-81-00-00-00-00 Advertising switch = 00-00-1d-1f-05-81-00-00-00-00 # links = 2 ; link on interface port 1 Link ID = 00-00-1d-22-23-c5-00-00-00-00 ; switch ID Link Data = 00-00-1d-1f-05-81-00-00-00-01 ; interface ID Type = 1 ; pt-to-pt link # other metrics = 0 ; TOS 0 only TOS 0 metric = 1 ; link on interface port 2 is not fully functional ; link on interface port 3 Link ID = 00-00-1d-7e-84-2e-00-00-00-00 ; switch ID of DS Link Data = 00-00-1d-1f-05-81-00-00-00-03 ; interface ID Type = 2 ; multi-access # other metrics = 0 ; TOS 0 only TOS 0 metric = 2 (See Section 11.2 for a detailed description of the format of a switch link advertisement.)8.1.2 Network Link Advertisements
Network link advertisements are used to describe the switches attached to each multi-access network link. Note: Network link advertisements are not generated for point-to- point links. A network link advertisement is originated by the designated switch for the associated multi-access link once the switch has established a full adjacency with at least one other switch on the link. Each advertisement lists the switch IDs of those switches that are fully adjacent to the designated switch. The designated switch includes itself in this list. To illustrate the format of a network link advertisement, consider again the switch fabric shown in Figure 4. In this example, network link advertisements will be generated only by switch SW6, the designated switch of the multi-access network link between switches SW1 and switches SW4, SW5, and SW6. The network link advertisement generated by switch SW6 would contain the following data items:
; network link advertisement for switch SW6 LS age = 0 ; always true on origination Options = (T-bit|E-bit) ; options LS type = 2 ; this is a network link advert ; SW6's switch ID Link State ID = 00-00-1d-73-84-2e-00-00-00-00 Advertising switch = 00-00-1d-73-84-2e-00-00-00-00 Attached switch = 00-00-1d-7e-84-2e-00-00-00-00 Attached switch = 00-00-1d-4a-26-b3-00-00-00-00 Attached switch = 00-00-1d-1f-05-81-00-00-00-00 Attached switch = 00-00-1d-4a-27-1c-00-00-00-00 (See Section 11.3 for a detailed description of the format of a network link advertisement.)8.2 Distributing Link State Advertisements
Link state advertisements are distributed throughout the switch fabric encapsulated within Link State Update packets. A single Link State Update packet may contain several distinct advertisements. To make the distribution process reliable, each advertisement must be explicitly acknowledged in a Link State Acknowledgment packet. Note, however, that multiple acknowledgments can be grouped together into a single Link State Acknowledgment packet. A sending switch retransmits unacknowledged Link State Update packets at regular intervals until they are acknowledged. The remainder of this section is structured as follows: o Section 8.2.1 presents an overview of the distribution process. o Section 8.2.2 describes how an incoming Link State Update packet is processed. o Section 8.2.3 describes how a Link State Packet is forwarded -- both by the originating switch and an intermediate receiving switch. o Section 8.2.4 describes how advertisements are installed into the local database. o Section 8.2.5 describes the retransmission of unacknowledged advertisements.
o Section 8.2.6 describes how advertisements are acknowledged.8.2.1 Overview
The philosophy behind the distribution of link state advertisements is based on the concept of adjacencies -- that is, each switch is only required to remain synchronized with its adjacent neighbors. When a switch originates a new instance of a link state advertisement, it formats the advertisement into a Link State Update packet and floods the packet out each fully operational interface -- that is, each interface with a state greater than Waiting. However, only those neighbors that are adjacent to the sending switch need to process the packet. The sending switch indicates which of its neighbor switches should process the advertisement by specifying a particular multicast destination in the network layer address information (see Section 10.3). The sending switch sets the value of the network layer destination switch ID field according to the state of the interface over which the packet is sent: o If the interface state is Point-to-Point, DS, or Backup, the switch is adjacent to all other switches on the link and all neighboring switches must process the packet. Therefore, the destination field is set to the multicast switch ID AllSPFSwitches. o If the interface state is DS Other, the switch is only adjacent to the designated switch and the backup designated switch and only those two neighboring switches must process the packet. Therefore, the destination field is set to the multicast switch ID AllDSwitches. A similar logic is used when a switch receives a Link State Update packet containing a new instance of a link state advertisement. After processing and acknowledging the packet, the receiving switch forwards the Link State Update packet as o On the interface over which the original Link State Update packet was received:
o If the receiving switch is the designated switch for the attached network link, the packet is forwarded to all other switches on the link. (The destination field is set to AllSPFSwitches.) The originating switch will recognize that it was the advertisement originator and discard the packet. o If the receiving switch is not the designated switch for the attached network link, the packet is not sent back out the interface over which it was received. o On all other interfaces: o If the receiving switch is the designated switch for the attached network link, the packet is forwarded to all switches on the link. (The destination field is set to AllSPFSwitches.) o If the receiving switch is neither the designated switch or the backup designated switch for the attached network link, the packet is forwarded only to the designated switch and the backup designated switch. (The destination field is set to AllDSwitches.) Each Link State Update packet is forwarded and processed in this fashion until all switches in the fabric have received notification of the new instance of the link state advertisement.8.2.2 Processing an Incoming Link State Update Packet
When the a Link State Update packet is received, it is first subjected to a number of consistency checks. In particular, the Link State Update packet is associated with a specific neighbor. If the state of that neighbor is less than Exchange, the entire Link State Update packet is discarded. Each link state advertisement contained in the packet is processed as follows: 1. Validate the advertisement's link state checksum and type. If the checksum is invalid or the type is unknown, discard the advertisement without acknowledging it. 2. If the advertisement's age is equal to MaxAge and there is currently no instance of the advertisement in the local link state database, then do the following:
a) Acknowledge the advertisement by sending a Link State Acknowledgment packet to the sending neighbor (see Section 8.2.6). b) Purge all outstanding requests for equal or previous instances of the advertisement from the sending neighbor's Link State Request list. c) If the neighbor is Exchange or Loading, install the advertisement in the link state database (see Section 8.2.4). Otherwise, discard the advertisement. 3. If the advertisement's age is equal to MaxAge and there is an instance of the advertisement in the local link state database, then do the following: a) If the advertisement is listed in the link state retransmission list of any neighbor, remove the advertisement from the retransmission list(s) and delete the database copy of the advertisement. b) Discard the received (MaxAge) advertisement without acknowledging it. 4. If the advertisement's age is less than MaxAge, attempt to locate an instance of the advertisement in the local link state database. If there is no database copy of this advertisement, or the received advertisement is more recent than the database copy (see Section 7.1.1), do the following: a) If there is already a database copy, and if the database copy was installed less than MinLSInterval seconds ago, discard the new advertisement without acknowledging it. b) Otherwise, forward the new advertisement out some subset of the local interfaces (see Section 8.2.3). Note whether the advertisement was sent back out the receiving interface for later use by the acknowledgment process. c) Remove the current database copy from the Link state retransmission lists of all neighbors. d) Install the new advertisement in the link state database, replacing the current database copy. (Note that this may cause the calculation of the set of best paths to be scheduled. See Section 9.) Timestamp the new advertisement with the time that it was received to prevent installation of another instance within MinLSInterval seconds.
e) Acknowledge the advertisement, if necessary, by sending a Link State Acknowledgment packet back out the receiving interface. (See Section 8.2.6.) f) If the link state advertisement was initially advertised by the local switch itself, advance the advertisement sequence number and issue a new instance of the advertisement. (Receipt of a newer instance of an advertisement means that the local copy of the advertisement is left over from before the last time the switch was restarted.) 5. If the received advertisement is the same instance as the database copy (as determined by the algorithm described in Section 7.1.1), do the following: a) If the advertisement is listed in the neighbor's link state retransmission list, the local switch is expecting an acknowledgment for this advertisement. Treat the received advertisement as an implied acknowledgment, and remove the advertisement from the link state retransmission list. Note this implied acknowledgment for later use by the acknowledgment process (Section 8.2.6). b) Acknowledge the advertisement, if necessary, by sending a Link State Acknowledgment packet back out the receiving interface. (See Section 8.2.6.) If the database copy of the advertisement is more recent than the instance just received, do the following: a) Determine whether the instance is listed in the neighbor link state request list. If so, an error has occurred in the database exchange process. Restart the database exchange process by generating a neighbor BadLSReq event for the sending neighbor and terminate processing of the Link State Update packet. b) Otherwise, generate an unusual event to network management and discard the advertisement.8.2.3 Forwarding Link State Advertisements
When a new instance of an advertisement is originated or after an incoming advertisement has been processed, the switch must decide over which interfaces and to which neighbors the advertisement will be forwarded. In some instances, the switch may decide not to forward the advertisement over a particular interface because it is able to determine that the neighbors on that attached link have or
will receive the advertisement from another switch on the link. The decision of whether to forward an advertisement over each of the switch's interfaces is made as follows: 1. Each neighboring switch attached to the interface is examined to determine whether it should receive and process the new advertisement. For each neighbor, the following steps are executed: a) If the neighbor state is less than Exchange, the neighbor need not receive or process the new advertisement. b) If the neighbor state is Exchange or Loading, examine the link state request list associated with the neighbor. If an instance of the new advertisement is on the list, the neighboring switch already has an instance of the advertisement. Compare the new advertisement to the neighbor's copy: o If the new advertisement is less recent, the neighbor need not receive or process the new advertisement. o If the two copies are the same instance, delete the advertisement from the link state request list. The neighbor need not receive or process the new advertisement [7]. o Otherwise, the new advertisement is more recent. Delete the advertisement from the link state request list. The neighbor may need to receive and process the new advertisement. c) If the new advertisement was received from this neighbor, the neighbor need not receive or process the advertisement. d) Add the new advertisement to the link state retransmission list for the neighbor. 2. The switch must now decide whether to forward the new advertisement out the interface. a) If the link state advertisement was not added to any of the link state retransmission lists for neighbors attached to the interface, there is no need to forward the advertisement out the interface.
b) If the new advertisement was received on this interface, and it was received from either the designated switch or the backup designated switch, there is no need to forward the advertisement out the interface. Chances are all neighbors on the attached network link have also received the advertisement already. c) If the new advertisement was received on this interface and the state of the interface is Point-to-Point, there is no need to forward the advertisement since the received advertisement was originated by the neighbor switch. d) If the new advertisement was received on this interface, and the interface state is Backup -- that is, the switch itself is the backup designated switch -- there is no need to forward the advertisement out the interface. The designated switch will distribute advertisements on the attached network link. e) Otherwise, the advertisement must be forwarded out the interface. To forward a link state advertisement, the switch first increments the advertisement's age by InfTransDelay seconds to account for the transmission time over the link. The switch then copies the advertisement into a Link State Update packet Forwarded advertisements are sent to all adjacent switches associated with the interface. If the interface state is Point- to-Point, DS, or Backup, the destination switch ID field of the network layer address information is set to the multicast switch ID AllSPFSwitches. If the interface state is DS Other, the destination switch ID field is set to the multicast switch ID AllDSwitches.8.2.4 Installing Link State Advertisements in the Database
When a new link state advertisement is installed into the link state database, as the result of either originating or receiving a new instance of an advertisement, the switch must determine whether the best paths need to be recalculated. To make this determination, do the following: 1. Compare the contents of the new instance with the contents of the old instance (assuming the older instance is available). Note that this comparison does not include any data from the link state header. Differences in fields within the header (such as the sequence number and checksum, which are guaranteed to be different in different instances of an advertisement) are of no consequence
when deciding whether or not to recalculate the set of best paths. 2. If there are no differences in the contents of the two advertisement instances, there is no need to recalculate the set of best paths. 3. Otherwise, the set of best paths must be recalculated. Note also that the older instance of the advertisement must be removed from the link state database when the new advertisement is installed. The older instance must also be removed from the link state retransmission lists of all neighbors.8.2.5 Retransmitting Link State Advertisements
When a switch sends a link state advertisement to an adjacent neighbor, it records the advertisement in the neighbor's link state retransmission list. To ensure the reliability of the distribution process, the switch continues to periodically retransmit the advertisements specified in the list until they are acknowledged. The interval timer used to trigger retransmission of the advertisements is set to RxmtInterval seconds, as found in the interface data structure. Note that if this value is too low, needless retransmissions will ensue. If the value is too high, the speed with which the databases synchronize across adjacencies may be affected if there are lost packets. When the interval timer expires, entries in the retransmission list are formatted into one or more Link State Update packets. (Remember that multiple advertisements can fit into a single Link State Update packet.) The age field of each advertisement is incremented by InfTransDelay, as found in the interface data structure, before the advertisement is copied into the outgoing packet. Link State Update packets containing retransmitted advertisements are always sent directly to the adjacent switch. That is, the destination field of the network layer addressing information is set to the switch ID of the neighboring switch. If the adjacent switch goes down, retransmissions will continue until the switch failure is detected and the adjacency is torn down by the VLSP discovery process. When the adjacency is torn down, the link state retransmission list is cleared.
8.2.6 Acknowledging Link State Advertisements
Each link state advertisement received by a switch must be acknowledged. In most cases, this is done by sending a Link State Acknowledgment packet. However, acknowledgments can also be done implicitly by sending Link State Update packets (see step 4a of Section 8.2.2). Multiple acknowledgments can be grouped together into a single Link State Acknowledgment packet. Sending an acknowledgment Link State Acknowledgment packets are sent back out the interface over which the advertisement was received. The packet can be sent immediately to the sending neighbor, or it can be delayed and sent when an interval timer expires. o Sending delayed acknowledgments facilitates the formatting of multiple acknowledgments into a single packet. This enables a single packet to send acknowledgments to several neighbors at once by using a multicast switch ID in the destination field of the network layer addressing information (see below). Delaying acknowledgments also randomizes the acknowledgment packets sent by the multiple switches attached to a multi-access network link. Note that the interval used to time delayed acknowledgments must be short (less than RxmtInterval) or needless retransmissions will ensue. Delayed acknowledgments are sent to all adjacent switches associated with the interface. If the interface state is Point-to-Point, DS, or Backup, the destination field of the network layer addressing information is set to the multicast switch ID AllSPFSwitches. If the interface state is DS Other, the destination field is set to the multicast switch ID AllDSwitches. o Immediate acknowledgments are sent directly to a specific neighbor in response to the receipt of duplicate link state advertisements. These acknowledgments are sent immediately when the duplicate is received. The method used to send a Link State Acknowledgment packet -- either delayed or immediate -- depends on the circumstances surrounding the receipt of the advertisement, as shown in Table 6. Note that switches with an interface state of Backup send
acknowledgments differently than other switches because they play a slightly different role in the distribution process (see Section 8.2.3). Action taken in state Circumstances Backup Other states Advertisement was No ack sent No ack sent forwarded back out receiving interface Advertisement is Delayed ack sent Delayed ack more recent than if advertisement sent database copy, but received from DS, was not forwarded else do nothing back out receiving interface Advertisement was a Delayed ack sent No ack sent duplicate treated if advertisement as an implied acknow- received from DS, ledgment (step 4a of else do nothing Section 8.2.2) Advertisement was a Immediate ack Immediate ack duplicate not treated sent sent as an implied acknow- ledgment Advertisement age Immediate ack Immediate ack equal to MaxAge and sent sent no current instance found in database Table 6: Sending Link State Acknowledgments Receiving an acknowledgment When the a Link State Acknowledgment packet is received, it is first subjected to a number of consistency checks. In particular, the packet is associated with a specific neighbor. If the state of that neighbor is less than Exchange, the entire Link State Acknowledgment packet is discarded. Each acknowledgment contained in the packet is processed as follows:
o If the advertisement being acknowledged has an instance in the link state retransmission list for the sending neighbor, do the following: o If the acknowledgment is for the same instance as that specified in the list (as determined by the procedure described in Section 7.1.1), remove the instance from the retransmission list. o Otherwise, log the acknowledgment as questionable.8.3 Aging the Link State Database
Each link state advertisement has an age field, containing the advertisement's age, expressed in seconds. When the advertisement is copied into a Link State Update packet for forwarding out a particular interface, the age is incremented by InfTransDelay seconds to account for the transmission time over the link. An advertisement's age is never incremented past the value MaxAge. Advertisements with an age of MaxAge are not used to calculate best paths. If a link state advertisement's age reaches MaxAge, the switch flushes the advertisement from the switch fabric by doing the following: o Originate a new instance of the advertisement with the age field set to MaxAge. The distribution process will eventually result in the advertisement being removed from the retransmission lists of all switches in the fabric. o Once the advertisement is no longer contained in the link state retransmission list of any neighbor and no neighbor is in a state of Exchange or Loading, remove the advertisement from the local link state database.8.3.1 Premature Aging of Advertisements
A link state advertisement can be prematurely flushed from the switch fabric by forcing its age to MaxAge and redistributing the advertisement. A switch that was previously the designated switch for a multi-access network link but has lost that status due to a failover to the backup designated switch prematurely ages the network link advertisements it originated for the link.
Premature aging also occurs when an advertisement's sequence number must wrap -- that is, when the current advertisement instance has a sequence number of 0x7fffffff. In this circumstance, the advertisement is prematurely aged so that the next instance of the advertisement can be originated with a sequence number of 0x80000001 and be recognized as the most recent instance. A switch may only prematurely age those link state advertisements for which it is the advertising switch.9. Calculating the Best Paths
Once an adjacency has been formed and the two switches have synchronized their databases, each switch in the adjacency calculates the best path(s) to all other switches in the fabric, using itself as the root of each path. In this context, "best" path means that path with the lowest total cost metric across all hops. If there are multiple paths with the same (lowest) total cost metric, they are all calculated. Best paths are stored in the area data structure. Paths are calculated using the well-known Dijkstra algorithm. For a detailed description of this algorithm, the reader is referred to [Perlman], or any of a number of standard textbooks dealing with network routing. Note that whenever there is a change in an adjacency relationship, or any change that alters the topology of the switch fabric, the set of best paths must be recalculated.10. Protocol Packets
This section describes VLS protocol packets and link state advertisements.
There are five distinct VLSP packet types, as listed in Table 7. Type Packet Name Function Description 1 Hello Select DS/Backup DS Section 10.6.1 2 Database Summarize database Description contents Section 10.6.2 3 LS Request Database download Section 10.6.3 4 LS Update Database update Section 10.6.4 5 LS Ack Flooding acknow- ledgment Section 10.6.5 Table 7: VLSP Packet Types All VLSP packets are encapsulated within a standard ISMP packet, with the VLS packet carried in the ISMP message body. The ISMP packet is described in Section 10.1. Since it is important that the link state databases remain synchronized throughout the switch fabric, processing of both incoming and outgoing routing protocol packets should take priority over ordinary data packets. Section 10.2 describes packet processing. All VLSP packets begin with network layer addressing information, described in Section 10.3, followed by a standard header, described in Section 10.4. With the exception of Hello packets, all VLSP packets deal with lists of link state advertisements. The format of a link state advertisement is described in Section 11.10.1 ISMP Packet Format
All VLSP packets are encapsulated within a standard ISMP packet. ISMP packets are of variable length and have the following general structure: o Frame header o ISMP packet header o ISMP message body
10.1.1 Frame Header
ISMP packets are encapsulated within an IEEE 802-compliant frame using a standard header as shown below: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | + Destination address +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 04 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Source address + 08 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 12 | Type | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 16 | | + + : : Destination address This 6-octet field contains the Media Access Control (MAC) address of the multicast channel over which all switches in the fabric receive ISMP packets. The destination address of all ISMP packets contain a value of 01-00-1D-00-00-00. Source address This 6-octet field contains the physical (MAC) address of the switch originating the ISMP packet. Type This 2-octet field identifies the type of data carried within the frame. The type field of ISMP packets contains the value 0x81FD.
10.1.2 ISMP Packet Header
The ISMP packet header consists of 6 octets, as shown below: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 |///////////////////////////////////////////////////////////////| ://////// Frame header /////////////////////////////////////////: +//////// (14 octets) /////////+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 12 |///////////////////////////////| Version | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 16 | ISMP message type | Sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 20 | | + + : : Frame header This 14-octet field contains the frame header. Version This 2-octet field contains the version number of the InterSwitch Message Protocol to which this ISMP packet adheres. This document describes ISMP Version 2.0. ISMP message type This 2-octet field contains a value indicating which type of ISMP message is contained within the message body. Valid values are as follows: 1 (reserved) 2 Interswitch Keepalive messages 3 Interswitch Link State messages 4 Interswitch Spanning Tree BPDU messages and Interswitch Remote Blocking messages 5 Interswitch Resolve and New User messages 6 (reserved) 7 Tag-Based Flood messages 8 Interswitch Tap messages All VLS protocol messages have an ISMP message type of 3.
Sequence number This 2-octet field contains an internally generated sequence number used by the various protocol handlers for internal synchronization of messages.10.1.3 ISMP Message Body
The ISMP message body is a variable-length field containing the actual data of the ISMP message. The length and content of this field are determined by the value found in the message type field. VLSP packets are contained in the ISMP message body.10.2 VLSP Packet Processing
Note that with the exception of Hello packets, VLSP packets are sent only between adjacent neighbors. Therefore, all packets travel a single hop. VLSP does not support fragmentation and reassembly of packets. Therefore, packets containing lists of link state advertisements or advertisement headers must be formatted such that they contain only as many advertisements or headers as will fit within the size constraints of a standard ethernet frame. When a protocol packet is received by a switch, it must first pass the following criteria before being accepted for further processing: o The checksum number must be correct. o The destination switch ID (as found in the network layer address information) must be the switch ID of the receiving switch, or one of the multicast switch IDs AllSPFSwitches or AllDSwitches. If the destination switch ID is the multicast switch ID AllDSwitches, the state of the receiving interface must be Point- to-Point, DS, or Backup. o The source switch ID (as found in the network layer address information) must not be that of the receiving switch. (That is, locally originated packets should be discarded.) At this point, if the packet is a Hello packet, it is accepted for further processing.
Since all other packet types are only sent between adjacent neighbors, the packet must have been sent by one of the switch's active neighbors. If the source switch ID matches the switch ID of one of the receiving switch's active neighbors (as stored in the interface data structure associated with the inport interface), the packet is accepted for further processing. Otherwise, the packet is discarded.10.3 Network Layer Address Information
As mentioned in Section 2.2.1, portions of the VLS protocol (as derived from OSPF) are dependent on certain network layer addresses -- in particular, the AllSPFSwitches and AllDSwitches multicast addresses that drive the distribution of link state advertisements throughout the switch fabric. In order to facilitate the implementation of the protocol at the physical MAC layer, network layer address information is encapsulated in the VSLP packets. This information immediately follows the ISMP frame and packet header and immediately precedes the VLSP packet header, as shown below: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : frame header / ISMP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Unused (20 octets) : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 20 | | + Source switch ID + 24 | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 28 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 32 | | + Destination switch ID + 36 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 40 | | : VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Source switch ID This 10-octet field contains the switch ID of the sending switch. Destination switch ID This 10-octet field contains the switch ID of the packet destination. The value here is set as follows: o Hello packets are addressed to the multicast switch ID AllSPFSwitches. o The designated switch and the backup designated switch address initial Link State Update packets and Link State Acknowledgment packets to the multicast switch ID AllSPFSwitches. o All other switches address initial Link State Update packets and Link State Acknowledgment packets to the multicast switch ID AllDSwitches. o Retransmissions of Link State Update packets are always addressed directly to the nonresponding switch. o Database Description packets and Link State Request are always addressed directly to the other switch participating in the database exchange process. VLSP header This 30-octet field contains the VLSP standard header. See Section 10.4.10.4 VLSP Packet Header
Every VLSP packet starts with a common 30-octet header. This header, along with the data found in the network layer address information, contains all the data necessary to determine whether the packet should be accepted for further processing. (See Section 10.1.) The format of the VLSP header is shown below. Note that the header starts at offset 36 of the ISMP message body, following the network layer address information.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : frame header / ISMP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer address information : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 40 | (unused) | Type | Packet length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 44 | | + Source switch ID + 48 | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 52 | | Area ID . . . | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 56 | Area ID . . . | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 60 | Autype | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Authentication + 64 | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 68 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type This 1-octet field contains the packet type. Possible values are as follows: 1 Hello 2 Database Description 3 Link State Request 4 Link State Update 5 Link State Acknowledgment Packet length This 2-octet field contains the length of the protocol packet, in bytes, calculated from the start of the VLSP header, at offset 20 of the ISMP message body. If the packet length is not an integral number of 16-bit words, the packet is padded with an octet of zero (see the description of the checksum field, below).
Switch ID This 10-octet field contains the switch ID of the sending switch. Area ID This 4-octet field contains the area identifier. Since VLSP does not support multiple areas, the value here is always zero. Checksum This 2-octet field contains the packet checksum value. The checksum is calculated as the 16-bit one's complement of the one's complement sum of all the 16-bit words in the packet, beginning with the VLSP header, excluding the authentication field. If the packet length is not an integral number of 16-bit words, the packet is padded with an octet of zero before calculating the checksum. AuType This 2-octet field identifies the authentication scheme to be used for the packet. Since authentication is not supported by this version of VLSP, this field contains zero. Authentication This 8-octet field is reserved for use by the authentication scheme. Since authentication is not supported by this version of VLSP, this field contains zeroes.10.5 Options Field
Hello packets and Database Description packets, as well as link state advertisements, contain a 1-octet options field. Using this field, a switch can communicate its optional capabilities to other VLSP switches. The receiving switch can then choose whether or not to support those optional capabilities. Thus, switches of differing capabilities potentially can be mixed within a single VLSP routing domain. Two optional capabilities are currently defined in the options field: routing based on Type of Service (TOS) and support for external routing beyond the local switch fabric. These two capabilities are specified in the options field as shown below.
+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0|E|T| +-+-+-+-+-+-+-+-+ The options field T-bit The T-bit specifies the switch's Type of Service (TOS) capability. If the T-bit is set, the switch supports routing based on nonzero types of service. E-bit The E-bit specifies the switch's external routing capability. If the E-bit is set, the switch supports external routing. Note: The current version of VLSP supports neither of these capabilities. Therefore, both the T-bit and the E-bit are clear and the options field contains a value of zero.10.6 Packet Formats
This section contains detailed descriptions of the five VLS protocol packets.10.6.1 Hello Packets
Hello packets are sent periodically over multi-access switch interfaces in order to discover and maintain neighbor relationships. Note: Hello packets are not sent over point-to-point network links. For point-to-point links, the VLS protocol relies on the VlanHello protocol [IDhello] to notify it of neighboring switches. Since all switches connected to a common network link must agree on certain interface parameters, these parameters are included in each Hello packet. A switch receiving a Hello packet that contains parameters inconsistent with its own view of the interface will not establish a neighbor relationship with the sending switch. The format of a Hello packet is shown below.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer addressing / VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | (unused -- must be 0) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 74 | HelloInt | Options | Priority | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 78 | DeadInt | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 82 | | + Designated switch ID + 86 | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 90 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 94 | | + Backup designated switch ID + 98 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 102 | | + + : Neighbor list : + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Network layer addressing / VLSP header This 70-octet field contains the network layer addressing information and the standard VLS protocol packet header. The packet header type field contains a value of 1. HelloInt This 2-octet field contains the interval, in seconds, at which this switch sends Hello packets. Options This 1-octet field contains the optional capabilities supported by the switch, as described in Section 10.5.
Priority This 1-octet field contains the switch priority used in selecting the designated switch and backup designated switch (see Section 6.3.1). If the value here is zero, the switch is ineligible to become the designated switch or the backup designated switch. DeadInt This 4-octet field contains the length of time, in seconds, that neighboring switches will wait before declaring the interface down once they stop receiving Hello packets over the interface. The value here is equal to the value of SwitchDeadInterval, as found in the interface data structure. Designated switch This 10-octet field contains the switch ID of the designated switch for this network link, as currently understood by the sending switch. This value is set to zero if the designated switch selection process has not yet begun. Backup designated switch This 10-octet field contains the switch ID of the backup designated switch for the network link, as currently understood by the sending switch. This value is set to zero if the backup designated switch selection process has not yet begun. Neighbor list This variable-length field contains a list of switch IDs of each switch from which the sending switch has received a valid Hello packet within the last SwitchDeadInterval seconds.10.6.2 Database Description Packets
Database Description packets are exchanged while an adjacency is being formed between two neighboring switches and are used to describe the contents of the topological database. For a complete description of the database exchange process, see Section 7.2. The format of a Database Description packet is shown below.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer addressing / VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | (unused -- must be 0) | Options | Flags | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 74 | Sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 78 | | + + : Link state advertisement headers : + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Network layer addressing / VLSP header This 70-octet field contains the network layer addressing information and the standard VLS protocol packet header. The packet header type field contains a value of 2. Options This 1-octet field contains the optional capabilities supported by the switch, as described in Section 10.5. Flags This 1-octet field contains a set of bit flags that are used to coordinate the database exchange process. The format of this octet is as follows: +-+-+-+-+-+-+-+-+ |0|0|0|0|0|I|M|MS +-+-+-+-+-+-+-+-+ I-bit (Init) The I-bit is used to signal the start of the exchange. It is set while the two switches negotiate the master/slave relationship and the starting sequence number.
M-bit (More) The M-bit is set to indicate that more Database Description packets to follow. MS-bit (Master/Slave) The MS-bit is used to indicate which switch is the master of the exchange. If the bit is set, the sending switch is the master during the database exchange process. If the bit is clear, the switch is the slave. Sequence number This 4-octet field is used to sequence the Database Description packets during the database exchange process. The two switches involved in the exchange process agree on the initial value of the sequence number during the master/slave negotiation. The number is then incremented for each Database Description packet in the exchange. To acknowledge each Database Description packet sent by the master, the slave sends a Database Description packet that echoes the sequence number of the packet being acknowledged. Link state advertisement headers This variable-length field contains a list of link state headers that describe a portion of the master's topological database. Each header uniquely identifies a link state advertisement and its current instance. (See Section 11.1 for a detailed description of a link state advertisement header.) The number of headers included in the list is calculated implicitly from the length of the packet, as stored in the VLSP packet header (see Section 10.4).10.6.3 Link State Request Packets
Link State Request packets are used to request those pieces of the neighbor's database that the sending switch has discovered (during the database exchange process) are more up-to-date than instances in its own database. Link State Request packets are sent as the last step in bringing up an adjacency. (See Section 7.3.) The format of a Link State Request packet is shown below.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer addressing / VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | Link state type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 74 | | + Link state ID + 88 | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 82 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 86 | | + Advertising switch ID + 90 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 94 | | : . . . : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Network layer addressing / VLSP header This 70-octet field contains the network layer addressing information and the standard VLS protocol packet header. The packet header type field contains a value of 3. Link state type This 4-octet field contains the link state type of the requested link state advertisement, as stored in the advertisement header. Link state ID This 10-octet field contains the link state ID of the requested link state advertisement, as stored in the advertisement header. Advertising switch This 10-octet field contains the switch ID of advertising switch for the requested link state advertisement, as stored in the advertisement header.
Note that the last three fields uniquely identify the advertisement, but not its instance. The receiving switch will respond with its most recent instance of the specified advertisement. Multiple link state advertisements can be requested in a single Link State Request packet by repeating the link state type, ID, and advertising switch for each requested advertisement. The number of advertisements requested is calculated implicitly from the length of the packet, as stored in the VLSP packet header.10.6.4 Link State Update Packets
Link State Update packets are used to respond to a Link State Request packet or to advertise a new instance of one or more link state advertisements. Link State Update packets are acknowledged with Link State Acknowledgment packets. For more information on the use of Link State Update packets, see Section 7 and Section 8. The format of a Link State Update packet is shown below. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer addressing / VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | # advertisements | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 74 | | + + : Link state advertisements : + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Network layer addressing / VLSP header This 70-octet field contains the network layer addressing information and the standard VLS protocol packet header. The packet header type field contains a value of 4. # advertisements This 4-octet field contains the number of link state advertisements included in the packet.
Link state advertisements This variable-length field contains a list of link state advertisements. For a detailed description of the different types of link state advertisements, see Section 11.10.6.5 Link State Acknowledgment Packets
Link State Acknowledgment Packets are used to explicitly acknowledge one or more Link State Update packets, thereby making the distribution of link state advertisements reliable. (See Section 8.2.6.) The format of a Link State Acknowledgment packet is shown below. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00 | | : Network layer addressing / VLSP header : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | | + + : Link state advertisement headers : + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Network layer addressing / VLSP header This 70-octet field contains the network layer addressing information and the standard VLS protocol packet header. The packet header type field contains a value of 5. Link state advertisement headers This variable-length field contains a list of link state headers that are being acknowledged by this packet. Each header uniquely identifies a link state advertisement and its current instance. (See Section 11.1 for a detailed description of a link state advertisement header.) The number of headers included in the list is calculated implicitly from the length of the packet, as stored in the VLSP packet header (see Section 10.4).