0

I am looking at the DHCP documentation and i cannot seam to find how to configure the router to use a loopback interface as the relay-agent. My objective is to use option 82 so that the dhcp server is able to identify the pool to assign ip addresses from and use a loopback ip address as the source ip address of the DHCP request.

I know that Meraki MX routers work this way, does anyone know if this is possible on Cisco routers?

Thanks

  • DHCP Option 82 is optional - it is not enabled by default with the ip helper-address command. Unlike what you asked in your initial question, it has nothing to do with finding the correct pool - it's used to make sure that the request come from legitimate hosts and the response comes from a legitimate DHCP server. – Jesse P. Nov 23 '20 at 12:10
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer. – Ron Maupin Dec 16 '20 at 23:44
1

You want the relay agent (ip helper-address) on the interface of the network for which it is requesting an address. There are no hosts on the loopback, so it makes no sense to put the relay agent on the loopback.

For example, if interface GigabitEthernet0/1 is connected to the network (10.11.12.0/24) from which the host is requesting DHCP service, then you put the relay agent on that interface:

interface GigabitEthernet0/1
 ip address 10.11.12.1 255.255.255.0
 ip helper-address <DHCP server address>
!

There is no involvement of a loopback or any other router interface.

  • 1
    I do not understand your comment. My example is using DHCP relay (Option 82). The router interface will intercept the DHCP broadcast request and create the DHCP relay to the DHCP server using Option 82 to get the response from the DHCP server, then relay it back to the requesting host. There really is not much to it. – Ron Maupin Nov 22 '20 at 20:15
  • 1
    The DHCP server will know the correct pool because the interface uses the network to which it is connected to tell the DHCP server which pool to use. The server will have the correct information. The ip help-address absolutely does use Option 82. You seem to be trying to make this more complicated than it really is. – Ron Maupin Nov 22 '20 at 20:23
  • 1
    You put the ip helper-address command on the interface. If you have three interfaces with different networks, and your DHCP server has a pool for each of the networks. The interfaces will create DHCP Option 82 requests only for the network attached to the interface, and the DHCP server will know which pool to use based on the Option 82 information supplied by the interface. It is really very simple. – Ron Maupin Nov 22 '20 at 20:29
  • 2
    The document to which you linked is about overriding the DHCP relay Option 82, but simply using the DHCP relay Option 82 is as simple as using the ip helper-address command on the interface. – Ron Maupin Nov 22 '20 at 20:31
  • 1
    @user3476261 I'm failing to see where this becoming so confusing. All you do is put the ip helper-address command along with the IP address of where to send the request (your DHCP server's IP address) and as long as you have a path to it from your device, the request is forwarded to said DHCP server for it to answer the request. – Jesse P. Nov 23 '20 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.