< Home

Configuring OSPF GTSM

Context

The Generalized TTL Security Mechanism (GTSM) protects a switch by checking whether the TTL value in an IP packet header is in a pre-defined range to improve system security.

To make GTSM take effect, you need to enable GTSM on both ends of an OSPF connection.

The valid TTL range of 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 configure a default action to pass or drop them. If the default action is drop, you need to configure GTSM for all switch connections. If GTSM is not configured for a switch, packets from the switch are dropped. Therefore, the connection to the switch cannot be established. This ensures security but reduces the ease of use.

You can enable the log function to record information about dropped packets, facilitating fault locating.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf valid-ttl-hops hops [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]

    OSPF GTSM is configured.

    The ospf valid-ttl-hops command has two functions:

    • Enabling OSPF GTSM

    • Configuring a valid TTL range of packets

    The parameter vpn-instance is valid only for the latter function.

    Therefore, if only a private network policy or a public network policy is configured, you are advised to set the default action to be performed on packets that do not match the GTSM policy as pass. This prevents the OSPF packets of other instances from being discarded incorrectly.

  3. (Optional) Run gtsm default-action { drop | pass }

    The default action to be performed on packets that do not match the GTSM policy is set.

    By default, the action is pass.

    If the default action is configured but no GTSM policy is configured, GTSM does not take effect.

  4. (Optional) Run gtsm log drop-packet all

    The log function is enabled on the device in the system view. The information about the packets dropped by GTSM will be recorded in the log.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >