Troubleshooting DHCP Relay

Before you begin

  • Configure the server to reply to the client subnet. Check the server configuration file to verify the configuration.

  • Configure a route on the server for the client subnet to create a path on which to send replies.

About this task

Perform this procedure to troubleshoot the DHCP relay agent.

Procedure

  1. Verify that the interfaces that link the client and server are up, and that the ports are in the forwarding state.
    1. To verify client availability, you can configure a temporary static IP address on the client, and then use the ping command.

      ping WORD<0-256>

    2. To verify the port is in the forwarding state, use the following command for the slot and port number:
      show spanning-tree [rstp|mstp] port role [{sub-port]][,...][slot/all][all]}]
      Note

      Note

      Identifies the slot and port in one of the following formats:
      • a single slot and port (slot/port)

      • a range of slots and ports (slot/port-slot/port)

      • a series of slots and ports (slot/port,slot/port,slot/port)

      • all ports on the same slot (slot/all)

      • all ports on the switch (all)

      If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

      If STP detects loops in the configuration, it blocks ports to avoid flooding in the network. In this situation, the port is not in the forwarding state.

  2. Ensure that DHCP is enabled on the client interface and that a valid forwarding path exists and is enabled. Ensure the server is reachable.
  3. View the statistics counters for the relay.
  4. If request or reply counters do not increase, use a sniffer tool to ensure that the client sends the packets, and that the interface module receives the packets.

    You can configure mirroring for the ingress port to verify if the packets reach the module.

    1. If the client sends the packets, check that the packets reach the CPP and search the trace results for the ingress port:

      trace level 9 3

      trace grep WORD<0-128>

    2. If the packets reach the CPP, check that they reach the DHCP protocol; check for errors or packet drop messages:

      trace level 170 3

      trace grep WORD<0-128>

  5. If Option 82 is enabled, check the statistic counters for dropped packets, and perform a trace for the DHCP protocol:

    trace level 170 3

Example

Switch:1# ping 192.0.2.31

Switch:1:#show spanning-tree mstp port role
================================================================================
                           CIST Port Roles and States
================================================================================
Port-Index  Port-Role    Port-State   PortSTPStatus  PortOperStatus
--------------------------------------------------------------------------------
1/1         Disabled     Forwarding   Disabled       Disabled
1/2         Disabled     Forwarding   Disabled       Disabled
1/3         Disabled     Discarding   Enabled        Disabled
1/4         Disabled     Discarding   Enabled        Disabled
1/5         Disabled     Forwarding   Disabled       Disabled
1/6         Disabled     Forwarding   Disabled       Disabled
1/7         Disabled     Forwarding   Disabled       Disabled
1/8         Disabled     Forwarding   Disabled       Disabled
1/9         Disabled     Discarding   Enabled        Disabled
1/10        Disabled     Discarding   Enabled        Disabled
1/11        Disabled     Discarding   Enabled        Disabled
1/12        Designated   Forwarding   Enabled        Enabled
1/13        Disabled     Forwarding   Disabled       Disabled
1/14        Disabled     Forwarding   Disabled       Disabled

--More-- (q = quit)

Switch:1:# trace level 9 3

Switch:1:# trace grep 00-1A-4B-8A-FB-6B

Variable Definitions

Use the data in the following table to use the troubleshooting commands in this procedure.

Variable

Value

{slot/port[/sub-port][-slot/port[/sub-port]][,...][slot/all][all]}

Identifies the slot and port in one of the following formats:
  • a single slot and port (slot/port)

  • a range of slots and ports (slot/port-slot/port)

  • a series of slots and ports (slot/port,slot/port,slot/port)

  • all ports on the same slot (slot/all)

  • all ports on the switch (all)

If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

WORD<0-128>

Specifies the text string to use as the search criterion.

WORD<0-256>

Specifies the IP address.