Bug 127055 - dhcpd example error in System Administration Guide
dhcpd example error in System Administration Guide
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rhel-sag (Show other bugs)
3.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Sandra Moore
:
Depends On:
Blocks: 123819
  Show dependency treegraph
 
Reported: 2004-07-01 01:19 EDT by Ian Laurie
Modified: 2014-08-04 18:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-13 13:25:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Laurie 2004-07-01 01:19:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040113

Description of problem:
I'm trying to grasp the wonders of dhcpd configuration.  Code example
25-2 in rhel-sag-en seems to be wrong:

shared-network name {
    option domain-name              "test.redhat.com";
    option domain-name-servers      ns1.redhat.com, ns2.redhat.com;
    option routers                  192.168.1.254;
    more parameters for EXAMPLE shared-network
    subnet 192.168.1.0 netmask 255.255.255.0 {
        parameters for subnet
        range 192.168.1.1 192.168.1.31;
    }
    subnet 192.168.1.32 netmask 255.255.255.0 {
        parameters for subnet
        range 192.168.1.33 192.168.1.63;
    }
}

Seems to me the two subnet declarations define the same subnet. 
Perhaps the netmask needs to be something like 255.255.255.224 instead?

Or do I have this wrong?


Version-Release number of selected component (if applicable):
rhel-sag-en-3-4

How reproducible:
Always

Steps to Reproduce:
1. View Guide
2.
3.
    

Additional info:
Comment 1 Andrius Benokraitis 2005-01-12 16:43:04 EST
Ian,

Thanks so much for your reply! You are correct!

So the subnet declaration for the second subnet 
should be:
     subnet 192.168.1.32 netmask 255.255.255.224 { ... 
     };

It will be reflected in the next version of our docs out shortly! :-)

If you have any more questions or comments, please do not hesitate to
contact us directly or in the bug!

Andrius.
Comment 2 Ian Laurie 2005-01-12 16:57:00 EST
Andrius,

Are you sure?  Doesn't that still leave the second subnet as a
"sub-set" of the first subnet?

Shouldn't the subnet mask be 255.255.255.224 for both?  That would
make them exclusive I think.

Ian
Comment 3 Andrius Benokraitis 2005-01-12 17:04:31 EST
Ian, yes, that sounds better! :-)

Jason, what do you think?
Comment 4 Andrius Benokraitis 2005-01-12 17:06:54 EST
Would these two new subnets be able to reach the router though
(192.169.1.254)?
Comment 5 Andrius Benokraitis 2005-01-12 17:17:25 EST
I think this example has two subnets that can see the same router...


shared-network name {
    option domain-name              "test.redhat.com";
    option domain-name-servers      ns1.redhat.com, ns2.redhat.com;
    option routers                  192.168.0.254;
    more parameters for EXAMPLE shared-network
    subnet 192.168.1.0 netmask 255.255.0.0 {
        parameters for subnet
        range 192.168.1.1 192.168.1.254;
    }
    subnet 192.168.2.32 netmask 255.255.0.224 {
        parameters for subnet
        range 192.168.2.33 192.168.2.63;
    }
}
Comment 6 Jason Vas Dias 2005-01-12 17:38:29 EST
Hi -
  Actually, the two example should be:

shared-network name {
    option domain-name              "test.redhat.com";
    option domain-name-servers      ns1.redhat.com, ns2.redhat.com;
    option routers                  192.168.1.254;
    # more parameters for EXAMPLE shared-network
    subnet 192.168.1.0 netmask 255.255.255.128 {
        parameters for subnet
        range 192.168.1.1 192.168.1.127;
    }
    subnet 192.168.1.128 netmask 255.255.255.128 {
        parameters for subnet
        range 192.168.1.128 192.168.2.253;
    }
}

Then both can see the router, and both subnets are non-overlapping.
Comment 7 Jason Vas Dias 2005-01-12 17:42:08 EST
Aargh!
       range 192.168.1.128 192.168.2.253;
should of course be:               ^
       range 192.168.1.128 192.168.1.253;
                                   ^
Comment 8 Andrius Benokraitis 2005-01-12 17:45:52 EST
How could a machine with and IP of 192.168.1.1 see 192.168.1.254 with
your example? Wouldn't the first subnet have to be 255.255.255.0 to
see the router?

The second subnet will see the router since it's part of the subnet
anyways... right?

Please correct me if I'm a dufus...
Comment 9 Andrius Benokraitis 2005-01-12 17:57:04 EST
Simpler? :

shared-network name {
    option domain-name              "test.redhat.com";
    option domain-name-servers      ns1.redhat.com, ns2.redhat.com;
    option routers                  192.168.0.254;
    more parameters for EXAMPLE shared-network
    subnet 192.168.1.0 netmask 255.255.252.0 {
        parameters for subnet
        range 192.168.1.1 192.168.1.254;
    }
    subnet 192.168.2.32 netmask 255.255.252.0 {
        parameters for subnet
        range 192.168.2.1 192.168.2.254;
    }
}
Comment 10 Andrius Benokraitis 2005-01-12 17:58:08 EST
Simpler? (fixed):

shared-network name {
    option domain-name              "test.redhat.com";
    option domain-name-servers      ns1.redhat.com, ns2.redhat.com;
    option routers                  192.168.0.254;
    more parameters for EXAMPLE shared-network
    subnet 192.168.1.0 netmask 255.255.252.0 {
        parameters for subnet
        range 192.168.1.1 192.168.1.254;
    }
    subnet 192.168.2.0 netmask 255.255.252.0 {
        parameters for subnet
        range 192.168.2.1 192.168.2.254;
    }
}
Comment 11 Andrius Benokraitis 2005-01-12 17:59:15 EST
For the record, can I say I hate dealing with subnetting? ;-)
Comment 12 Ian Laurie 2005-01-12 18:07:02 EST
You and everyone else :-)
Comment 13 Andrius Benokraitis 2005-01-13 13:25:33 EST
I'm going with my last example for the RHEL4 docs... thanks to
everyone who gave input! :-)

Note You need to log in before you can comment on or make changes to this bug.