classing gateway
marco perugini
m.perugini at 4it.it
Fri Dec 17 02:28:49 UTC 2010
hi simon,
you're absolutely right; i was really close! :) so here's my conf:
[by the way i omitted the fact that the 2 gateways are actually 2
relays. i thought i would have to class each gw like /class "gw1"{match
if gw == "gw1";}/]
cheers!
marco
# -*- mode: conf; indent-tabs-mode: t; tab-width: 2 -*-
deny bootp;
ignore client-updates;
authoritative;
ddns-update-style none;
local-port 65000;
omapi-port 999;
log-facility local7;
default-lease-time 3600;
max-lease-time 7200;
allow unknown-clients;
deny duplicates;
option domain-name-servers 8.8.4.4, 8.8.8.8;
# Option 43 suboption 1: http://192.168.8.102:7547
option vendor-encapsulated-options
01:27:68:74:74:70:3A:2F:2F:31:39:32:2E:31:36:38:2E:38:2E:31:30:32:3A:37:35:34:37;
subnet 192.168.0.0 netmask 255.255.255.0 {}
shared-network "2.101" {
subnet 192.168.2.0 netmask 255.255.255.0 {}
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 "98.101" {
subnet 192.168.98.0 netmask 255.255.255.0 {}
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;
}
}
include "/etc/dhcp/fixed.conf";
#######################################################
Il 16/12/2010 14:59, Simon Hobson ha scritto:
> 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 have
>> several entire subnets to assign to 98.101's requests and several
>> other entire subnets to assign to 2.101's requests. so the only
>> feature i'm trying to resolve is to differentiate who's asking me for
>> an addr.
>> i thought something like this would work best:
>>
>> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20101217/f825f484/attachment.html>
More information about the dhcp-users
mailing list