Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    clear dhcp relay statistics

    Syntax

    clear dhcp relay statistics <logical-system logical-system-name><routing-instance routing-instance-name>

    Syntax

    Syntax for EX Series switches:

    show dhcp relay statistics <routing-instance routing-instance-name>

    Release Information

    Command introduced in Junos OS Release 8.3.

    Statement introduced in Junos OS Release 12.1 for EX Series switches.

    Command introduced in Junos OS Release 12.1X48R3 for PTX Series Packet Transport Switches.

    Description

    Clear all Dynamic Host Configuration Protocol (DHCP) relay statistics.

    Options

    logical-system logical-system-name
    —

    (On routers only) (Optional) Perform this operation on the specified logical system. If you do not specify a logical system name, statistics are cleared for the default logical system.

    routing-instance routing-instance-name
    —

    (Optional) Perform this operation on the specified routing instance. If you do not specify a routing instance name, statistics are cleared for the default routing instance.

    Required Privilege Level

    view

    List of Sample Output

    clear dhcp relay statistics

    Output Fields

    Table 1 lists the output fields for the clear dhcp relay statistics command.

    Table 1: clear dhcp relay statistics Output Fields

    Field Name

    Field Description

    Packets dropped

    Number of packets discarded by the extended DHCP relay agent application due to errors. Only nonzero statistics appear in the Packets dropped output. When all of the Packets dropped statistics are 0 (zero), only the Total field appears.

    • Total—Total number of packets discarded by the extended DHCP relay agent application.
    • Bad hardware address—Number of packets discarded because an invalid hardware address was specified.
    • Bad opcode—Number of packets discarded because an invalid operation code was specified.
    • Bad options—Number of packets discarded because invalid options were specified.
    • Invalid server address—Number of packets discarded because an invalid server address was specified.
    • No available addresses—Number of packets discarded because there were no addresses available for assignment.
    • No interface match—Number of packets discarded because they did not belong to a configured interface.
    • No routing instance match—Number of packets discarded because they did not belong to a configured routing instance.
    • No valid local address—Number of packets discarded because there was no valid local address.
    • Packet too short—Number of packets discarded because they were too short.
    • Read error—Number of packets discarded because of a system read error.
    • Send error—Number of packets that the extended DHCP relay application could not send.
    • Option 60—Number of packets discarded containing DHCP option 60 vendor-specific information.
    • Option 82—Number of packets discarded because DHCP option 82 information could not be added.

    Messages received

    Number of DHCP messages received.

    • BOOTREQUEST—Number of BOOTP protocol data units (PDUs) received
    • DHCPDECLINE—Number of DHCP PDUs of type DECLINE received
    • DHCPDISCOVER—Number of DHCP PDUs of type DISCOVER received
    • DHCPINFORM—Number of DHCP PDUs of type INFORM received
    • DHCPRELEASE—Number of DHCP PDUs of type RELEASE received
    • DHCPREQUEST—Number of DHCP PDUs of type REQUEST received

    Messages sent

    Number of DHCP messages sent.

    • BOOTREPLY—Number of BOOTP PDUs transmitted
    • DHCPOFFER—Number of DHCP OFFER PDUs transmitted
    • DHCPACK—Number of DHCP ACK PDUs transmitted
    • DHCPNACK—Number of DHCP NACK PDUs transmitted

    Sample Output

    clear dhcp relay statistics

    The following sample output displays the DHCP relay statistics before and after the clear dhcp relay statistics command is issued.

    user@host> show dhcp relay statistics
    Packets dropped:
        Total                      0
    
    Messages received:
        BOOTREQUEST                116
        DHCPDECLINE                0
        DHCPDISCOVER               11
        DHCPINFORM                 0
        DHCPRELEASE                0
        DHCPREQUEST                105
    
    Messages sent:
        BOOTREPLY                  44
        DHCPOFFER                  11
        DHCPACK                    11
        DHCPNAK                    11
    
    
    user@host> clear dhcp relay statistics
     
    user@host> show dhcp relay statistics
    Packets dropped:
        Total                      0
    
    Messages received:
        BOOTREQUEST                0
        DHCPDECLINE                0
        DHCPDISCOVER               0
        DHCPINFORM                 0
        DHCPRELEASE                0
        DHCPREQUEST                0
    
    Messages sent:
        BOOTREPLY                  0
        DHCPOFFER                  0
        DHCPACK                    0
        DHCPNAK                    0
    
    

    Published: 2013-03-14