Take the 2-minute tour ×
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,

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?

share|improve this question
add comment

2 Answers

up vote 3 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:

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.

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

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
add comment

Your Answer

 
discard

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.