Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 3 product line. The current stable release is 3.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 127055

Summary: dhcpd example error in System Administration Guide
Product: Red Hat Enterprise Linux 3 Reporter: Ian Laurie <nixuser>
Component: rhel-sagAssignee: Sandra Moore <smoore>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: adstrong, andriusb, jha, jvdias
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-13 18:25:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123819    

Description Ian Laurie 2004-07-01 05:19:02 UTC
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 21:43:04 UTC
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 21:57:00 UTC
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 22:04:31 UTC
Ian, yes, that sounds better! :-)

Jason, what do you think?

Comment 4 Andrius Benokraitis 2005-01-12 22:06:54 UTC
Would these two new subnets be able to reach the router though
(192.169.1.254)?

Comment 5 Andrius Benokraitis 2005-01-12 22:17:25 UTC
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 22:38:29 UTC
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 22:42:08 UTC
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 22:45:52 UTC
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 22:57:04 UTC
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 22:58:08 UTC
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 22:59:15 UTC
For the record, can I say I hate dealing with subnetting? ;-)

Comment 12 Ian Laurie 2005-01-12 23:07:02 UTC
You and everyone else :-)


Comment 13 Andrius Benokraitis 2005-01-13 18:25:33 UTC
I'm going with my last example for the RHEL4 docs... thanks to
everyone who gave input! :-)