LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP is setup. Now, DNS before Samba?? (http://www.linuxquestions.org/questions/linux-networking-3/dhcp-is-setup-now-dns-before-samba-65965/)

itsjustme 06-16-2003 01:23 PM

DHCP is setup. Now, DNS before Samba??
 
Here's my situation. I have 7 computers. One is only Smoothwall. I have my external modem connected to it. I have an 8 port switch where all 7 computers connect. Three of the PCs have Windows (95, 98, 2000) and the other 3 have Linux (Zipslack, Slackware 9.0, and Red Hat 8.0).

Smoothwall, as I understand it, and as it is currently set up, is acting as a DHCP server. So it randomly assigns an IP (from a range that I gave it at initial setup) to the computers in the system. This Red Hat machine is currently 192.168.0.56. I think it was 192.168.0.55 just the other day. And, I assume that just sort of depends on which order I start up the machines in the morning. (note: for this discussion let's just assume I can't leave the machines on all of the time and also assume that the machines won't be started up in the same order from day to day, and I won't be assigning static IP addresses.) I can connect to the internet from any machine on my system through the Smoothwall machine. And, once connected, I can access the internet from any machine on my system.

Now, of course, I want each machine on my system to be able to share files and printers with the other machines, so I will use Samba for that. However, since each machine may have a different IP address from day to day, I think I need to setup DNS on my system before I can use Samba. Is that right?

Let's say I want my system to be mysystem.com. So I will have, say, L1, L2, L3.mysystem.com and W95, W98, W2K.mysystem.com. In order for my little network to 'share', each machine has to know about L1, L2, L3, W95, W98, and W2K in mysystem.com, since they won't know about 192.168.0.nnn for each machine because of the DHCP, right?

So. My next step seems to be to learn DNS. And, should the DNS 'server' be setup on the Smoothwall machine or on one of the other Linux machines? Isn't DNS really 'bind'? Does bind have to be running on each machine, or just the machine acting as the server?

Any other insight regarding this for my situation?

Thanks for any help.

regards...

dorian33 06-16-2003 02:54 PM

Re: DHCP is setup. Now, DNS before Samba??
 
Quote:

However, since each machine may have a different IP address from day to day, I think I need to setup DNS on my system before I can use Samba. Is that right?
[/B]
I don't think so. Samba does not require DNS (although it can use it).
Regarding the rest (see: I don't know the Smoothwall) of the matters. My advices are following:
1. use DHCP but assign the constant IPs for each machine; it can be achieve using MAC addresses in the dhcpd.conf
2. setup samba with domain name 'mysystem.com'
3. define your machines in /etc/hosts (use short & full name like W98 & W98.mysystem.com)
3. use DHCP to set samba as WINS server
Thinking about DNS makes sense when:
a. you plan to setup apache - it allows you to use http://apache_box.mysystem.com against http://192.168.0.x
b. you plan to share the files of the server box in a way other than using smb protocol
c. the server works as gateway for the rest of the LAN boxes - but this case you should setup a cashing DNS rather than authoritative one.

itsjustme 06-16-2003 05:31 PM

Re: Re: DHCP is setup. Now, DNS before Samba??
 
Quote:

Originally posted by dorian33
1. use DHCP but assign the constant IPs for each machine
OK, so I can use the DHCP on the Smoothwall/router machine to give each computer on the system an IP address and manage those addresses from Smoothwall? I didn't know that DHCP would use static IP addresses.

I would like to avoid having to keep the IP addresses from all the other machines on each machine. Which I think means I don't want to maintain hosts.allow and hosts.deny files on all the computers. DHCP is supposed to be the thing that avoids that, right?

Also, I realize that Samba doesn't require DNS, but it does if I use dynamic IP assignments from DHCP, right?

thanks....

EvilTwinSkippy 06-17-2003 08:33 AM

Re: Re: Re: DHCP is setup. Now, DNS before Samba??
 
Quote:

Originally posted by itsjustme
OK, so I can use the DHCP on the Smoothwall/router machine to give each computer on the system an IP address and manage those addresses from Smoothwall? I didn't know that DHCP would use static IP addresses.



If you are editing the dhcp.conf file by hand, you simply add a host directive for every computer that pairs the Mac number with the IP address desired.

Code:

shared-network fubar {
    subnet 192.168.1.0 netmask 255.255.255.0 {
        option domain-name-servers 192.168.1.1;
        option routers 192.168.1.1;
        option subnet-mask 255.255.255.0;
        range 192.168.1.100 192.168.1.200;
    }

    host nexus-003 {
                option host-name "nexus-003";
                fixed-address 192.168.1.50;
                hardware ethernet 00:05:1a:35:8e:f8;
    }
}

Quote:

I would like to avoid having to keep the IP addresses from all the other machines on each machine. Which I think means I don't want to maintain hosts.allow and hosts.deny files on all the computers. DHCP is supposed to be the thing that avoids that, right?
Not really. All DHCP does is provide address to all those that ask of it. hosts.allow and hosts.deny are security related files. Perhapes you meant /etc/hosts which does contain a list of addresses independently of the DNS.

Quote:

Also, I realize that Samba doesn't require DNS, but it does if I use dynamic IP assignments from DHCP, right?

thanks....
Not really. SMB communicates across the broadcast channel to discover where everyone is, who they are, and what toys they are sharing on the network. However, this information is ONLY known to Samba under unix. (Windows, though, can use this information instead of DNS lookups for webserver, SSH, etc.)

If you plan on doing any kind of serious filesharing I recommend looking into fixing IP addresses through the DHCP server. It does make life awfully simple. At that point maintaining an /etc/hosts file on each machines is cake. (Or just make on /etc/hosts file and copy it to the other stations through scp whenever you make a change.)


All times are GMT -5. The time now is 03:09 PM.