Configuring OSPF
The Citrix ADC supports Open Shortest Path First (OSPF) Version 2 (RFC 2328). The features of OSPF on the Citrix ADC 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 Citrix ADC.
- The Citrix ADC can advertise Type-1 or Type-2 external metrics for all routes.
- The Citrix ADC 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 Citrix ADC.
- The Citrix ADC 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
To enable or disable OSPF, you must use either the CLI or the GUI. When OSPF is enabled, the Citrix ADC starts the OSPF process. When OSPF is disabled, the Citrix ADC stops the OSPF routing process.
To enable or disable OSPF routing by using the CLI:
At the command prompt, type one of the following commands:
enable ns feature OSPF
disable ns feature OSPF
To enable or disable OSPF routing by using the GUI:
- Navigate toSystem>Settings, inModes and Featuresgroup, clickChange advanced features.
- Select or clear theOSPF Routingoption.
Advertising OSPF Routes
OSPF enables an upstream router to load balance traffic between two identical virtual servers hosted on two standalone Citrix ADC appliances. Route advertising enables an upstream router to track network entities located behind the Citrix ADC.
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
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
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 ip OSPF neighbor NS# sh ip 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.
优雅的重启期间使HA设置失败over 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.
Note:
Graceful restart is not supported for high availability setups in INC mode.
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 | 命令的描述 |
---|---|---|
VTYSH | VTYSH | Enters VTYSH command prompt. |
configure terminal | NS# configure terminal | Enters global configuration mode. |
router-id |
NS(config)# router-id 1.1.1.1 | 设置路由器Citrix ADC应用标识符nce. 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 Citrix ADC appliance will be in the helper mode. If the Citrix ADC appliance receives an opaque LSA with grace-period greater than the set helper max-grace-period, the LSA is discarded and the Citrix ADC 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. |