コンテンツにスキップ

sonic-dns YANG

概要

  • module: sonic-dns
  • namespace: http://github.com/sonic-net/sonic-dns
  • revision: 2023-02-14
  • import: ietf-inet-types
  • top container: sonic-dns

Domain Name System (DNS) resolver configuration YANG module for SONiC OS.1

データフロー (自動生成)

flowchart LR
  Y["sonic-dns"]
  C1[("CONFIG_DB<br/>DNS_NAMESERVER")]
  Y --> C1
  D1["hostcfgd"]
  C1 --> D1
  C2[("CONFIG_DB<br/>DNS_OPTIONS")]
  Y --> C2
  C2 --> D1

凡例

YANG モジュールから CONFIG_DB テーブル経由で subscribe する daemon/orch までを docs/reference/config-db-orch-map.md から機械生成したミニ図。詳細・例外は本ページ本文を参照。

ツリー

module: sonic-dns
  +--rw sonic-dns
     +--rw DNS_NAMESERVER
     |  +--rw DNS_NAMESERVER_LIST* [ip]
     |     +--rw ip    inet:ip-address
     +--rw DNS_OPTIONS
        +--rw search*     inet:host
        +--rw ndots?      uint8
        +--rw timeout?    uint8
        +--rw attempts?   uint8

container / list 一覧

種別 パス key 説明
container sonic-dns
container sonic-dns/DNS_NAMESERVER DNS nameserver addresses for name resolution.
list sonic-dns/DNS_NAMESERVER/DNS_NAMESERVER_LIST ip Ordered list of DNS nameserver IP addresses.
container sonic-dns/DNS_OPTIONS DNS resolver options; requires at least one nameserver to be configured.

leaf 一覧

leaf パス 必須 デフォルト enum / 範囲 / leafref 説明
ip sonic-dns/DNS_NAMESERVER/DNS_NAMESERVER_LIST/ip inet:ip-address yes IPv4 or IPv6 address of a DNS nameserver.
search[] sonic-dns/DNS_OPTIONS/search inet:host Configure the DNS search suffix list
ndots sonic-dns/DNS_OPTIONS/ndots uint8 1 range 0..15 Sets a threshold for the number of dots which must appear in a name given before an initial absolute query will be made
timeout sonic-dns/DNS_OPTIONS/timeout uint8 5 range 1..30 Sets the amount of time in seconds the resolver will wait for a response from a remote name server before retrying the query via a different name server.
attempts sonic-dns/DNS_OPTIONS/attempts uint8 2 range 1..5 Sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application.

leafref / 依存

  • なし

augment / deviation

  • なし

関連 CONFIG_DB / CLI

関連 YANG モジュール

意味的に関連する SONiC YANG モジュール (slug prefix / curated group / frontmatter related.yang から自動抽出):

関連リファレンス

  • CONFIG_DB: DNS_NAMESERVER / DNS_OPTIONS
  • CLI: config dns

運用ヒント

典型的なデプロイ位置

  • DNS resolver / domain 設定。DNS_NAMESERVER|<ip>hostcfgd/etc/resolv.conf に書く。

よくある落とし穴

  • VRF (mgmt) 環境で mgmt-vrf 上の DNS とグローバル DNS の優先順序が hostcfgd の reload 順序で変わる。

関連する config / show コマンド

sonic-db-cli CONFIG_DB keys 'DNS_NAMESERVER|*'
show dns nameserver

引用元

関連 Topics


  1. sonic-net/sonic-buildimage src/sonic-yang-models/yang-models/sonic-dns.yang @ 9ea932ec2e18f35e58268ec2e4456b1d4afd65cd