Using different DHCP servers for different clients

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
evors
OpenVpn Newbie
Posts: 3
Joined: Mon Aug 15, 2011 8:26 am

Using different DHCP servers for different clients

Post by evors » Mon Aug 15, 2011 9:29 am

Hi all! How can I configure openvpn that different clients could use different DHCP servers? For example: the client "A" gets dhcp-server 192.168.164.5, but the client "B" has to get dhcp-server 192.168.2.1 (it is native dhcp-server to client "B"). If you need more information, please tell me about it, I'll try give it.

Thanks.
Sorry for my english, I'm just learning )

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: Using different DHCP servers for different clients

Post by george » Mon Aug 15, 2011 1:15 pm

If you need to assign clients IP addresses on different subnets, use ccd files:

http://openvpn.net/index.php/open-sourc ... tml#policy

evors
OpenVpn Newbie
Posts: 3
Joined: Mon Aug 15, 2011 8:26 am

Re: Using different DHCP servers for different clients

Post by evors » Tue Aug 16, 2011 6:25 am

Not quite, I need that client "B" could resolve DNS-name on his subnet and "A" could resolve other subnet. Is it possible?

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Using different DHCP servers for different clients

Post by Mimiko » Tue Aug 16, 2011 7:49 am

Are you talking about DHCP or DNS? First you saied about getting IP from DHCP, now about DNS. Draw a sketch about what you really want, please.

evors
OpenVpn Newbie
Posts: 3
Joined: Mon Aug 15, 2011 8:26 am

Re: Using different DHCP servers for different clients

Post by evors » Wed Aug 17, 2011 1:40 pm

I really sorry if I confused you. DNS server to subnet is gotten by DHCP, then I need use different DHCP-servers for different subnets.

Now I have decision: add string "dhcp-option DNS 192.168.2.5 " to client's config (client "B" in my example).

Thank you for help.

Post Reply