The ospf valid-ttl-hops command enables OSPF GTSM and sets a TTL value to be checked.
The undo ospf valid-ttl-hops command disables OSPF GTSM.
By default, OSPF GTSM is disabled.
ospf valid-ttl-hops hops [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]
undo ospf valid-ttl-hops [ hops [ nonstandard-multicast ] ] [ vpn-instance vpn-instance-name ]
Parameter | Description | Value |
---|---|---|
hops | Specifies a TTL value to be checked. | The value is an integer that ranges from 1 to 255. The default value is 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 the parameter is specified, only the TTL value of the packets in the specified VPN instance needs to be checked. | The value must be an existing VPN instance name. |
Usage Scenario
In a network demanding higher security, you can enable GTSM to improve the security of the OSPF network. GTSM defends against attacks by checking the TTL value. If an attacker simulates and keeps sending OSPF unicast packets to a switch, the switch receives and directly sends the packets to the main control board for OSPF processing, without checking the validity of the packets. In this case, the switch is busy processing these packets, causing high CPU usage. GTSM protects the switches and enhances the system security by checking whether the TTL value in the IP packet header is within a pre-defined range.
The ospf valid-ttl-hops command is used to enable OSPF GTSM. To check the TTL value of packets that match the GTSM policy, the vpn-instance parameter must be specified in the command.
For example, running the ospf valid-ttl-hops command enables OSPF GTSM on both the public network and the private network. If you run the ospf valid-ttl-hops 5 vpn-instance vpn1 command:
Precautions
GTSM only checks the TTL values of the packets that match the GTSM policy. If the packets do not match the GTSM policy, you can set the pass parameter or drop parameter in the gtsm default-action command to pass or drop these packets.