Re: Make a DHCP server using Fedora - Help

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

 



Tim:
>> It seems pointlessly redundant to declare a subnet twice.  And stranger
>> to declare it differently.  I see no point for the first one.

Antonio Olivares:
> Which one should I keep Tim, the first one or the second one?

I believe my last sentence should have answered that.

> The machine that will become the server has gateway 10.154.19.1, is 
> it okay to make the server 10.154.19.0 ?

Addresses ending with zero or 255 (x.y.z.0 and x.y.z.255) are generally
regarded as special purpose addresses, and machines would normally be
assigned addresses from 1 to 254 as the last quad.

It's not a hard and fast rule, there are exceptions.  But some things
make assumptions, and get their knickers in a twist if you try to do
otherwise.

There's two conventions of using the .1 or .254 address for your
router/gateway, but that's just a convention, and about the only thing
that insisted on one of them was the *old* Windows internet connection
sharing, that insisted on using 192.168.0.1 for the gateway PC.

> Also the machine's netmask is 255.255.255.0 and the netmask of the
> server should it be 255.255.255.0 or 255.255.255.254 or other thing?

If everything is actually on the same subnet (e.g, they're wired
together through a switch or router, and they can all connect to each
other without having to go through a gateway) then they should all have
the same netmask.  For the average home network, using 192.168.x.y
addressing, then the 255.255.255.0 netmask suffices.

If there are separate physical networks, or you have some need to carve
up how you're using it, then you can use more restrictive netmasks, and
you may have to, for those networks to work (they need to know the
boundary between the same network and the outside network, so they can
make connections to the outside one through the gateway between them).

I would suggest that whatever PC you're running the DHCP server on
should have a fixed IP address, and for that to be fixed in your network
configuration, not trying to get the DHCP server to set its own IP
address.  This, probably, also means ensuring that the NetworkManager
service is turned off, and the older network service is used.

My DHCP server still runs on a Fedora Core 4 box, and I have no
parameters set into it for what interface it listens to, there's only
one network interface on the box.

My working /etc/dhcp.conf file is below, with example.com being used as
an example domain name.  It has more options than you'd need, and some
you probably should remove.

authoritative;

include "/etc/rndc.key";
# (This is the same key used by BIND and the rndc tool, it's needed to
#  be able to update DNS records.)

# Server configuration:
ddns-domainname         "example.com.";
ddns-rev-domainname     "in-addr.arpa.";
ddns-update-style       interim;
ddns-updates            on;
allow                   client-updates;

default-lease-time      21600;  # 6 hours
max-lease-time          43200;  # 12 hours

# Client configuration:
option domain-name      "example.com.";
option pop-server       pop3.example.com;
option smtp-server      smtp.example.com;
option wpad-curl        code 252 = text;
option wpad-curl        "http://proxy.example.com/wpad.dat";;
option www-server       www.example.com;
option ntp-servers      time.example.com;
#option time-offset     34200;  # Australian Central Standard Time
option time-offset      37800;  # Central Australia Daylight Time

option ip-forwarding    off;    # tell clients not to act as gateways (?)


subnet 192.168.0.0 netmask 255.255.255.0 {

        range 192.168.0.100 192.168.0.200; # allocate IPs within this range

        option routers                  192.168.0.1;  # default gateway
        option subnet-mask              255.255.255.0;
        option broadcast-address        192.168.0.255;
        option domain-name-servers      192.168.0.1;

        option netbios-name-servers     192.168.0.1;  # WINS
        option netbios-dd-server        192.168.0.1;  # SMB
        option netbios-node-type 8;
        option netbios-scope "";

        option finger-server            192.168.0.1;

        zone  0.168.192.in-addr.arpa. {
                primary 192.168.0.1;
                key rndckey;
        }

        zone example.com. { 
                primary 192.168.0.1;
                key rndckey;
        }
}


-- 
[tim@localhost ~]$ uname -r
2.6.27.5-37.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux