DHCP host-name issue
Hi! I have a DHCP problem on my school network, and I'm not sure if the network's misconfigured or if there's something wrong with my DHCP client.
This is on up-to-date Ubuntu Feisty, dhcp3-client's version is 3.0.4-12ubuntu2
I have a network at school (Ethernet) which I connect to using DHCP. I can connect to the network, I receive an IP address, and the network seems to work. However, I can't configure the host-name correctly.
I have the host name set statically in /etc/hostname to "bogdanb-d620", which is my name and my computer. I have tried setting /etc/dhcp3/
Whenever the "supersede" or "request host-name" options is mentioned in the dhclient.conf file, the server (apparently) answers with my ip address. If none of the options supersede or request mentions host-name, the server doesn't send any host-name back.
The problem is that dhclient complains about the ip address given. As far as I can tell, it expects a string instead of an ip. I don't know if that's a bug in the school's server or in my client.
The secondary problem -- which is what irks me -- is that in this situation I get all sorts of weird problems with some apps. In particular, I'm trying to write some network-using application in Java, and I get stupid errors like "InetAddress.
So the question is: what can I do about the host-name? Is the server sending me garbage or is my dhclient broken? Can I convince the resolver to return my IP address for my host-name without using the DNS. (I know I can do this with /etc/hosts but I want it to work with the dynamic addresses I get through DHCP.)
And (2), can I get Java to stop being silly without solving (1)?
****************
bogdanb-d620$ sudo dhclient -d
There is already a pid file /var/run/
removed stale PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://
Listening on LPF/eth0/
Sending on LPF/eth0/
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 193.51.25.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 193.51.25.1
host-name: garbage in format string: h
host-name: 12 extra bytes
Unexpected format code h
host-name: garbage in format string: h
host-name: 12 extra bytes
Unexpected format code h
bound to 193.51.25.234 -- renewal in 834 seconds.
<Ctrl-C>
bogdanb-d620$ cat /var/lib/
lease {
interface "eth0";
fixed-address 193.51.25.234;
option subnet-mask 255.255.255.0;
option routers 193.51.25.254;
option dhcp-lease-time 1800;
option dhcp-message-type 5;
option domain-name-servers 193.51.
option dhcp-server-
option broadcast-address 193.51.25.255;
option host-name 193.51.25.255;
option domain-name "prism.uvsq.fr";
renew 4 2007/2/8 10:42:45;
rebind 4 2007/2/8 10:55:06;
expire 4 2007/2/8 10:58:51;
}
bogdanb-d620$ sudo dhclient -d
There is already a pid file /var/run/
removed stale PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://
/var/lib/
option host-name 193.
[same output as before follows]
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ralph Janke
- Solved:
- Last query:
- Last reply: