I'm running dnsmasq,
address=/chat.freenode.net/130.239.18.172
address=/chat.freenode.net/140.211.167.105
But seems dnsmasq only recognize the last record, what should I do?
I'm running dnsmasq,
address=/chat.freenode.net/130.239.18.172
address=/chat.freenode.net/140.211.167.105
But seems dnsmasq only recognize the last record, what should I do?
Create a file, say /etc/hosts.chat.freenode.net, that has the same format as /etc/hosts file and list all IP addresses with name in this file:
130.239.18.172 chat.freenode.net
140.211.167.105 chat.freenode.net
Then add to the dnsmasq.conf the following line:
addn-hosts=/etc/hosts.chat.freenode.net
Or put these two lines into /etc/hosts if dnsmasq is set to read in the /etc/hosts.
Then restart dnsmasq
Enjoy.
Okay, after nearly 10 years, the setting in the question post is now valid since dnsmasq 2.86 release.
address=/chat.freenode.net/130.239.18.172
address=/chat.freenode.net/140.211.167.105
$ host chat.freenode.net 10.0.0.53
Using domain server:
Name: 10.0.0.53
Address: 10.0.0.53#53
Aliases:
chat.freenode.net has address 140.211.167.105
chat.freenode.net has address 130.239.18.172
Copy the existing ifcfg-etho to ifcfg-eth0:0 and change the existing IP to your virtual IP (the one you want to add).
It can be found at /etc/sysconfig/network-scripts.
Restart the network and try to ping the virtual IP.