Product Documentation

Configuring OSPF

Sep 01, 2016

The NetScaler supports Open Shortest Path First (OSPF) Version 2 (RFC 2328). The features of OSPF on the NetScaler are:

  • If a vserver is active, the host routes to the vserver can be injected into the routing protocols.
  • OSPF can run on any subnet.
  • Route learning advertised by neighboring OSPF routers can be disabled on the NetScaler.
  • The NetScaler can advertise Type-1 or Type-2 external metrics for all routes.
  • The NetScaler can advertise user-specified metric settings for VIP routes. For example, you can configure a metric per VIP without special route maps.
  • You can specify the OSPF area ID for the NetScaler.
  • The NetScaler supports not-so-stubby-areas (NSSAs). An NSSA is similar to an OSPF stub area but allows injection of external routes in a limited fashion into the stub area. To support NSSAs, a new option bit (the N bit) and a new type (Type 7) of Link State Advertisement (LSA) area have been defined. Type 7 LSAs support external route information within an NSSA. An NSSA area border router (ABR) translates a type 7 LSA into a type 5 LSA that is propagated into the OSPF domain. The OSPF specification defines only the following general classes of area configuration:
    • Type 5 LSA: Originated by routers internal to the area are flooded into the domain by AS boarder routers (ASBRs).
    • Stub: Allows no type 5 LSAs to be propagated into/throughout the area and instead depends on default routing to external destinations.

After enabling OSPF, you need to configure advertisement of OSPF routes. For troubleshooting, you can limit OSPF propagation. You can display OSPF settings to verify the configuration.

Enabling and Disabling OSPF

Updated: 2013-09-05

To enable or disable OSPF, you must use either the command line interface or the configuration utility. When OSPF is enabled, the NetScaler starts the OSPF process. When OSPF is disabled, the NetScaler stops the OSPF routing process.

To enable or disable OSPF routing by using the command line interface

At the command prompt, type one of the following commands:

  1. enable ns feature OSPF
  2. disable ns feature OSPF

To enable or disable OSPF routing by using the configuration utility

  1. Navigate to System > Settings, in Modes and Features group, click Change advanced features.
  2. Select or clear the OSPF Routing option.

Advertising OSPF Routes

Updated: 2013-08-30

OSPF enables an upstream router to load balance traffic between two identical virtual servers hosted on two standalone NetScaler appliances. Route advertising enables an upstream router to track network entities located behind the NetScaler.

To configure OSPF to advertise routes by using the VTYSH command line

At the command prompt, type the following commands, in the order shown:

Command Specifies
VTYSH Display VTYSH command prompt.
configure terminal Enters global configuration mode.
router OSPF Start OSPF routing process and enter configuration mode for the routing process.
network A.B.C.D/M area <0-4294967295> Enable routing on an IP network.
redistribute static Redistribute static routes.
redistribute kernel Redistribute kernel routes.

Example

 
>VTYSH 
NS# configure terminal 
NS(config)# router OSPF 
NS(config-router)# network 10.102.29.0/24 area 0 
NS(config-router)# redistribute static 
NS(config-router)# redistribute kernel 

Limiting OSPF Propagations

Updated: 2013-08-30

If you need to troubleshoot your configuration, you can configure listen-only mode on any given VLAN.

To limit OSPF propagation by using the VTYSH command line

At the command prompt, type the following commands, in the order shown:

Command Specifies
VTYSH Display VTYSH command prompt.
configure terminal Enter global configuration mode.
router OSPF Start OSPF routing process and enters configuration mode for the routing process.
passive-interface < vlan_name> Suppress routing updates on interfaces bound to the specified VLAN.

Example

 
>VTYSH 
NS# configure terminal 
NS(config)# router OSPF 
NS(config-router)# passive-interface VLAN0

Verifying the OSPF Configuration

Updated: 2013-08-30

You can display current OSPF neighbors, and OSPF routes.

To view the OSPF settings by using the VTYSH command line

At the command prompt, type the following commands, in the order shown:

Command Specifies
VTYSH Display VTYSH command prompt.
sh OSPF neighbor Displays current neighbors.
sh OSPF route Displays OSPF routes.

Example

 
>VTYSH 
NS# sh OSPF neighbor 
NS# sh OSPF route 

Configuring Graceful Restart for OSPF

In a non-INC high availability (HA) setup in which a routing protocol is configured, after a failover, routing protocols are converged and routes between the new primary node and the adjacent neighbor routers are learned.  Route learning take some time to complete. During this time, forwarding of packets is delayed, network performance might get disrupted, and packets might get dropped. 

Graceful restart enables an HA setup during a failover to direct its adjacent routers to not remove the old primary node’s learned routes from their routing databases. Using the old primary node’s routing information, the new primary node and the adjacent routers immediately start forwarding packets, without disrupting network performance.

To configure graceful restart for OSPF by using the VTYSH command line, at the command prompt, type the following commands, in the order shown:

Command Example Command Description

VTYSH

VTYSH

Enters VTYSH command prompt.

configure terminal

NS# configure terminal

Enters global configuration mode.

router-id <id>

NS(config)# router-id 1.1.1.1

Sets a router identifier for the NetScaler appliance. This identifier is set for all the dynamic routing protocols.  The same ID must be specified in the other node in a high availability set up for graceful restart to work properly in the HA setup.

ospf restart grace-period <1-1800>

NS(config)# ospf restart grace-period 170

Specifies the grace period, in seconds, for which the routes are to be preserved in the helper devices.

Default value: 120 seconds. 

ospf restart helper max-grace-period <1-1800>

NS(config)# ospf restart helper max-grace-period 180

This is an optional command to limit the maximum grace period for which the NetScaler appliance will be in the helper mode. If the NetScaler appliance receives an opaque LSA with grace-period greater than the set helper max-grace-period, the LSA is discarded and the NetScaler is not placed in helper mode.

router ospf

NS(config)# router ospf

Starts OSPF routing process and enter configuration mode for the routing process.

network A.B.C.D/M area <0-4294967295>

NS(config-router)# network 192.0.2.0/24 area 0

Enables routing on an IP network.

capability restart graceful

NS(config-router)# capability restart graceful

Enables graceful restart on the OSPF routing process.

redistribute kernel

NS(config-router)# redistribute kernel

Redistributes kernel routes.