DHCP question

Posted on 2011-05-10
Last Modified: 2012-05-11
Hi I am familiar with DHCP but have a question about how our network is setup and things we are adding. Currently we have Cisco switch that acts as DHCP relay agents that send specific floors(floors setup in different VLANS) and sites to a scope on our DHCP server. We are planning to add a new site (we have a different team that handles the Cisco Switches) and my part is the DHCP server. So I would only need to add the new scopes. I want to understand how the whole system works, so I was told that our network team has to provide IP addresses for me and then I can create the scopes dependent on how many subnets we have. I have never configured a relay agent before so how does a machine know to go to a specific scope on the dhcp server? For example how does floor 1 know to go to 192.168.1.x scope instead of the 192.168.2.x scope? Is this a configuration that is placed in the switch and nothing done at the DHCP server? Thanks
Question by:Thomas N
    LVL 3

    Expert Comment

    When you configure VLANs there is typically a gateway for that IP scheme IE VLAN 1 = 192.168.1.x with the default gateway as VLAN 2 The DG is a L3 device. Within that L3 device there are VLAN interfaces which are assigned that IP address (interface vlan 1 ip address, (interface VLAN 2 ip address Via routing tables etc these VLANs can talk. In Cisco speak there are commands that can point DHCP requests to helper address whcih you can read about here:

    That is my 2 cents.

    Clear as mud I am sure.

    LVL 14

    Expert Comment

    Usually the network team can put the IP Helpers on the switches.  All they need is the IP address of your DHCP server
    LVL 1

    Expert Comment

    You create the scopes on your server, then provide the IP address of that server to the networking team so that they place that IP address in their Switch configuration (ip dhcp-server X.X.X.X)
    LVL 16

    Expert Comment

    The DHCP server "sees" that the DHCP request comes from a particular VLAN because it is sent (relayed/forwarded) from the VLAN interface in the switch that intercepted the client's DHCP request (broadcasted). Use a network sniffer (Wireshark, MS Netmon) on the DHCP server (flter on UDP 67 and 68) and take a look at the DHCP requests that are originating from a specific VLAN.

    If that was not clear, take a look at this pages:

    Also  check what is the use of the "Relay Agent IP" field in DHCP packets.
    LVL 16

    Accepted Solution

    To make it clearer: When the router/L3 switch forwards the DHCP request from a particular LAN, it fills the "Relay Agent IP" field in the DHCP request packet forwarded from the original client to the dhcp server. The router puts the IP address of its own interface in the VLAN that the clients which sent the DHCP requests is located in.
    Then the server "knows" what scope to use by matching this "relay agent IP" address with one of its scopes.

    Author Closing Comment

    by:Thomas N
    Very clear thanks.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
    Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip is around source server preparation. No migration is an easy migration, there is a…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now