Networking Forums

Networking Forums > Computer Networking > Linux Networking > Samba configuration and name resolution?

Reply
Thread Tools Display Modes

Samba configuration and name resolution?

 
 
Jef Driesen
Guest
Posts: n/a

 
      02-10-2005, 09:59 AM
I have a home network with two computers (and maybe more in the future)
behind a D-Link DI-604 Broadband Router. The router is configured to act
as the DHCP server of the netwerk. Both computers have a dualboot setup
with Windows and Linux.

And now I want to share files and printers between both computers. On a
windows network this is very easy. On the Linux side it is a little more
difficult to configure samba, but I can make it work. Now I'm having
problems when I try to access shares with the hostname of the linux
machine. Using the IP adres, everything is just fine. So, I guess this
has something to do with name resolution?

After reading the documentation on http://www.samba.org/samba/docs/man/,
it is still confusing how I can make this work. In the examples there is
always a central server in the network, and I don't have one (except for
the DHCP server in the router). How should my configuration look like?
And will I be able to use the hostnames of my machines in other programs
(ftp,...) too? Or only for filesharing and printing?





 
Reply With Quote
 
 
 
 
James Knott
Guest
Posts: n/a

 
      02-10-2005, 12:12 PM
Jef Driesen wrote:

> After reading the documentation on http://www.samba.org/samba/docs/man/,
> it is still confusing how I can make this work. In the examples there is
> always a central server in the network, and I don't have one (except for
> the DHCP server in the router). How should my configuration look like?
> And will I be able to use the hostnames of my machines in other programs
> (ftp,...) too? Or only for filesharing and printing?


Generally, all you need is to have the computers listed in /etc/hosts.

 
Reply With Quote
 
Jef Driesen
Guest
Posts: n/a

 
      02-10-2005, 02:14 PM
James Knott wrote:
> Jef Driesen wrote:
>
>
>>After reading the documentation on http://www.samba.org/samba/docs/man/,
>>it is still confusing how I can make this work. In the examples there is
>>always a central server in the network, and I don't have one (except for
>>the DHCP server in the router). How should my configuration look like?
>>And will I be able to use the hostnames of my machines in other programs
>>(ftp,...) too? Or only for filesharing and printing?

>
>
> Generally, all you need is to have the computers listed in /etc/hosts.
>


This will not work because IP addresses are dynamically assigned by the
DHCP server in the router. And if I switch to static IP addresses, I
can't easily add more computers (without changing host files on every
machine).
 
Reply With Quote
 
Buck Turgidson
Guest
Posts: n/a

 
      02-10-2005, 02:49 PM
>
> This will not work because IP addresses are dynamically assigned by the
> DHCP server in the router. And if I switch to static IP addresses, I
> can't easily add more computers (without changing host files on every
> machine).


Just how many PCs on your home network are you planning to add? Doesn't
sound unmanageable to me, unless you're planning on building an addition to
your home to house them.

I've found static IP on Linux is much easier, given that we have power
outages from time to time here.


 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      02-10-2005, 03:11 PM
Jef Driesen wrote:

> This will not work because IP addresses are dynamically assigned by the
> DHCP server in the router. And if I switch to static IP addresses, I
> can't easily add more computers (without changing host files on every
> machine).


Unless you have a lot of computers, static IPs are fine. The easiest
method, is to manage the hosts file on one computer and then copy it to all
the others. Another possibility, would be to simply share the "master"
hosts file over the network.

 
Reply With Quote
 
Jef Driesen
Guest
Posts: n/a

 
      02-11-2005, 08:16 AM
James Knott wrote:
> Jef Driesen wrote:
>
>
>>This will not work because IP addresses are dynamically assigned by the
>>DHCP server in the router. And if I switch to static IP addresses, I
>>can't easily add more computers (without changing host files on every
>>machine).

>
>
> Unless you have a lot of computers, static IPs are fine. The easiest
> method, is to manage the hosts file on one computer and then copy it to all
> the others. Another possibility, would be to simply share the "master"
> hosts file over the network.
>


Most of the time there are only 2 computers. The reason why I don't use
static IP addresses, is because from time to time there are other people
who use my network to access the internet (they don't have an internet
connection themself). With the DHCP option of the router, there is no
need to change configurations. It's just a matter of connecting the
cables for those computers.

If I understand correctly from the documentation, Windows will use
netbios (broadcast, wins server or lmhost file) to resolve hostnames to
IP address and Linux will use DNS. Maybe there is a way to enable
netbios name resolution on linux? Adding a WINS server or DNS server is
another possibility, but then I need a server running all the time. I
only need a simple workgroup configuration.
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      02-11-2005, 12:14 PM
Jef Driesen wrote:

> Most of the time there are only 2 computers. The reason why I don't use
> static IP addresses, is because from time to time there are other people
> who use my network to access the internet (they don't have an internet
> connection themself). With the DHCP option of the router, there is no
> need to change configurations. It's just a matter of connecting the
> cables for those computers.


There's no reason why you can't use both static and dhcp addresses on the
same network. Just limit the range of dhcp addresses and put the static
addresses outside that range.

>
> If I understand correctly from the documentation, Windows will use
> netbios (broadcast, wins server or lmhost file) to resolve hostnames to
> IP address and Linux will use DNS. Maybe there is a way to enable
> netbios name resolution on linux? Adding a WINS server or DNS server is
> another possibility, but then I need a server running all the time. I
> only need a simple workgroup configuration.


I believe Linux supports broadcast. man smb.conf for more details.

 
Reply With Quote
 
Gautam Bakshi
Guest
Posts: n/a

 
      02-11-2005, 01:56 PM
Jef Driesen wrote:
> I have a home network with two computers (and maybe more in the future)
> behind a D-Link DI-604 Broadband Router. The router is configured to act
> as the DHCP server of the netwerk. Both computers have a dualboot setup
> with Windows and Linux.
>
> And now I want to share files and printers between both computers. On a
> windows network this is very easy. On the Linux side it is a little more
> difficult to configure samba, but I can make it work. Now I'm having
> problems when I try to access shares with the hostname of the linux
> machine. Using the IP adres, everything is just fine. So, I guess this
> has something to do with name resolution?
>
> After reading the documentation on http://www.samba.org/samba/docs/man/,
> it is still confusing how I can make this work. In the examples there is
> always a central server in the network, and I don't have one (except for
> the DHCP server in the router). How should my configuration look like?
> And will I be able to use the hostnames of my machines in other programs
> (ftp,...) too? Or only for filesharing and printing?
>
>
>
>
>


hmm, intresting. I have dhcp and all my samba shares work by hostname
on my network. Have you tried to go through the smb.conf file? Maybe
hostname or something is inncorrect. I believe there is a generic
template that maybe you can use to replace your exsisting conf file and
see if it works.

Or is there any type of firewall setting in the router thats blocking
netbios? When others connect to your network are you able to ping them
by hostname?

I hope this helps.
 
Reply With Quote
 
Antoine EMERIT
Guest
Posts: n/a

 
      02-13-2005, 02:35 PM
Jef Driesen <(E-Mail Removed)> écrivait news:cufegh$h79$1
@ikaria.belnet.be:
> machine. Using the IP adres, everything is just fine. So, I guess this
> has something to do with name resolution?


Samba comes with two services :

- smbd to share resources (files, printers, ...)
- nmbd to share netbios name

nmblookup is a command line used to search netbios names on the network.
Use is to check the nmb resolution.

Netbios name list may be collected throw many way :

- broadcast, with an auto-elected local master browser
- WINS server, if you set the WINS server on each station (eg: throw
dhcp)

And there is also the DNS resolution that may follow an unmatched netbios
lookup (if the station are seted with "netbios resolution over tcpip"
(network panel on windows). In that case the dhcp server may fills the
DNS server using the DDNS (Dynamic DNS) protocol.

So first, check if :

- nmbd is running, and look at the nmbd logs
- port 135-139 are opened (UDP and/or tcp)
- use nmblookup to search the local browser

Regards
 
Reply With Quote
 
Jef Driesen
Guest
Posts: n/a

 
      02-14-2005, 08:21 AM
James Knott wrote:
> Jef Driesen wrote:
>
>
>>Most of the time there are only 2 computers. The reason why I don't use
>>static IP addresses, is because from time to time there are other people
>>who use my network to access the internet (they don't have an internet
>>connection themself). With the DHCP option of the router, there is no
>>need to change configurations. It's just a matter of connecting the
>>cables for those computers.

>
>
> There's no reason why you can't use both static and dhcp addresses on the
> same network. Just limit the range of dhcp addresses and put the static
> addresses outside that range.


I discovered that my router can assign static dhcp IP addresses, based
on the MAC address. I'm using that now.

>>If I understand correctly from the documentation, Windows will use
>>netbios (broadcast, wins server or lmhost file) to resolve hostnames to
>>IP address and Linux will use DNS. Maybe there is a way to enable
>>netbios name resolution on linux? Adding a WINS server or DNS server is
>>another possibility, but then I need a server running all the time. I
>>only need a simple workgroup configuration.

>
>
> I believe Linux supports broadcast. man smb.conf for more details.


My samba installation is working now. Using netbios names with samba is
no problem anymore. Don't know how I fixed it. But I'm still confused
why hostnames don't work with other commands (eg. I can't ping with
hostname).
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do all Linux distros have Samba built-in? Detect if Samba installed? Matthew Lincoln Linux Networking 8 11-17-2008 12:11 AM
Dancing the Samba with DD-WRT (Samba FS Automount) Louis Ohland Wireless Internet 2 12-01-2006 12:55 PM
A few questions regarding samba from a samba and windows rookie Madhusudan Singh Linux Networking 0 03-30-2005 05:54 PM
No DNS resolution Mike C Windows Networking 9 02-22-2004 09:06 PM
[Samba] WINS on Samba server and Routing jbob Linux Networking 0 08-13-2003 01:31 AM



1 2 3 4 5 6 7 8 9 10 11