Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running dnsmasq,


But seems dnsmasq only recognize the last record, what should I do?

share|improve this question
up vote 5 down vote accepted

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: chat.freenode.net chat.freenode.net

Then add to the dnsmasq.conf the following line:


Or put these two lines into /etc/hosts if dnsmasq is set to read in the /etc/hosts.

Then restart dnsmasq


share|improve this answer
Yep, easier to maintain – warl0ck Nov 24 '12 at 6:43

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.