Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want that a name should be resolved with multiple IPv6 addresses. I don't have access to a DNS server and I don't want to run a demon for that purpose.

I want to add the entry in /etc/hosts and it should return two IPv6 addresses for a single name.

share|improve this question
add comment

migrated from stackoverflow.com Aug 5 '12 at 13:29

This question came from our site for professional and enthusiast programmers.

1 Answer

Well, if you want to do that, just do so :-)

If you add this to /etc/hosts:

2001:db8::1 testing
2001:db8::2 testing
192.168.0.1 testing

then the hostname will have three addresses:

$ telnet testing
Trying 2001:db8::1...
Trying 2001:db8::2...
Trying 192.168.0.1...
telnet: Unable to connect to remote host: No route to host

In this case the addresses don't exist so the connection fails, but you can see that it works.

share|improve this answer
    
I did the same. I gave link local address. I tried to ping them. Only the first address gets pinging. Acutally I want to check whether my machine is doing address select. So it is necessary to receive multiple A values for a particular name. –  theB Aug 2 '12 at 13:54
    
Ping does get multiple addresses. It just chooses to always use the first one. If you want a different order then you will have to reorder /etc/hosts, or use something that does automatic shuffling like DNS –  Sander Steffann Aug 2 '12 at 14:58
    
No. I want to ping to perform Default address selection (RFC3484) among all the addreses it receives before sending ICMP_REQUEST to the host. –  theB Aug 3 '12 at 5:01
    
Then talk to the developers of ping –  Sander Steffann Aug 3 '12 at 9:16
    
I am talking about ping6. Its already doing things correct. I don't know whether it is done by ping6 or the linux filters correct address from the list. But things works fine other than link local case. If destination has link local and global and source having link local and site local, my kernel prefers link locla dest with site local src. But accroding to RFC3484 it is wrong. –  theB Aug 3 '12 at 9:31
show 1 more comment

Your Answer

 
discard

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