OSPF
Note: See also OSPFv3
Open Shortest Path First (OSPF) is a set of messaging protocols that are used by routers located within a single Autonomous System (AS). The Ixia hardware simulates one or more OSPF routers for the purpose of testing one or more DUT routers configured for OSPF. The OSPF version 2 specification (RFC 2328) details the message exchanges by OSPF routers, as well as the meanings and usage.
OSPF has the following three principal stages:
- The HELLO Protocol
- Database transfer
- HELLO Keepalive
When an OSPF router initializes, it sends out HELLO packets and learns of its neighboring routers by receiving their HELLO packets. If the router is on a Point-to-Point link, or on an Ethernet (transit network) link, these packets are addressed to the AllSPFRouters multicast address (224.0.0.5). In these types of networks, there is no need to manually configure any neighbor information for the routers.
Each router that is traversed on the path between neighbors is added to a list contained in the HELLO packet. In this way, each router discovers the shared set of neighbors and creates individual state machines corresponding to each of its neighbors.
If the network type is broadcast, then the process for selecting a Designated Router (DR) and Backup Designated Router (BDR) begins. A Designated Router is used to reduce the number of adjacencies required in a broadcast network. That is, if no Designated Router is used, then each router must pair (form an adjacency) with each of the other routers. In this case, the number of required adjacencies is equal to the square of the number of routers (N^2). If a DR and BDR are used, the number of required adjacencies drops to 2 times the number of routers (2N). Currently, the Ixia ports are unable to simulate a DR or BDR.
Once the routers have initialized their adjacency databases, they synchronize their databases. This process involves one router becoming the master and the other becoming the subordinate. On Ethernet networks, the DR is always the master; on point-to-point networks, the router with the highest Router ID is the master.
Link State Advertisements (LSAs) are OSPF messages that describe an OSPF router's local environment. The simplest LSA Type is the router-LSA (RouterLinks LSA). Each router is required to generate exactly one of these LSAs to describe its own attached interfaces. If a network that consists of a single OSPF area is being simulated with only point-to-point links and there are no Autonomous System Border Routers (ASBR), then this is the only type of LSA that is sent.
The subordinate asks the master for its LSA (Link State Advertisement) headers, which enables the subordinate to determine the following information:
- The subset of LSAs that the master holds, but that the subordinate does not have, and
- The subset of LSAs that the master and subordinate both have, but which are more recent on the master.
The subordinate router then proceeds to explicitly query the master to send it each LSA from Steps (1) and (2). The subordinate sends an ACK to the master upon receipt of each LSA. The global Link State Database (LSDB) is constructed by each router, based on LSAs from all the other routers in the network.
Once this exchange process is complete, the routers are considered to have reached Full Adjacency, and each runs the link state algorithm to update its IP forwarding tables. The routers continue to exchange periodic HELLO packets, as keepalive messages, until a change occurs (for example, a link goes down or an LSA expires). OSPF routers continue to periodically exchange their LSAs every 30 minutes to ensure that they all hold identical LSDBs.
This section describes the programming of the Ixia hardware related to OSPF testing, as well as the theory of operation and protocol message formats. The Ixia hardware simulates multiple OSPF routers on multiple networks. For example, in the following figure, there are three networks and three routers.
Figure: Sample OSPF Network
The Protocol Server calls for the specification of router-network connections to be specified in a network-centric fashion. One specifies the network in terms of an Area ID and network mask. One specifies the routers in terms of the interface IP address on that network and Router ID, usually the lowest IP address for the router. For the sample OSPF network, in which Router 3 is the DUT, the three networks are specified by their significant characteristics as shown in the following table.
Network | Area ID | Network Mask | Router ID | Router Interface IP Address |
---|---|---|---|---|
1 |
192.168.36.0 |
255.255.255.0 |
192.168.36.10 |
10.0.0.40 |
2 |
172.16.0.0 |
255.255.255.0 |
172.16.0.20 |
10.0.0.41 |
3 |
10.0.0.0 |
255.255.0.0 |
10.0.0.40 10.0.0.41 10.0.0.90 |
10.0.0.40 10.0.0.41 10.0.0.90 |
Within this framework, Link State Advertisements (LSAs) may be issued from the perspective of any interface on any router. Any OSPF messages from the DUT Routers may be captured and analyzed in the normal manner.
OSPFv3
Open Shortest Path First Protocol Version 3 supports Internet Protocol version 6 (IPv6), as defined in RFC 2740. The 128-bit IPv6 addressing scheme has been accommodated in OSPF through the use of new LSA types.
Some of the differences between OSPFv2 (for IPv4) and OSPFv3 (for IPv6) are listed as follows:
- Changes to adapt to the IPv6 128-bit address size. No addresses are carried in OSPF packets or basic LSAs, but addresses are carried in certain LSAs.
- OSPFv3 operation is per Link, with the IPv6 concept of `link' replacing the `IP subnet' and `network' terminology of OSPFv2.
- OSPVv3 supports multiple instances of the protocol per link, through `Instance IDs.'
- LSA flooding scope is explicitly defined in the LS Type field of each LSA.
- Authentication is handled by the IPv6 protocol itself, rather than by the OSPF protocol. For this reason, Authentication information has been removed from the packet headers in OSPFv3.
Note: In OSPFv2, IPv4 addresses were used in many contexts besides IP source and destination addresses. For example, they were assigned as name identifiers for routers (RIDs). This naming convention for RIDs has been retained in OSPFv3.