classing gateway
Simon Hobson
dhcp1 at thehobsons.co.uk
Thu Dec 16 13:59:26 UTC 2010
marco perugini wrote:
>my dhcp server [which is 192.168.0.110] can receive DHCPDISCOVER
>from two different gateways [192.168.98.101 and 192.168.2.101]. i've
>some entire subnets to assign to 98.101's requests and other entire
>subnets to assign to 2.101's requests. so the only feature i'm
>trying to achieve is to differentiate who's asking me for an addr.
>i thought something like that:
>
>shared-network "98.101" {
> allow unknown-clients;
> deny duplicates;
>
># gw1 subnet
> subnet 192.168.98.0 netmask 255.255.255.0 {
> }
># my subnet
> subnet 192.168.0.0 netmask 255.255.255.0 {
> }
># to assign subnet
> subnet 178.45.23.0 netmask 255.255.255.0 {
> option subnet-mask 255.255.255.255;
> option broadcast-address 178.45.23.255;
> option routers 178.45.23.1;
> range 178.45.23.2 178.45.23.254;
> }
>}
>shared-network "2.101" {
> allow unknown-clients;
> deny duplicates;
>
># gw1 subnet
> subnet 192.168.2.0 netmask 255.255.255.0 {
> }
># my subnet
> subnet 192.168.0.0 netmask 255.255.255.0 {
> }
># to assign subnet
> subnet 178.48.11.0 netmask 255.255.255.0 {
> option subnet-mask 255.255.255.255;
> option broadcast-address 178.48.11.255;
> option routers 178.48.11.1;
> range 178.48.11.2 178.48.11.254;
> }
>}
Close, but 192.168.0.0 must **NOT** be in the shared-network
statements. It is on a separate network according to your description.
And don't forget that all the clients must be able to route packets
to/from the server - when they renew their leases, it is done by
unicast packets.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list