cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5567
Views
25
Helpful
8
Replies

Cisco Router configured as a DHCP Server not replying to "relayed" DHCP discovery packets

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

8 Replies 8

Hi,

It seems to me routing issue from R2 to R1. Do you have route to 10.2.1.1 from R2? Please post the output of 'sh ip route' on R2.
Also, the default router should be 10.2.1.1 in the dhcp pool.

HTH,
Meheretab
HTH,
Meheretab

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

Julio E. Moisa
VIP Alumni
VIP Alumni

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

 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

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.

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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...