I’m new to networking in depth, I may ask silly questions. I hope you can point me in some right direction.
I have a Belkin N 150 wireless ADSL router that also acts as a wireless hub. I have these PC’s connected to it:
- wired Ubuntu 10.10 Maverick (HTPC)
- wireless Ubuntu 10.04 Lucid (desktop)
- Wireless Crunchbang linux (netbook)
- wireless Windows 7 laptop (housemate)
There may be more, like if friends/my sister visits.
The router has DHCP enabled, each PC gets an IP address, and access outside/net. It is a secured network.
Setup samba shares on the HTPC accessible (via hostname ie
smb://htpc) by all PC’s (Ubuntu/Windows) on the network – and also by whoever else I give access to the network.
I can’t ping between the PC’s by hostname, only by IP address. Hostnames don’t resolve. I managed to setup samba shares and could access them by IP, and for a short while by hostname, but then things went wonky. I must have messed somthing up, I can’t say what 🙁
Now my shares don’t work, and I can only ping by IP. I can also ssh into the HTPC fine, but only via IP address.
The firewalls on both ends are disabled while I am troubleshooting this. I did
ufw reset on the HTPC (with the samba shares) too.
/etc/nsswitch.conf. I made sure to place it before the
- configure static IP’s on the router, so I can add
/etc/hostsentries to fix the dns/hostname resolve issue, but then I could not get outside/net access.
I need to reset everything and start again, this is driving me bonkers for a few weeks now – networking is new to me 🙂 – I suspect I’m getting confused here with unreleated issues (dns resolving vs static/outside access vs samba access)
I searched ubuntuforums.org, serverfault and Google. Usually I can solve issues myself with enough time and searching, but now I suffer from info overload, and want to restart.
Which steps do I take first? Any tuts I can follow (tried a few, no luck)? What can I try to setup these:
- wireless network, DHCP, with working hostname resolution
- samba shares on the Ubuntu HTPC
Ideally I want to enable the firewall on all PC’s too, but as I said they’re disabled while troubleshooting.
Thanks for reading my question 🙂
Wireless Networks won’t interfere with your network. Ones you can ping the different hosts on their IP address they are fine and wireless is connected correctly. Just take care of some type of encryption, everything below WPA2 is already easily cracked, therefore I suggest to use WPA2-Personal with a long enough key.
For DHCP I would use your router, they normaly have DHCP build in. There it’s simple to configure.
For your name resolution, DNS can be used, but normally windows uses NetBIOS Names to emulate a simple DNS System. Also samba has this system integrated.
In Ubuntu you need to install samba
sudo apt-get install samba
or try to create a shared folder in the Filebrowser, then it will ask you to install all the necessary packages.
Check also Places->Network in the FileBrowser, you should find the other computers there.
If you still get problems there some more steps you can do.
If you can’t resolve the hostnames of the linux computers on the windows or linux computers, it could be that nmbd is not started, to check this, try
sudo service nmbd start
check again if it is working then.
If the problem is only on the linux computers, the problem could be that the order the computer is resolving names is wrong, and your internet provider offers a DNS response for not found searches. Then you have to change the line in /etc/samba/smb.conf
name resolve order = lmhosts host wins bcast
and move lmhosts behind bcast.
name resolve order = host wins bcast lmhosts
I hope it will help.