LoginSignup
9
11

More than 5 years have passed since last update.

dnsmasqを使って簡単にDNS round robin(ラウンドロビン)

Posted at

dnsmasqのインストール

# yum install dnsmasq

nsswitch.confをいじって、先にdnsを参照するようにする

# cat /etc/nsswitch.conf | grep hosts:
hosts:      dns files

resolv.confをいじって、先にdnsmasqを参照するようにする

# cat /etc/resolv.conf | grep nameserver
nameserver 127.0.0.1
nameserver 192.168.1.1

hostsをいじって、round robinの設定をする

# cat /etc/hosts
192.168.1.11 test.hosts.com
192.168.1.12 test.hosts.com
192.168.1.13 test.hosts.com

dnsmasq 起動

# service dnsmasq start
9
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
11