One DHCP server for two VLANS with different subnets

20 pts.
Tags:
DHCP
Layer 3-7 Switches
Switches
VLAN
Hi all,

How do I configure a same DHCP for two different VLANs. My setup is say VLAN 10 is having DHCP server with IP 10.102.1.2 VLAN 10 with subnet 10.102.1.1/16 VLAN 170 with subnet 192.168.10.1/22 VLAN 10 clients are getting DHCP, then what I have to configure in layer advanced switch to do get the DHCP IP from VLAN 10 DHCP server to VLAN 170 clients. F.Y.I interval routing is happening between two VLANs.

Answer Wiki

Thanks. We'll let you know when a new response is added.

It depends….

If you are using layer 3 switches and Windows DHCP then just configure the scopes according to the ranges per vlan and also ensure that the DHCP relay is configured on the switches. (http://support.microsoft.com/kb/120932). I cannot say for other DHCP servers like ISC or DNSMASQ, but this is based on a standard so it may work the same.

If you are using a layer 2 switch then you need to have two NICs on the DHCP server to do the job.

If you are using Cisco devices to hand out the addresses then this article (http://articles.techrepublic.com.com/5100-1035_11-5690240.html) may help as the two suggestions above would not be applicable.

HTH

—————————

DHCP relays from the non-native VLAN to the VLAN teh DHCP service/server is on is typically the best solution…

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 310329
    Yes really sir... But I am getting DHCP IP for VLAN 10 from the respective DHCP server.. my issue is I want to get DHCP IP from that VLAN 10 DHCP server to VLAN 170 clients also.... That VLAN 10 traffic should be on VLAN 170. I can't change in each VLAN in every laptop. For your information, I am using layer 3 advanced switch to do this. i also tried by enabling the IP helper in the switch but it is not happening .. please advice me how to handle this... but it is possible.. but some where i am lagging.. i want that tip... with regards sathish Network support engr.
    20 pointsBadges:
    report
  • Labnuke99
    You will need to configure the switch ports to be access ports for the VLAN where you desire these devices to be. This enables the switch to forward the DHCP requests tagged with the appropriate subnet request.
    32,960 pointsBadges:
    report
  • Snapper70
    In a Cisco switch/router config, you'd put (in the vlan configuration for 170) something like: IP helper-address 10.102.1.2 This will direct the DHCP broadcast requests to the server with multiple scopes defined. It will then know enough to forward the response back to the originating router via the giADDR field, who will in turn send the packet out to the requesting client. If your routing works properly between the 2 subnets, AND you can put the "helper-address" or equivalent into the routing portion of the switch, AND the corresponding scope is properly defined, those clients should get DHCP addresses.
    920 pointsBadges:
    report
  • Mpalomo70
    What if Ihave a problemmm with DHCP severs that have the sever cliet scope?
    30 pointsBadges:
    report
  • Mpalomo70
    And what if the clients scope is overlapping each other.
    30 pointsBadges:
    report
  • EmNichs
    Mpalomo70, You have a better chance of getting a response if you ask a new question to the community. Thanks, Em
    3,250 pointsBadges:
    report
  • Snapper70
    In addition to having the helper address on the distant subnet forwarding to the DHCP server(s), you have to also configure the additional scope(s) on the DHCP server. On the DHCP server, you have to have subnet 192.168.10.1/22 defined with the addresses you want for VLAN 170; along with ITS gateway. You can rely on global defaults (if you defined them that way) for DNS, WINS, etc. WHEN the DHCP server gets the forwarded request from the clients on the 170 VLAN (this through the helper address forwarding), the server will then see the header with the GIADDR field that SAYS this request is coming from subnet 192.168.10.1/22 and will assign an address out of THAT pool of addresses, rather than the one associated with it's directly-attached interface.
    920 pointsBadges:
    report
  • geekm
    Here is what you need to do in order to achieve this.

    1. on your router:

    conf t

    int fa0/0.1 “THIS IS FOR VLAN-10 SWITCHING”

    encap dot1Q 1

    ip address 10.102.1.140 255.255.255.0

    ip helper-address 10.20.102.1

    no shut

    exit

    int fa0/0.2 “THIS IS FOR VLAN-170 SWITCHING”

    encap dot1Q 2

    ip address 192.168.10.140 255.255.255.0

    ip helper-address 10.102.1.2

    no shut

    exit

    end

    wr mem


    2. On your switch:
    conf t
    int vlan 10
    ip address 10.102.1.150 255.255.255.0
    ip helper-address 10.102.1.2
    no shut
    exit
    int vlan 170
    ip address 192.168.10.150 255.255.255.0
    ip helper-address 10.102.1.2
    no shut
    end
    wr mem

    3. On your DHCP
    define your IP ranges for vlan 10 "10.102.1.155 - 10.102.1.234"
    set the default gateway "router" to the routers encap ip address configured earlier in this case it would be 10.102.1.140
    same for the vlan 170 "192.168.10.155 - 192.168.10.234"
    gateway "router" 192.168.10.142

    once you are done use the switchport command to assign each port to the vlan you want and make sure to put the port that is connected directly to your router in TRUNK mode.
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following