I have a media/file server running Ubuntu 10.10 Maverick Meerkat, connected via cable directly to a DSL router, which also acts as a network switch.
The router uses DHCP to dynamically assign IP addresses. I'd like to keep it as such, if possible. I have friends come in and it's easier for them to connect.
From my desktop (Ubuntu 10.04 Lucid Lynx) I connect via wireless to the router. I can ping the media server and ssh into it using it's IP, but it fails when I use the hostname.
When I ping and ssh wirelessly from my Netbook (Crunchbang Linux), it strangely enough works using the media server's hostname.
That said, I believe it may not be a router configuration issue, but something on my desktop I have to configure.
I tried turning off the firewall, on both sides (sudo ufw enable/disable
).
What else can I check or try? Thanks :-)
Try
sudo apt-get install winbind
You probably want to add 'wins' where it says "hosts:" in /etc/nsswitch.conf
You can also
sudo apt install samba
This has an auxillary result of making the hostname available across the LAN.
Instructions on ubuntu.com
If you can set up the machines to receive the same IP address every time, for example by using the MAC address in the router, or if you can set up static addressing on each machine, then you can create a hosts file that will enable the functionality.
Using hostnames requires the name service resolution to be properly setup, since you are using DHCP that should be automatically managed by your router. Check /etc/resolv.conf (it contains the DNS configuration).