문서의 이전 판입니다!


DNS

dnsmasq.conf

#address=/double-click.net/127.0.0.1
address=/ocp.example.com/192.168.0.151
address=/.ocp.example.com/192.168.0.151

dnsmasq.conf

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/dnsmasq-resolv.conf
[root@ocp ~]# cat /etc/dnsmasq-resolv.conf 
nameserver 8.8.8.8

/etc/dnsmasq.d/dns.dns

domain-needed
bind-dynamic
bogus-priv
domain=ocp.example.com
interface=eth2
no-hosts

# host list file
addn-hosts=/etc/hosts.dnsmasq
expand-hosts

# wildcard address
address=/.apps.ocp.example.com/10.0.0.52

/etc/hosts.dnsmasq 호스트 목록 정의 파일. 위 파일에서 참조

10.0.0.10 openshift-master-0
10.0.0.11 openshift-master-1
10.0.0.12 openshift-master-2
10.0.0.20 openshift-worker-0
10.0.0.21 openshift-worker-1
10.0.0.50 api
10.0.0.253 provisioner

/etc/dnsmasq.d/dhcp.dns

domain-needed
bind-dynamic
bogus-priv
domain=ocp.example.com
dhcp-range=10.0.0.200,10.0.0.240

### dhcp option
# dhcp-option=3   ; 3=router
# dhcp-option=6   ; 6=dns-server
# dhcp-option=option:router
# dhcp-option=option:dns-server

# GW 설정
dhcp-option=3,10.0.0.1
# DNS 설정
dhcp-option=6,10.0.0.254
server=10.0.0.254

# 해당하지 않는 도메인에 대한 외부질의 설정
resolv-file=/etc/resolv.conf.upstream
interface=eth2

# DHCP MAC Address 기반 hostname, IP할당 설정.
dhcp-host=00:50:56:86:25:d6,provisioner.ocp.example.com,10.0.0.253
dhcp-host=00:50:56:86:b1:1a,openshift-master-0.ocp.example.com,10.0.0.10
dhcp-host=00:50:56:86:ad:2a,openshift-master-1.ocp.example.com,10.0.0.11
dhcp-host=00:50:56:86:76:93,openshift-master-2.ocp.example.com,10.0.0.12
dhcp-host=00:50:56:86:12:86,openshift-worker-0.ocp.example.com,10.0.0.20
dhcp-host=00:50:56:86:22:0b,openshift-worker-1.ocp.example.com,10.0.0.21

/etc/resolv.conf.upstream 외부 DNS서버 정의 파일. 위 설정에서 참조

# 외부 DNS 서버
nameserver 192.168.0.1
  • dns.1620116277.txt.gz
  • 마지막으로 수정됨: 2021/05/04 08:17
  • 저자 koov