2

enter image description here

Hi, dhcp router is configured with following DHCP settings:

ip dhcp pool B
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1
ip dhcp pool C
 network 192.168.2.0 255.255.255.0
 default-router 192.168.2.1

for Router2 (network 192.168.1.0) dhcp properly leased IP address but in order to do so I had to manually assign 192.168.1.1 IP address for client (middle) router and also add ip helper-address 192.168.0.1. I understand how DHCP relay works replacing Router2 DISCOVER 255.255.255.255 destination IP address with 192.168.0.1.

However I was wondering if there is a way to lease a DHCP address for client's router g0/2 interface? If so, how can it be done? I would like to stress that g0/2 does not have any configuration yet.

4
  • Welcome. Have you tried putting both ip address dhcp and ip helper-address 192.168.0.1 on interface g0/2? Then you'd put a statically-allocated address for it on the DHCP server.
    – jonathanjo
    Sep 21, 2018 at 11:58
  • yes and it does not work, nor I see any debug traffic, and why would I? How would DISCOVER message set its SOURCE IP Address when g0/2 has none, so OFFER message from DHCP can set it as a DESTINATION IP. That is the problem :)
    – kkris1983
    Sep 21, 2018 at 12:18
  • I had forgotten that the relay has to indicate the network it received the original request on (RFC 2131 p23). Although it's not DHCP, have you considered a config merge of the appropriate interface config, which means Rclient could tftp/http/whatever fetch a config portion during boot. Then at least there's no static config on Rclient containing addresses. Alternatively ssh command from a server to Rclient.
    – jonathanjo
    Sep 21, 2018 at 12:33
  • It is not that I really must achieve this kind of solution. I am learning for CCNA and just was curious if it is possible to deal with such case with DHCP lease. So it is impossible to lease IP address in this circumstances?
    – kkris1983
    Sep 21, 2018 at 13:13

1 Answer 1

2

However I was wondering if there is a way to lease a DHCP address for client's router g0/2 interface? If so, how can it be done? I would like to stress that g0/2 does not have any configuration yet.

I dont' think that this is possible. Setting g0/2 of the "Rclient 2911" to ip address dhcp will make it broadcast out a DHCPDISCOVER into the broadcast domain where g0/2 is connected to. If there is no (other) DHCP server or relay in that broadcast domain, the DHCPDISCOVER will not be heared nor forwarded anywhere.

Other than that, if you need DHCP support in the subnet hanging off Rclient's g0/2, you'll have to give g0/2 a static IP address (typically 192.168.2.1) and activate DHCP relay on g0/2 (ip dhcp helper <DHCPserverIP>). That much, I think, you already figured out, and it replicates the solution for the 192.168.1.0/24 subnet.

However, in IPv6 such a setup might work with DHCPv6 Prefix Delegation; a concept which - as far as I know - does not exist in DHCPv4.

This is probably even the textbook use case for DHCPv6-PD: A CPE router obtains IPv6 adressing for the provider facing link via DHCPv6 or PPPoE or SLAAC (or something else entirely), and then DHCPv6-PD-requests an IPv6 Prefix (say, a /56) which is then applied to the (possibly multiple) customer-facing interfaces (typically a /64 each).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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