Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm running dnsmasq,


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

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Create a file, say /etc/, that has the same format as /etc/hosts file and list all IP addresses with name in this file:

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.