[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting up dhcp-server on my desktop machine SOLVED

Csanyi Pal wrote:
> Bob Proulx writes:
> > Your server is configured to use dhcp to acquire a network address? 
> Yes, of course.

It was a serious question.  Servers are often configured with static
addresses.  Another popular alternative is to use the dhcp server to
assign known addresses.

> OK so now I have changed to the following my /etc/network/interfaces
> file: 
>  * /etc/network/interfaces
> # The loopback network interface
> auto lo
> iface lo inet loopback
> # To my ISP
> auto eth1
> allow-hotplug eth1 # to my ISP
>     iface eth1 inet dhcp

Oops.  I had a stray tab indent in my example.  Normally that iface
line would not be indented like that.  I know you followed my posting
but now I need to say I typo'd that line by indenting it when it would
not normally be indented.

> # to my LAN
> allow-hotplug eth0
> auto eth0
> iface eth0 inet static
>     address
>     netmask

Looks good.

>  * /etc/dhcp/dhcpd.conf
> ddns-update-style none;
> option domain-name "example.org";
> option domain-name-servers,,;

You probably did the same thing I did which was to edit those to be
generic answers.  But for the archive I will note that the domain name
should be your actual domain name instead of example.org and your
nameservers should be the nameservers you want to pass down to dhcp
clients for use.

To add a few more hints here the nameservers will in the simple case
be added to /etc/resolv.conf in order.  All queries go to the first
nameserver listed in the resolv.conf.  If that server does not respond
after a timeout interval then the resolver library code will switch to
the next nameserver and repeat.  Up to a maximum of three nameservers
may be listed.  This fallback is a "last resort" type of fallback and
isn't intended for normal operation because the delays in each lookup
can be very long and by very long I mean too long to be practical for
interactive use.  So don't count on the secondary nameserver listings
for high availability.  Alternatively a local caching nameserver
installed on the client such as bind9 or dnsmasq or others will list
only themselves in /etc/resolv.conf and then the local caching
nameserver will round-robin among all of the available nameservers and
can provide true high availability redundancy for dns.  I always
install a local caching nameserver.

> default-lease-time 600;
> max-lease-time 7200;
> authoritative;
> log-facility local7;
> subnet netmask {
>     interface eth0;
>     range;
>     default-lease-time 86400;
>     max-lease-time 86400;
>     option routers;
>     option subnet-mask;
>     option broadcast-address;
> }

Looks good.

> > What did /var/log/syslog say?
> >   # grep dhcpd /var/log/syslog
> No it is OK:

Agreed.  That output you showed looked okay to me too.

> > If your desktop is always online then you might consider avoiding
> > network-manager.  It is useful on a mobile device that needs to be
> > selecting different networks at different times.  But wicd does the
> > job better.  Adn you don't need it on an always on desktop or server
> > and n-m has so many bad problems that it is best to avoid it when
> > possible.  Stop network-manager and add this to your interfaces file.
> I have purged now network-manager from my desktop system that is always
> online. 

Network Manager is one of those very polarizing items that some people
love extemely and others hate extremely.  I am always happy to avoid it.
I think you will be much better off without it too.

> > Hopefully the above will get you going.  Please let us know how it
> > goes one way or the other.
> Thank you very much Bob and Tom! It goes well with the abowe showed
> setup! 

Excellent!  Very glad to hear that things are now working for you.

Good luck!

Attachment: signature.asc
Description: Digital signature

Reply to: