LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-16-2003, 01:23 PM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
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...
 
Old 06-16-2003, 02:54 PM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 587

Rep: Reputation: 32
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.
 
Old 06-16-2003, 05:31 PM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
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....

Last edited by itsjustme; 06-16-2003 at 05:32 PM.
 
Old 06-17-2003, 08:33 AM   #4
EvilTwinSkippy
Member
 
Registered: Mar 2003
Location: Philadelphia, PA
Distribution: RedHat, Gentoo
Posts: 51

Rep: Reputation: 15
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.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy setup for "DNS, DHCP, squid, qmail, samba, etc " mobassir Linux - Software 8 08-18-2004 07:31 AM
how to setup a solaris 8 dhcp server to do dynamic dns updates smiller71 Solaris / OpenSolaris 0 04-02-2004 02:16 PM
forward dns from dhcp to dhcp Fark Linux - Networking 3 03-31-2004 10:40 AM
setup a samba server with dhcp ebele Linux - Networking 1 12-12-2002 07:55 AM
DNS,dhcp,firewall,samba rob_roman23 Linux - Networking 8 05-24-2002 01:25 PM


All times are GMT -5. The time now is 03:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration