OSPF
This chapter describes the OSPF (Open Shortest Path First) routing protocol and shows you how to configure OSPF.
OSPF Overview
OSPF (Open Shortest Path First) is a link-state protocol designed to distribute routing information within an autonomous system (AS). An autonomous system is a collection of networks using a common routing protocol to exchange routing information.
OSPF offers some advantages over traditional vector-space routing protocols (such as RIP). The following table summarizes some of the major differences between OSPF and RIP.
OSPF vs. RIP 
 
OSPF
RIP
Network Size
Large
Small (with up to 15 routers)
Metrics
Bandwidth, hop count, throughput, round trip time and reliability.
Hop count
Convergence
Fast
Slow
The Switch uses OSPFv2 for IPv4. OSPFv2 uses plain text or MD5 authentication.
OSPF Autonomous Systems and Areas
An OSPF autonomous system (AS) can be divided into logical areas. Each area represents a group of adjacent networks. All areas are connected to a backbone (also known as area 0). The backbone is the transit area to route packets between two areas. A stub area, at the edge of an AS is not a transit area since there is only one connection to the stub area.
The following table describes the four classes of OSPF routers.
OSPF: Router Types 
Type
Description
Internal Router (IR)
An Internal or intra-area router is a router in an area.
Area Border Router (ABR)
An Area Border Router connects two or more areas.
Backbone Router (BR)
A backbone router has an interface to the backbone.
AS Boundary Router
An AS boundary router exchanges routing information with routers in other ASs.
The following figure depicts an OSPF network example. The backbone is area 0 with a backbone router. The internal routers are in area 1 and 2. The area border routers connect area 1 and 2 to the backbone.
OSPF Network Example
How OSPF Works
Layer-3 devices exchange routing information to build a synchronized link state database within the same AS or area. The link state database contains records of router IDs, their associated links and path costs. Each device can then use the link state database and Dijkstra algorithm to compute the least cost paths to network destinations.
Layer-3 devices build a synchronized link state database by exchanging Hello messages to confirm which neighbor (layer-3) devices exist and then they exchange database descriptions (DDs) to create the link state database. The link state database is constantly updated through LSAs (Link State Advertisements).
Interfaces and Virtual Links
An OSPF interface is a link between a layer-3 device and an OSPF network. An interface has state information, an IP address and subnet mask associated with it. When you configure an OSPF interface, you first set an interface to transmit OSPF traffic and add the interface to an area.
You can configure a virtual link to establish/maintain connectivity between a non-backbone area and the backbone. The virtual link must be configured on both layer-3 devices in the non-backbone area and the backbone.
OSPF and Router Elections
The OSPF protocol provides for automatic election of Designated Router (DR) and Backup Designated Router (BDR) on network segments. The DR and BDR keep track of link state updates in their area and make sure LSAs are sent to the rest of the network.
In most cases the default DR/BDR election is fine, but in some situations it must be controlled. In the following figure only router A has direct connectivity with all the other routers on the network segment. Routers B and C do not have a direct connection with each other. Therefore they should not be allowed to become DR or BDR. Only router A should become the DR.
OSPF Router Election Example
You can assign a priority to an interface which determines whether this router will be elected to be a DR or BDR. The router with the highest priority becomes the DR, while a router with a priority of 0 does not participate in router elections. In OSPF Router Election Example you can assign a priority of 0 to routers B and C, thereby ensuring they do not become DR or BDR and assign a priority of 1 to router A to make sure that it does become the DR.
Configuring OSPF
To configure OSPF on the Switch, do the following tasks:
1 Enable OSPF.
2 Create OSPF areas.
3 Create and associate interfaces to an area.
4 Create virtual links to maintain backbone connectivity.
IPv4 OSPF Status
Use this screen to view current IPv4 OSPF status. Click NETWORKING > OSPF > IPv4 OSPF > OSPF Status to display the screen as shown next.
NETWORKING > OSPF > IPv4 OSPF > OSPF Status
The following table describes the labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Status 
label
description
OSPF
This field displays whether OSPF is activated (Running) or not (Down).
Interface
The text box displays the OSPF status of the interfaces on the Switch.
Neighbor
The text box displays the status of the neighboring router participating in the OSPF network.
Link State Database
The text box displays information in the link state database which contains data in the LSAs.
Poll Interval(s)
The text box displays how often (in seconds) this screen refreshes. You may change the refresh interval by typing a new number in the text box and then clicking Set Interval.
Stop
Click Stop to end OSPF status polling.
The following table describes some common output fields.
NETWORKING > OSPF > IPv4 OSPF > OSPF Status: Common Output Fields 
field
description
Interface
Internet Address
This field displays the IP address and subnet bits of an IP routing domain.
Area
This field displays the area ID.
Router ID
This field displays the unique ID of the Switch.
Transmit Delay
This field displays the transmission delay in seconds.
State
This field displays the state of the Switch (backup or DR (designated router)).
Priority
This field displays the priority of the Switch. This number is used in the designated router election.
Designated Router
This field displays the router ID of the designated router.
Backup Designated Router
This field displays the router ID of a backup designated router.
Time Intervals Configured
This field displays the time intervals (in seconds) configured.
Neighbor Count
This field displays the number of neighbor routers.
Adjacent Neighbor Count
This field displays the number of neighbor routers that is adjacent to the Switch.
Neighbor
Neighbor ID
This field displays the router ID of the neighbor.
Pri
This field displays the priority of the neighbor. This number is used in the designated router election.
State
This field displays the state of the neighbor (backup or DR (designated router)).
Dead Time
This field displays the dead time in seconds.
Address
This field displays the IP address of a neighbor.
Interface
This field displays the MAC address of a device.
Link State Database
Link ID
This field displays the ID of a router or subnet.
ADV Router
This field displays the IP address of the layer-3 device that sends the LSAs.
Age
This field displays the time (in seconds) since the last LSA was sent.
Seq #
This field displays the link sequence number of the LSA.
Checksum
This field displays the checksum value of the LSA.
Link Count
This field displays the number of links in the LSA.
IPv4 OSPF Setup
Use this screen to activate OSPF for IPv4 and set general settings.
IPv4 OSPF Area
To ensure that the Switch receives only routing information from a trusted layer-3 devices, activate authentication. The OSPF supports three levels of authentication:
• None – no authentication is used.
• Simple – authenticate link state updates using an 8 printable ASCII character password. The string should not contain [ ? ], [ | ], [ ' ], [ " ] or [ , ].
• MD5 – authenticate link state updates using a 16 printable ASCII character password. The string should not contain [ ? ], [ | ], [ ' ], [ " ] or [ , ].
Click NETWORKING > OSPF > IPv4 OSPF > OSPF Setup to display the screen as shown.
NETWORKING > OSPF > IPv4 OSPF > OSPF Setup
The following table describes the related labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Setup 
label
description
Active
OSPF for IPv4 is disabled by default. Enable the switch button to enable it.
Router ID
Router ID uniquely identifies the Switch in an OSPF. Enter a unique ID (that uses the format of an IP address in dotted decimal notation) for the Switch.
Distance
Enter a number from 10 to 255 to specify the administrative distance that is assigned to routes learned by OSPF.
The lower the administrative distance value is, the more preferable the routing protocol is.
*You cannot set two routing protocols to have the same administrative distance.
Default-information Originate
Enable the switch button in the Active field to advertise a default route in your OSPF network if there is one in the routing table. When no matching route is found in the routing table, the default route will be used to forward traffic.
Always
Select the checkbox to have the Switch advertise a default route to neighboring OSPF routers even if the Switch does not have one in its routing table.
Metric
Enter a route cost (between 0 and 16777215) for the default route.
Metric Type
Select 1 to configure the default route as type 1, which has a default cost (metric) of 20 and adds up the cost toward the destination. Its external metrics are directly comparable to the internal OSPF cost. When selecting a path, the internal OSPF cost is added to the AB boundary router to the external metrics.
Select 2 to configure the default route as type 2. The route has a default cost of 20 and the metric will never change along a traffic path. Its external metrics are not comparable to the OSPF cost. In this case, the external cost of the AB boundary router is used in path decision to a destination.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Cancel
Click Cancel to begin configuring this screen afresh.
Use the below section to view and configure the IPv4 OSPF area settings.
 
Select an entry’s checkbox to select a specific entry. Otherwise, select the checkbox in the table heading row to select all entries.
Index
This field displays the index number of an area.
Name
This field displays the descriptive name of an area.
Area ID
This field displays the area ID (that uses the format of an IP address in dotted decimal notation) that uniquely identifies an area.
An area ID of 0.0.0.0 indicates the backbone.
Authentication
This field displays the authentication method used (None, Simple or MD5).
Stub / NSSA
This field displays the area defined (Stub, NSSA or None).
Add/Edit
Click Add/Edit to add a new entry or edit a selected one.
Delete
Click Delete to remove the selected entries.
Add/Edit IPv4 OSPF Areas
Use this screen to configure an IPv4 OSPF area. Click Add/Edit, or select an entry and click Add/Edit in the in the NETWORKING > OSPF > IPv4 OSPF > OSPF Setup screen to access this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Setup: Area Setup > Add/Edit
The following table describes the related labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Setup: Area Setup > Add/Edit 
label
description
Name
Enter a descriptive name (up to 32 printable ASCII characters except [ ? ], [ | ], [ ' ], [ " ] or [ , ]) for identification purposes.
Area ID
Enter a 32-bit ID (that uses the format of an IP address in dotted decimal notation) that uniquely identifies an area.
A value of 0.0.0.0 indicates that this is a backbone (also known as Area 0). You can create only one backbone area on the Switch.
Authentication
Select an authentication method (Simple or MD5) to activate authentication. Select None (default) to disable authentication.
Usually interfaces and virtual interfaces should use the same authentication method as the associated area. If interfaces and virtual interfaces use different authentication methods than the associated area, the authentication methods are based on the interfaces and virtual interfaces settings.
Stub/NSSA
Select Stub to set the area as a stub area; Select NSSA to set the area as a not-so-stubby area.
Select None if you do not want to define the area as a Stub/NSSA area.
If you enter 0.0.0.0 in the Area ID field, the settings in the stub area fields are ignored.
No Summary
Select this option to set the Switch to not send or receive LSAs.
Default route cost
Specify a cost (between 0 and 16777215) used to add a default route into a stub area for routes which are external to an OSPF domain. If you do not set a route cost, no default route is added.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Clear
Click Clear to clear the fields to the factory defaults.
Cancel
Click Cancel to not save the configuration you make and return to the last screen.
IPv4 OSPF Interfaces
To configure an OSPF interface, first create an IP routing domain in the SYSTEM > IP Setup screen. Once you create an IP routing domain, an OSPF interface entry is automatically created.
Click NETWORKING > OSPF > IPv4 OSPF > OSPF Interface to display the following screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Interface
The following table describes the labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Interface 
label
description
 
Select an entry’s checkbox to select a specific entry. Otherwise, select the checkbox in the table heading row to select all entries.
Index
This field displays the index number for an interface.
Network
This field displays the IP interface information.
Area ID
This field displays the area ID (in an IP address format with dotted decimal notation) of an area to associate the interface to that area.
Network Type
This field displays the network type (broadcast/point-to-point) of this OSPF network.
Authentication
This field displays the authentication method used (Same-as-Area, None, Simple or MD5).
Key ID
When the Authentication field displays MD5, this field displays the identification number of the key used.
Cost
This field displays the interface cost used for calculating the routing table.
Priority
This field displays the priority for this OSPF interface.
Add/Edit
Click Add/Edit to add a new entry or edit a selected one.
Delete
Click Delete to remove the selected entries.
Add/Edit IPv4 OSPF Interfaces
Use this screen to add/edit an IPv4 OSPF interface.
Click Add/Edit, or select an entry and click Add/Edit in the NETWORKING > OSPF > IPv4 OSPF > OSPF Interface to display this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Interface > Add/Edit
The following table describes the labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Interface > Add/Edit 
label
description
Network
Select an IP interface.
Area ID
Select the area ID (in an IP address format with dotted decimal notation) of an area to associate the interface to that area.
Network Type
Select the network type (broadcast/point-to-point) of this OSPF network. You should select a network type that best suits your OSPF network for your network to correctly exchange routing information. The default is broadcast network.
Select broadcast if the OSPF network consists of more than two routers with multiple endpoints. The Switch will automatically elect a DR/BDR for the network.
Select point-to-point if the OSPF network consists of only two routers. Communications in the network is based on this point-to-point connection. In this case, a DR/BDR is not needed.
*You can only set the network type to broadcast if the interface you select in the Network field is a loopback interface.
Authentication
*OSPF Interfaces must use the same authentication method within the same area.
Select an authentication method. The choices are Same-as-Area, None (default), Simple and MD5.
To participate in an OSPF network, you must make the authentication method and/or password settings the same as the associated area.
Select Same-as-Area to use the same authentication method within the area and set the related fields when necessary.
Select None to disable authentication. This is the default setting.
Select Simple and set the Key field to authenticate OSPF packets transmitted through this interface using simple password authentication.
Select MD5 and set the Key ID and Key fields to authenticate OSPF packets transmitted through this interface using MD5 authentication.
Key ID
When you select MD5 in the Authentication field, specify the identification number of the authentication you want to use.
Key
When you select Simple in the Authentication field, enter a password eight-character long. Characters after the eighth character will be ignored.
When you select MD5 in the Authentication field, enter a password 16-character long.
Cost
The interface cost is used for calculating the routing table. Enter a number between 1 and 65535. The default interface cost is 15.
Priority
The priority you assign to the interface is used in router elections to decide which router is going to be the Designated Router (DR) or the Backup Designated Router (BDR). You can assign a number between 0 and 255. A priority of 0 means that the router will not participate in router elections.
Retransmit Interval
Specify how long (in seconds) the Switch should wait for an acknowledgment packet from the interface's neighbor device before retransmitting link-state advertisements (LSAs) on the interface. The valid range for retransmitting is between 1 and 65535. The default value is 5 seconds.
Transmit Delay
Set the estimated time (in seconds) that is required to transmit a link-state update packet on the interface. The valid range for transmitting delay is between 1 and 65535. The default value is 1 second.
Hello Interval
Specify how often (in seconds) the Switch sends hello packets on the interface to check if the interface's neighbor devices still exist. The valid range for hello interval is between 1 and 65535. The default value is 10 seconds.
Dead Interval
Specify how long (in seconds) the Switch should wait for a hello packet from the interface's neighbor device before declaring that the neighbor device is not available. The valid range for dead interval is between 1 and 65535. The default value is 40 seconds.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Clear
Click Clear to clear the fields to the factory defaults.
Cancel
Click Cancel to not save the configuration you make and return to the last screen.
Configuring IPv4 OSPF Redistribution
Use this screen to configure route redistribution and summary addresses. Route redistribution is used when other routers which use RIP routing protocol and/or static routes and/or connected routes need to exchange routing information with the Switch using OSPF routing protocol. These routes are called external routes. A summary address is used to cover more than one routing entries in order to reduce the routing table size.
Click NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution to display the following screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution
The following table describes the labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution 
label
description
Redistribute Route
Route redistribution allows your Switch to import and translate the following external routes into the OSPF network transparently:
• routes learned through RIP routing protocol, or
• Static routes that are configured manually, or
• Connected routes to the interfaces that are directly connected to the Switch interfaces. These interfaces must have an IP address, such as a loopback interface, DHCP interface, or VLAN interface.
The Switch will send out the external routes information to other routers in the OSPF network through LSAs.
Active
Enable the switch button to activate route redistribution for routes learned through the selected protocol.
Type
Select 1 for routing protocols (such as RIP) whose external metrics are directly comparable to the internal OSPF cost. When selecting a path, the internal OSPF cost is added to the AB boundary router to the external metrics.
Select 2 for routing protocols whose external metrics are not comparable to the OSPF cost. In this case, the external cost of the AB boundary router is used in path decision to a destination.
Metric Value
Enter a route cost (between 0 and 16777215). The default metric value is 15.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Cancel
Click Cancel to begin configuring this screen afresh.
 
Select an entry’s checkbox to select a specific entry. Otherwise, select the checkbox in the table heading row to select all entries.
Index
This field displays the index number of the summary address.
Summary Address
This field displays the summary IP address.
Subnet Mask
This field displays the subnet mask for the summary IP address.
Add/Edit
Click Add/Edit to add a new entry or edit a selected one.
Delete
Click Delete to remove the selected entries.
Add/Edit IPv4 OSPF Redistribution
Use this screen to configure the summary address settings.
Click Add/Edit, or select an entry and click Add/Edit in the NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution to display this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution > Add/Edit
The following table describes the labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Redistribution > Add/Edit 
label
description
Summary address
Enter a network IP address which can cover more than one network in order to reduce the routing table size. For example, you can use 192.168.8.0/22 instead of using 192.168.8.0/24, 192.168.9.0/24, 192.168.10.0/24, and 192.168.11.0/24.
The third octet of these four network IP addresses is 00001000, 00001001, 00001010, 00001011 respectively. The first 6 digits (000010) are the common part among these IP addresses. So 192.168.8.0/22 can represent all of these networks.
Subnet mask
Enter the subnet mask for this summary IP address which can cover multiple networks.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Clear
Click Clear to clear the fields to the factory defaults.
Cancel
Click Cancel to not save the configuration you make and return to the last screen.
IPv4 OSPF Virtual-Links
Configure and view virtual link settings in this screen.
Click NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link to display the screen as shown next.
NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link
The following table describes the related labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link 
label
description
 
Select an entry’s checkbox to select a specific entry. Otherwise, select the checkbox in the table heading row to select all entries.
Index
This field displays an index number of an entry.
Name
This field displays a descriptive name of a virtual link.
Peer Router ID
This field displays the ID (that uses the format of an IP address in dotted decimal notation) of a peer border router.
Authentication
This field displays the authentication method used (Same-as-Area, None, Simple or MD5).
Key ID
When the Authentication field displays MD5, this field displays the identification number of the key used.
Add/Edit
Click Add/Edit to add a new entry or edit a selected one.
Delete
Click Delete to remove the selected entries.
Add/Edit IPv4 OSPF Virtual-Links
Use this screen to add/edit virtual link settings.
Click Add/Edit, or select an entry and click Add/Edit in the NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link to display this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link > Add/Edit
The following table describes the related labels in this screen.
NETWORKING > OSPF > IPv4 OSPF > OSPF Virtual-Link > Add/Edit 
label
description
Name
Enter a descriptive name (up to 32 printable ASCII characters except [ ? ], [ | ], [ ' ], [ " ] or [ , ]) for identification purposes.
Area ID
Select the area ID (in an IP address format with dotted decimal notation) of an area to associate the interface to that area.
Peer Router ID
Enter the ID of a peer border router.
Authentication
*Virtual interfaces must use the same authentication method within the same area.
Select an authentication method. The choices are Same-as-Area, None (default), Simple and MD5.
To exchange OSPF packets with a peer border router, you must make the authentication method and/or password settings the same as the peer border router.
Select Same-as-Area to use the same authentication method within the area and set the related fields when necessary.
Select None to disable authentication. This is the default setting.
Select Simple to authenticate OSPF packets transmitted through this interface using a simple password.
Select MD5 to authenticate OSPF packets transmitted through this interface using MD5 authentication.
Key ID
When you select MD5 in the Authentication field, specify the identification number of the authentication you want to use.
Key
When you select Simple in the Authentication field, enter a password eight-character long.
When you select MD5 in the Authentication field, enter a password 16-character long.
Retransmit Interval
Specify how long (in seconds) the Switch should wait for an acknowledgment packet from the interface's neighbor device before retransmitting link-state advertisements (LSAs) on the interface. The valid range for retransmitting is between 1 and 65535. The default value is 5 seconds.
Transmit Delay
Set the estimated time (in seconds) that is required to transmit a link-state update packet on the interface. The valid range for transmitting delay is between 1 and 65535. The default value is 1 second.
Hello Interval
Specify how often (in seconds) the Switch sends hello packets on the interface to check if the interface's neighbor devices still exist. The valid range for hello interval is between 1 and 65535. The default value is 10 seconds.
Dead Interval
Specify how long (in seconds) the Switch should wait for a hello packet from the interface's neighbor device before declaring that the neighbor device is not available. The valid range for dead interval is between 1 and 65535. The default value is 40 seconds.
Apply
Click Apply to save your changes to the Switch’s run-time memory. The Switch loses these changes if it is turned off or loses power, so use the Save link on the top navigation panel to save your changes to the non-volatile memory when you are done configuring.
Clear
Click Clear to clear the fields to the factory defaults.
Cancel
Click Cancel to not save the configuration you make and return to the last screen.