10-28-2017 04:43 PM - edited 03-08-2019 12:32 PM
Hi guys,
I have a simple network: a PC is connected directly to a fa0/0 interface on R1, which in turn is configured with 10.1.2.1/24.
Fa0/1 on R1 is connected to Fa0/1 on R2. R1 configured with 10.1.4.5/30 and R2 is configured with 10.1.4.6/30.
PC is set as a dhcp-client, and the DHCP server is R2. Which means that R1 needs to be configured as a dhcp relay-agent. This part of the configuration is working properly. I see the DHCP discovery packets getting in R1 being relayed to R2 as a unicast packet. The problem is that R2 is not replying. If I connect the laptop straight to Fa0/1 on R2, then the DHCP server works fine. I am wondering if there is a special configuration I need to apply on R2 so it replies to relayed discovery packets.
This is the R2 configuration as a DHCP server (is there something missing)
R2#show run | begin ip dhcp
ip dhcp excluded-address 10.2.1.1 10.2.1.10
!
ip dhcp pool POOL-A
network 10.2.1.0 255.255.255.0
default-router 10.2.1.254
Just in case you needed, here is the dhcp-relay agent config, but again this part seems to be working fine (Oh, 10.1.4.6 is perfectly pingable from R1 as well):
R1#show run interface fa0/0
interface fa0/0
ip address 10.2.1.1 255.255.255.0
ip helper-address 10.1.4.6
Solved! Go to Solution.
10-29-2017 11:53 AM
I solved the problem guys thank you so much. This was the issue:
1.- The relay agent was configured by default with "no service dhcp". This caused the relayed packets to come from 0.0.0.0 rather than 10.2.1.1
2.- The DHCP server needs to be configured with "ip dhcp relay information trust-all" so it processes relayed packets with no Giaddr field
10-28-2017 06:57 PM
10-29-2017 11:52 AM
I solved the problem guys thank you so much. This was the issue:
1.- The relay agent was configured by default with "no service dhcp". This caused the relayed packets to come from 0.0.0.0 rather than 10.2.1.1
2.- The DHCP server needs to be configured with "ip dhcp relay information trust-all" so it processes relayed packets with no Giaddr field
10-28-2017 08:16 PM - edited 10-28-2017 08:24 PM
Hi
The default router must be the gateway interface F0/0 (10.1.2.1/24) on R1, And the network should be fixed.
ip dhcp pool POOL-A
network 10.1.2.0 255.255.255.0
default-router 10.1.2.1 <--- it is the gateway, in few words R1's F0/0
Not sure if your addressing is correct but is different as mentioned previously. Once it is fixed you should be able to get IP, also verify if R2 has an entry for the PC network on its routing table.
Not really sure what is the correct network but it should be like:
ip dhcp pool POOL-A
network 10.2.1.0 255.255.255.0
default-router 10.2.1.1
:-)
10-29-2017 10:55 AM
Sorry for the misunderstanding, the subnet is 10.2.1.0/24 (I just made a mistake while typing my question). I have also fixed the default gateway as per your suggestions and it still not responsive, there is also definitely a route from R4 back to 10.2.1.0/24, so this is not the problem. I ran a "debug ip dhcp server events" and this is what seems to be the problem:
FROM R2:
*Mar 1 00:19:56.711: DHCPD: DHCPDISCOVER received from client 0063.6973.636f.2d63.3230.382e.3236.3038.2e30.3030.302d.4661.302f.30 on interface FastEthernet1/0.
*Mar 1 00:19:56.711: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 00:19:56.711: DHCPD: htype 1 chaddr c208.2608.0000
*Mar 1 00:19:56.711: DHCPD: remote id 020a00000a01040510000000
*Mar 1 00:19:56.711: DHCPD: circuit id 00000000
*Mar 1 00:19:56.715: DHCPD: there is no address pool for 10.1.4.6.
10-29-2017 12:00 PM
Hello
1) does RTR1 have a default to RTR2 ?
2) Does RTR2 have a static route pointing to R1 for subnet 10.1.2.0/24?
res
Paul
10-29-2017 11:53 AM
I solved the problem guys thank you so much. This was the issue:
1.- The relay agent was configured by default with "no service dhcp". This caused the relayed packets to come from 0.0.0.0 rather than 10.2.1.1
2.- The DHCP server needs to be configured with "ip dhcp relay information trust-all" so it processes relayed packets with no Giaddr field
10-29-2017 12:10 PM
Hello
Thank for the update - glad you got it sorted - Quite strange it didn't work from default, did you by any chance disable dhcp service on that rtr?
res
Paul
10-29-2017 12:12 PM
Not at all, this is a lab I am running on GNS3 and I created a router template for a C3725 as an "Etherswitch", and when the device came up it had this configuration by default...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide