[SOLVED] Can ping Ubuntu hosts but not Debian hosts by hostnames
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can ping Ubuntu hosts but not Debian hosts by hostnames
I have my router running dd-wrt doing dnsmasq for dns resolution.
I have two Ubuntu hosts and three Debian hosts.
All the hosts can ping each other by IP address.
All the hosts can ping the Ubuntu boxes by hostname.
No one (except the machine itself) can ping Debian hosts via hostnames.
I also have a box running Crux that I can't ping by hostname.
nslookup fails when trying ot find the Debian boxes.
the debian boxes presumably aren't providing their hostname in their dhcp request, whereas the ubuntu ones are.
Personally I would suggest not using this functionality in the first place. Configure dnsmasq to serve preconfigured data based on the clients MAC instead.
the debian boxes presumably aren't providing their hostname in their dhcp request, whereas the ubuntu ones are.
Personally I would suggest not using this functionality in the first place. Configure dnsmasq to serve preconfigured data based on the clients MAC instead.
How can I tell the debian boxes to provide their hostnames?
I would prefer to use this functionality, because they're all VMs that get created and deleted frequently in my lab environment.
I don't specifically know on debian. It depends what dhcp client it uses. I'd check which each system uses (dhcpcd, dhclient, pump etc...) and compare their respective config files. there's usually a flag that can be added to pass the data.
I've confirmed on my fresh install netbook, with Ubuntu 10.10, that this does pass the hostname to dnsmasq (which I don't usually use) running on my dd-wrt based router. So why does Debian not do this? I don't have a debian install to see. But what I can provide is the /etc/dhcp3/dhclient.conf from that machine for the OP to compare, or use as a config substitute to see if it might work (make a backup before substituting).
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name "<hostname>";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.