LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   udhcpc can’t pick hostname→ip table from DHCP server (https://www.linuxquestions.org/questions/linux-networking-3/udhcpc-can%92t-pick-hostname-ip-table-from-dhcp-server-4175490371/)

fargred 01-06-2014 08:35 PM

udhcpc can’t pick hostname→ip table from DHCP server
 
I have two machines with gentoo. One of them is server and runs dnsmasq, which configuration file contain lines like
Code:

address=/binhost/192.168.0.2
address=/anotherhost/192.168.0.3

and so on.
The second one is client, it uses "/bin/busybox udhcpc" as dhcp client. The problem is client cannot find hostnames from dnsmasq config until the interface is restarted. It never works just from the start. Portage cannot find named host to download binary packages from, and traceroute shows no hostname
Code:

# /bin/busybox traceroute 192.168.0.1
traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
 1  192.168.0.1 (192.168.0.1)  1.279 ms  0.380 ms  1.053 ms

However, once the interface has been restarted…
Code:

# /bin/busybox traceroute 192.168.0.1
traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
 1  gate.localweb (192.168.0.1)  1.021 ms  0.330 ms  958 ms

net.wlan0 is in runlevel boot.

Mani84 01-07-2014 09:20 AM

Refer

https://wiki.gentoo.org/wiki/Dnsmasq

It seems like dnsmasq configuration file is not set correctly.

fargred 01-10-2014 06:43 AM

It wasn’t dnsmasq. It’s the directive dns_servers_eth0 from /etc/conf.d/net that was messing the resolv.conf. The services eth0 and wlan0 are set to be running in parallel in runlevel boot; wlan’s getting up has a lag when is calls wpa_supplicant, and in that time eth0 was rewriting resolv.conf.


All times are GMT -5. The time now is 12:05 AM.