how to do client seperation using Vendor ID in ISC DHCP??????
Simon Hobson
simon at thehobsons.co.uk
Mon Dec 26 16:16:33 UTC 2011
<ameen.shajahan at wipro.com> wrote:
>Let us assume that there would be 2 servers running , so 2 clients
> should connect to the server.
>I am using ISC dhcp-4.2.3 code.
>
>
>
> Linux server --------------->switch PC1
>
>running two process
> i:e dhcpd
>PC2
>
>
>PC1 as client 1
>PC2 as client 2
>
>
>in switch , two ports are used to connect PC1 and PC2
>these two ports I have configured as vlans 1 and 2. (access port)
>
>Vlan 1 for PC1 connection.
>Vlan 2 for PC2 connection
Taking into account some of your other requests, it might be better
if you just described what you are trying to achieve. Each request
brings in something different, and it's hard to work out what you
have set up, what you are trying to do, and whether you are making
other mistakes that are making it hard for your to achieve what you
want.
I'm concerned that perhaps you are missing some of the fundamental
networking knowledge, and hence don't properly understand what you
are trying to configure. But we can't help with that unless we can
understand where the problem may lie.
Take this latest one, which follows on from your question about
handling two different subnets.
You describe the PCs are being on different VLANs - and BTW, your
attempt at a diagram is no help as it's been completely mangled by
the time I see it.
If the PCs are on different VLANs, then there is no difficulty at all
separating them because they are physically separated - conceptually
it's like having them on separate switches. Thus you can trunk the
VLANs into the server (in which case they appear as separate
interfaces and can (for most purposes) be treated in the same way
you'd treat two separate NICs). Or you can use a router to route one
or both of the client subnets to the server, and thus use a relay
agent to handle DHCP for those clients not directly attached to the
server.
SO, lets assume we have PCs on VLANs 10 and 20, and you want to
service these as (say) 192.168.10.0/24 and 192.168.20.0/24. If you
trunk these VLANs to the server, then (on Linux) you'd have :
eth0.10 as (say) 192.168.10.1
eth0.20 as 192.168.20.1
You could run DHCP on just one of these - ie "dhcpd <options> eth0.10"
or you could run two different instances of DHCP - ie :
dhcpd <options> eth0.10
dhcpd <options> eth0.20
But note that they must use different leases and config files.
Or you can run dhcpd on both of them with one instance - ie
dhcpd <options> eth0.10 eth0.20
or if there are no interfaces you don't want to service, just :
dhcpd <options>
Or, the server may be connected to one VLAN (it could be any, it
doesn't have to be 10 or 20), and run a relay agent to service the
clients. Eg, the server could be in VLAN 1 connected to the switch
with a non trunk port (eg eth0 on 192.168.1.1). There would be one or
more relay agents connected to VLANs 10 and 20.
The server would then listen on the one NIC, and automagically handle
the different subnets. Ie your config file just needs to be :
<global options>
subnet 192.168.1.0 ... {
}
# Note - no range as we assume no clients here
subnet 192.168.10.0 ... {
<subnet options>
range 192.168.10.10 192.168.10.254 ;
}
subnet 192.168.20.0 ... {
<subnet options>
range 192.168.20.10 192.168.20.254 ;
}
--
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