View Full Version : XBMC DHCP Client Host-name option?
a real hostname for the xbmc. it is no nameserver on xbmc.
not a entry in hosts on windows, like this:
c:\windows\system32\drivers\etc\
file: hosts
hosts example:
# for example:
#
# * * *102.54.94.97 * * rhino.acme.com * * * * *# source server
# * * * 38.25.63.10 * * x.acme.com * * * * * * *# x client host
127.0.0.1 * * * localhost
192.168.0.55 * *xbox
192.168.0.21 * *dbox
klick to test:
http://xbox/xbmccmd....,line2) (http://xbox/xbmccmds/xbmchttp?command=execbuiltin¶meter=xbmc.notificati on(realhostname,line2))
found this, a small linux nameserver http://thekelleys.org.uk/dnsmasq/doc.html
Is there a way to get the XBMC DHCP client to send a hostname parameter? Is there a place to set it?
The ISC DHCP client supports this. http://linux.die.net/man/8/dhclient , look for "host-name"
I want to use it for DNS stuff (which I already have working), but I need a way for the Xbox to report its name to the box handling this.
there is nowhere to set it, and i doubt it is sending it currently (won't bet on it thou)
I think I need to head somewhere and make a feature request.
is this so you can ftp to a name rather than IP ?
If so, you can change your host file on XP or Vista. Just a thought...
Gamester17
2007-07-10, 07:57
Is there a way to get the XBMC DHCP client to send a hostname parameter?What do YOU mean by host-name here (DNS or NetBIOS name?)?
If you are talking about DNS-name then you either have to set that on a DNS-server (not on/in the Xbox), and a DNS-server is not a thing that many ordinary people have/run at home, (and I very much doubt that a DNS-server will ever be added to the Xbox-version of XBMC), or alternativly you can edit your local "host" file on all of your Windows computers that you want to access your Xbox from (\WINDOWS\SYSTEM32\DRIVERS\ETC\).
If however are talking about a NetBIOS-name then know that there is already a feature request thread for that here (link) (http://xbmc.org/forum/showthread.php?t=14405). Alternativly you can edit your local "lmhost" file on all your Windows computers that you want to access your Xbox from.
What do YOU mean by host-name here (DNS or NetBIOS name?)?
Neither. DHCP clients can send their own hostname to the DHCP server. Unix systems generally use their /etc/hostname for this. Windows does the same thing, but with it's NetBIOS name serving as a standin.
In /etc/dhclient.conf, you can set it to whatever you want, so it's possible to make it different than the machine's hostname and the Samba NetBIOS name.
mrmachine
2007-07-28, 09:11
exobyte is right. Most home routers assign IP addresses with an internal DHCP address and can sometimes also specify a hostname for fixed IP addresses (based on MAC address), which is used with the internal DNS server for hostname resolution.
For devices which are assigned a dynamic IP address, the device can send a host-name option to the DHCP server when requesting an IP address, which will be used with the internal DNS server for hostname resolution.
XBMC doesn't support setting the host-name option for it's DHCP client. There is a workaround, because the default MS Dashboard *does* allow a hostname to be set. If you then set XBMC to use "Default (Dashboard)" in the Network > Assignment option, the hostname will be sent to the DHCP server which can then hand it off to the DNS server.
This didn't work for me, setting to default (dashboard). My xbox still doesn't seem to send a hostname thus disabling the functionality of dynamic dns in my dhcp-server.
Should we add a feature request? This should be simple to fix and it's probably non-RFC-compliant not to do it.
maverickprowls
2009-05-17, 17:47
If you don't fancy faffing around with DNS and DHCP (and I certainly didn't), I've just written a little python program for Linux that will discover a running Xbox (with XBMC) on it, and add it to your /etc/hosts file.
One note, your Xbox must be running an FTP server for this program to work, as it checks that the machine is connectable on port 21 (that's how it works out where the xbox is)
You can find it here:
IP-ID on Sourceforge (https://sourceforge.net/projects/ip-id/)
maverickprowls
2009-05-17, 17:52
There is a more temporary solution, if anyone wants to give it a try. I've written a short python program to locate and add a single XBMC FTP-enabled xbox to the /etc/hosts file on a /linux machine. I would image it's possible to adapt it Windows if you'd like to give it a go.
I mentioned it here http://xbmc.org/forum/showthread.php?p=337686#post337686
davewantsmoore
2009-05-19, 05:07
Thanks Maverick - it works.
Definitely the proper way to do this is to allow the DHCP client in XBMC to specify it's own hostname as part of the DHCP request. It should be quite simple to add.