The ospf valid-ttl-hops command enables OSPF GTSM and set the TTL value to be checked.
The undo ospf valid-ttl-hops command disables OSPF GTSM.
By default, OSPF GTSM is disabled.
Parameter | Description | Value |
---|---|---|
ttl |
Specifies the TTL value to be checked. |
The value is an integer that ranges from 1 to 255. If you specify the parameter hops, the valid range of the TTL value in the packet to be checked is [ 255-hops+1, 255 ]. |
nonstandard-multicast |
Specifies the GTSM configuration is also valid for multicast packets. When the. nonstandard-multicast parameter is configured:
|
- |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. If this parameter is specified, it indicates that only the TTL value of the packets in the specified VPN instance needs to be checked. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
GTSM can be used to improve the security of an OSPF network and protect a device against attacks by checking TTL values.
If an attacker sends OSPF unicast packets to a device, the interface board that receives the packets does not verify these packets and directly sends them to the control plane, causing the control plane to be busy in processing these packets and the CPU usage to increase. After GTSM is enabled on a device, the device checks whether the TTL values in IP packets fall within a specific range and drops those out of the range. The ospf valid-ttl-hops command enables OSPF GTSM. To check the TTL values in packets matching the GTSM rule, configure the vpn-instance parameter. For example, run the ospf valid-ttl-hops command to enable OSPF GTSM on both the public and private networks. Run the ospf valid-ttl-hops 5 vpn-instance vpn1 command to enable OSPF GTSM on the public network and in the VPN, configure the TTL values of the OSPF packets in VPN 1 to be checked, and apply the default action to the OSPF packets that do not match the GTSM policies on the public network and in other VPN instances. NOTE: If a VPN instance is specified in the ospf valid-ttl-hops command and an interface is bound to this VPN instance, all the unicast packets sent to this interface are dropped when the configured TTL value is less than the actual number of hops on the network. If a virtual link or a sham link is configured, the number of TTL hops needs to be set according to the actual number of hops. That is, the number of devices that the virtual link or sham link passes through must be counted; otherwise, the packets sent from the peer end of the virtual link or sham-link are dropped.Precautions