dns-redirect response ttl

Function

The dns-redirect response ttl command configures a TTL value for DNS response packets.

The undo dns-redirect response ttl command deletes a TTL value.

The default TTL value for DNS response packets is 60s.

This command is supported only on the NetEngine 8000 F1A.

Format

dns-redirect response ttl ttl-value

undo dns-redirect response ttl ttl-value

Parameters

Parameter Description Value
ttl-value

Specifies a TTL value for DNS response packets.

The value is an integer ranging from 0 to 3600, in seconds.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
portal write

Usage Guidelines

Usage Scenario

When web users access the network using HTTPS and a list of accessible hosts in the pre-authentication domain needs to be configured, the system filters DNS packets to be sent to users in the pre-authentication domain based on whitelists. DNS packets that do not match the whitelists are redirected to a specified web server. To configure a TTL value for DNS response packets, run the dns-redirect response ttl command. After the command is run, the device changes the TTL value of the DNS packets that do not match whitelists to that configured. The TTL value of the DNS packets that match the whitelists is not changed. After a user terminal receives a DNS response packet, the user terminal generates a DNS entry based on the packet and uses the TTL value carried in the packet as the lifetime of the DNS entry. If the user terminal desires to access the same domain name before the DNS entry is aged, the user terminal will not send a DNS request again. Instead, the user terminal redirects the user to the web server address recorded in the DNS entry. If the TTL value is too large, the user cannot be directed to the IP address of the URL which the user requests to access. To prevent DNS entries from being cached for too long, run the dns-redirect response ttl ttl-value command to set a lifetime for the DNS entries.

Precautions

In VS mode, this command is supported only by the admin VS.

Example

# Configure the TTL value for DNS response packets as 500s.
<HUAWEI> system-view
[~HUAWEI] dns-redirect response ttl 500
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >