Configuring the OSPF GTSM Functions
Context
To apply GTSM functions, enable GTSM on the two ends of the OSPF connection.
The valid TTL range of the detected packets is [255 -hops + 1, 255].
GTSM checks the TTL value of only the packets that match the GTSM policy. For the packets that do not match the GTSM policy, you can set them as "pass" or "drop". If the GTSM default action performed on the packet is set as "drop", you need to configure all the router connections for GTSM. If the packets sent from a router do not match the GTSM policy, they are dropped. The connection thus cannot be established. This ensures security but reduces the ease of use.
You can enable the log function to record information about dropped packets. This information facilitates fault location.
Procedure
- Run system-view
The system view is displayed.
- Run ospf valid-ttl-hops hops [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]
OSPF GTSM functions are configured.
The ospf valid-ttl-hops command has two functions:
Enabling OSPF GTSM
Configuring the TTL value to be detected
The parameter vpn-instance is valid only for the latter function.
Thus, if only the private network policy or the public network policy is configured, it is recommended to set the default action performed on the packets that do not match the GTSM policy as pass. This prevents the OSPF packets of other processes from being discarded incorrectly.
The parameter nonstandard-multicast is specified the GTSM configuration is also valid for multicast packets.- When the nonstandard-multicast parameter is configured: The TTL values of the multicast packets which will be sent are set as 255.
- The received multicast packets will be checked for the TTL value 1 or in the range of [ 255-hops+1, 255 ].
- (Optional) Run gtsm default-action { drop | pass }
The default action performed on the packets that do not match the GTSM policy is set.
By default, the packets that do not match the GTSM policy can pass the filtering criteria.
If the default action is configured but the GTSM policy is not configured, GTSM does not take effect.
- (Optional) Run gtsm log drop-packet all
The log function is enabled on the specified board in the system view. The information about the packets dropped by GTSM is recorded in the log.