slb template dns

Configure DNS caching. You can bind only one DNS template to a virtual port. However, you can bind the same DNS template to multiple ports.

For DNS caching, bind the template to virtual port type dns-udp . Virtual port type dns applies only to DNS security.

DNS templates are not supported with stateless load-balancing methods.

dns Specification

Type Collection
Object Key(s) name
Collection Name dns-list
Collection URI /axapi/v3/slb/template/dns/
Element Name dns
Element URI /axapi/v3/slb/template/dns/{name}
Element Attributes dns_attributes
Schema dns schema

Operations Allowed:

Operation Method URI Payload

Create Object

POST

/axapi/v3/slb/template/dns/

dns Attributes

Create List

POST

/axapi/v3/slb/template/dns/

dns Attributes

Get Object

GET

/axapi/v3/slb/template/dns/{name}

dns Attributes

Get List

GET

/axapi/v3/slb/template/dns/

dns-list

Modify Object

POST

/axapi/v3/slb/template/dns/{name}

dns Attributes

Replace Object

PUT

/axapi/v3/slb/template/dns/{name}

dns Attributes

Replace List

PUT

/axapi/v3/slb/template/dns/

dns-list

Delete Object

DELETE

/axapi/v3/slb/template/dns/{name}

dns Attributes

dns-list

dns-list is JSON List of dns Attributes

dns-list : [

dns Attributes

class-list

Description: class-list is a JSON Block . Please see below for class-list

Type: Object

Reference Object: /axapi/v3/slb/template/dns/{name}/class-list

default-policy

Description: Specifies whether to cache replies to queries for the domain name.

Type: string

Supported Values: nocache, cache

Default: nocache

disable-dns-template

Description: Disable the DNS template.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

drop

Description: Drops malformed queries. Malformed queries are not sent to the DNS virtual port.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

Mutual Exclusion: drop and forward are mutually exclusive

enable-cache-sharing

Description: Enable caching of TCP-based DNS queries along with UDP-based queries.
NOTE: If DNS authentication also is enabled, the initial request is not only redirected to TCP, but is then cached so that a second request is not made to the DNS server.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

forward

Description: Sends the queries to the specified service group. Malformed queries are not sent to the DNS virtual port.

Type: string

Format: string-rlx

Mutual Exclusion: forward and drop are mutually exclusive

Reference Object: /axapi/v3/slb/service-group

max-cache-entry-size

Description: Specify the maximum number of bytes each cache entry can have.

Type: number

Range: 1-4096

max-cache-size

Description: Specify the maximum number of entries that can be cached per VIP. The maximum configurable amount depends on the amount of RAM installed on the ACOS device.

Type: number

max-query-length

Description: Specify the maximum length for DNS queries

Type: number

Range: 1-4095

name

Description: Name of the template.

Type: string

Format: string-rlx

Required: Yes

period

Description: Enables logging for DNS caching. The period option specifies how often log messages are generated.

Type: number

Range: 1-10000

query-id-switch

Description: Enables stateful query-ID-based load balancing.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

redirect-to-tcp-port

Description: Enables authentication for DNS requests received over UDP. When this feature is enabled, ACOS drops the UDP DNS request from a client, and sends the client a DNS Truncate message. To pass DNS authentication, the client must resend the DNS request over TCP.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

user-tag

Description: Customized tag

Type: string

Format: string-rlx

uuid

Description: uuid of the object

Type: string

class-list

Specification
Type object

lid-list

Description: lid-list is a JSON List . Please see below for l172_lid-list

Type: List

Reference Object: /axapi/v3/slb/template/dns/{name}/class-list/lid/{lidnum}

name

Description: Specify a class list name

Type: string

Required: Yes

uuid

Description: uuid of the object

Type: string

class-list.lid-list

Specification
Type list
Block object keys

action-value

Description: ‘dns-cache-disable’: Disable DNS cache when it exceeds limit; ‘dns-cache-enable’: Enable DNS cache when it exceeds limit; ‘forward’: Forward the traffic even it exceeds limit;

Type: string

Supported Values: dns-cache-disable, dns-cache-enable, forward

conn-rate-limit

Description: Connection rate limit

Type: number

Range: 1-2147483647

dns

Description: dns is a JSON Block . Please see below for l172_dns

Type: Object

lidnum

Description: Specify a limit ID

Type: number

Range: 1-31

lockout

Description: Don’t accept any new connection for certain time (Lockout duration in minutes)

Type: number

Range: 1-1023

log

Description: Log a message

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

log-interval

Description: Log interval (minute, by default system will log every over limit instance)

Type: number

Range: 1-255

over-limit-action

Description: Action when exceeds limit

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

per

Description: Per (Number of 100ms)

Type: number

Range: 1-65535

user-tag

Description: Customized tag

Type: string

Format: string-rlx

uuid

Description: uuid of the object

Type: string

class-list.lid-list.dns

Specification
Type object

cache-action

Description: ‘cache-disable’: Disable dns cache; ‘cache-enable’: Enable dns cache;

Type: string

Supported Values: cache-disable, cache-enable

Default: cache-disable

ttl

Description: TTL for cache entry (TTL in seconds)

Type: number

Range: 1-65535

weight

Description: Weight for cache entry

Type: number

Range: 1-7