Last active
September 5, 2021 22:03
-
-
Save williamcaban/0b8b79b303e07596748438a07bdab076 to your computer and use it in GitHub Desktop.
Example of dnsmasq for OpenShift lab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/dnsmasq.d/lab.conf | |
############################################################################### | |
# DNS Server (simple) | |
############################################################################### | |
#log-facility=- | |
log-facility=/opt/dnsmasq/dnsmasq.log | |
log-async=25 | |
# default to 150 | |
dns-forward-max=500 | |
cache-size=500 | |
# Log all queries (use for troubleshooting only) | |
log-queries | |
# Set local src address or interface to talk to a server | |
server=8.8.8.8 | |
# Never forward plain names (without a dot or domain part) | |
domain-needed | |
# Never forward addresses in the non-routed address spaces. | |
bogus-priv | |
# do not use /etc/resolv.conf or any other file | |
no-resolv | |
# Don't store in cache the invalid resolutions | |
no-negcache | |
expand-hosts | |
# don't read /etc/hosts | |
no-hosts | |
# read OCP hosts from file | |
# Set the default domain for dnsmasq | |
domain=lab.shift.zone | |
############################################################################### | |
# DHCP Server (common) | |
############################################################################### | |
#no-dhcp-interface=ens3 | |
dhcp-authoritative | |
dhcp-fqdn | |
#log-dhcp | |
dhcp-lease-max=100 | |
#dhcp-duid=<enterprise-id>,<uid> | |
############################################################################### | |
# END OF FILE | |
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## /etc/dnsmasq.d/mgmt.telco.shift.zone.conf | |
domain=mgmt.telco.shift.zone,198.18.111.0/24 | |
addn-hosts=/opt/dnsmasq/mgmt.telco.shift.zone.hosts | |
dhcp-hostsfile=/opt/dnsmasq/mgmt.telco.shift.zone.dhcp | |
address=/apps.mgmt.telco.shift.zone/198.18.111.10 | |
dhcp-range=set:mgmt,198.18.111.10,198.18.111.30,255.255.255.0,infinite | |
dhcp-option=tag:mgmt,option:router,198.18.111.1 | |
dhcp-option=tag:mgmt,option:dns-server,192.168.1.5 | |
dhcp-option=tag:mgmt,option:domain-search,mgmt.telco.shift.zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## /opt/dnsmasq/mgmt.telco.shift.zone.hosts | |
# ingress VIP | |
198.18.111.10 apps | |
# api VIP | |
198.18.111.11 api api-int | |
# nodes | |
198.18.111.12 m0 | |
198.18.111.13 m1 | |
198.18.111.14 m2 | |
198.18.111.15 w0 | |
198.18.111.16 w1 | |
198.18.111.17 w2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## /opt/dnsmasq/mgmt.telco.shift.zone.dhcp | |
52:54:00:11:61:01,m0 | |
52:54:00:11:61:02,m1 | |
52:54:00:11:61:03,m2 | |
52:54:00:11:61:04,w0 | |
52:54:00:11:61:05,w1 | |
52:54:00:11:61:06,w2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment