Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »


https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/traceoptions-edit-system-processes-dhcp-service.html




monitor traffic interface ( debug traffic )
config on DHCP server

show logs jdhcpd

DHCP traceoptions
Already configure:

jcluser@dhcpserver> show configuration system processes
dhcp-service {
    traceoptions {
        file jdhcpd size 100m;
        level all;
        flag all;
    }
}


[edit system processes]
jcluser@vMX-addr-0# show | display set 
set system processes dhcp-service traceoptions file dhcp_logfile
set system processes dhcp-service traceoptions file size 10m
set system processes dhcp-service traceoptions level all
set system processes dhcp-service traceoptions flag packet
config on DHCP Relay

show logs dhcp_logfile

traceoption DHCP relay
Already configure :

jcluser@vMX2> show configuration system processes 
dhcp-service {
    traceoptions {
        file dhcp_logfile size 10m;
        level all;
        flag packet;
    }
}



predicated or non-ELS
Predicated:

set forwarding-options helpers traceoptions file dhcprelaylogs
set forwarding-options helpers traceoptions level all
set forwarding-options helpers traceoptions flag bootp



monitor logs ( live )

monitor start dhcp_logfile

monitor stop dhcp_logfile

monitoring traffic

monitor traffic interface ge-0/0/3 no-resolve detail 

monitor traffic interface ge-0/0/3 no-resolve extensive

monitoring
jcluser@vMX2> monitor traffic interface ge-0/0/3 no-resolve detail    
Address resolution is OFF.
Listening on ge-0/0/3, capture size 1514 bytes

10:49:20.666543  In IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto: UDP (17), length: 353) 0.0.0.0.68 > 255.255.255
.255.67: BOOTP/DHCP, Request from 00:50:56:a2:03:ac, length 257, xid 0x112aea96, Flags [Broadcast]
  Client-Ethernet-Address 00:50:56:a2:03:ac
  Vendor-rfc1048 Extensions
    Magic Cookie 0x63825363
    DHCP-Message Option 53, length 1: Discover
    Lease-Time Option 51, length 4: 86400
    Hostname Option 12, length 4: "vMX3"
10:49:24.668127  In IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto: UDP (17), length: 353) 0.0.0.0.68 > 255.255.255
.255.67: BOOTP/DHCP, Request from 00:50:56:a2:03:ac, length 257, xid 0x40e21938, Flags [Broadcast]
  Client-Ethernet-Address 00:50:56:a2:03:ac
  Vendor-rfc1048 Extensions
    Magic Cookie 0x63825363
    DHCP-Message Option 53, length 1: Discover
    Lease-Time Option 51, length 4: 86400
    Hostname Option 12, length 4: "vMX3"




jcluser@vMX2> monitor traffic interface ge-0/0/3 no-resolve extensive 
Address resolution is OFF.
Listening on ge-0/0/3, capture size 1514 bytes

10:49:48.673567  In 
Juniper PCAP Flags [Ext, no-L2, In], PCAP Extension(s) total length 16
  Device Media Type Extension TLV #3, length 1, value: Ethernet (1)
  Logical Interface Encapsulation Extension TLV #6, length 1, value: Ethernet (14)
  Device Interface Index Extension TLV #1, length 2, value: 152
  Logical Interface Index Extension TLV #4, length 4, value: 333
-----original packet-----
PFE proto 2 (ipv4): (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto: UDP (17), length: 353) 0.0.0.0.68 > 255.25
5.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:50:56:a2:03:ac, length 257, xid 0x6e9ca060, Flags [Broadcast] (0x8000)
  Client-Ethernet-Address 00:50:56:a2:03:ac
  Vendor-rfc1048 Extensions
    Magic Cookie 0x63825363
    DHCP-Message Option 53, length 1: Discover
    Lease-Time Option 51, length 4: 86400
    Hostname Option 12, length 4: "vMX3"
10:50:06.347256 Out 
Juniper PCAP Flags [Ext], PCAP Extension(s) total length 16
  Device Media Type Extension TLV #3, length 1, value: Ethernet (1)
  Logical Interface Encapsulation Extension TLV #6, length 1, value: Ethernet (14)
  Device Interface Index Extension TLV #1, length 2, value: 152
  Logical Interface Index Extension TLV #4, length 4, value: 333
-----original packet-----


Troubleshooting
issue

BOOTPREPLY could not find client table entry

BOOTPREPLY could not find client table entry
Oct 30 11:40:27.553960 [MSTR][NOTE] [default:default][RLY][INET][vme.0] jdhcpd_packet_handle: BOOTPREPLY could not find client table entry
Oct 30 11:40:28.025354 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP   from == 10.10.1.1, port == 67 ]--
Oct 30 11:40:28.025387 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP   size == 251, op == 1 ]--
Oct 30 11:40:28.025399 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP  flags == 0 ]--
Oct 30 11:40:28.025409 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP  htype == 1, hlen == 6 ]--
Oct 30 11:40:28.025420 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP   hops == 1, xid == 7e96a9c2 ]--
Oct 30 11:40:28.025430 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP   secs == 837, flags == 0000 ]--
Oct 30 11:40:28.025441 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP ciaddr == 0.0.0.0 ]--
Oct 30 11:40:28.025452 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP yiaddr == 0.0.0.0 ]--
Oct 30 11:40:28.025463 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP siaddr == 0.0.0.0 ]--
Oct 30 11:40:28.025474 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP giaddr == 10.10.1.1 ]--
Oct 30 11:40:28.025491 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP chaddr == 00 11 01 00 00 09 00 00 00 00 00 00 00 00 00 00 ]--
Oct 30 11:40:28.025501 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP  sname ==  ]--
Oct 30 11:40:28.025511 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ DHCP/BOOTP   file ==  ]--
Oct 30 11:40:28.025523 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ OPTION code  53, len   1, data DHCP-DISCOVER ]--
Oct 30 11:40:28.025536 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] --[ OPTION code  55, len   4, data 01 03 3a 3b ]--
Oct 30 11:40:28.025547 [MSTR][INFO] [default:default][SVR][INET][xe-0/0/0.0] --[ OPTION code 255, len   0 ]--
Oct 30 11:40:28.025565 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] jdhcpd_find_client_from_client_pdu: BOOTPREQUEST could not find client table ent
Oct 30 11:40:28.025577 [MSTR][DEBUG] jdhcpd_packet_map_to_wholesale_client: No wholesale clients moved out routing instance default:default
Oct 30 11:40:28.026318 [MSTR][DEBUG] jdhcpd_packet_map_to_wholesale_client: Client entry NOT found
Oct 30 11:40:28.026383 [MSTR][NOTE]  jdhcpd_packet_handle: RECEIVE DISCOVER: stats_safd 0x0 , safd 0xa018700 xe-0/0/0.0
Oct 30 11:40:28.026411 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] jdhcpd_process_forward_only_or_drop: Returning ... forward-only flags not set (flags=deaddead, rc_flags 8a4080d) for routing context 0
Oct 30 11:40:28.026463 [MSTR][DEBUG][default:default][SVR][INET][SID=0] jdhcpd_packet_handle: new client table entry created for ifindex 556
Oct 30 11:40:28.026492 [MSTR][DEBUG][default:default][SVR][INET][xe-0/0/0.0] jdhcpd_process_offer_advertise_delay: Returning ... offer delay not set (flags=0, rc_flags 8a4080d) for routing context 0, rc(a186000)
Oct 30 11:40:28.026507 [MSTR][DEBUG][default:default][SVR][INET][SID=0] jdhcpd_packet_handle: Set client next-hop mac addr:  54 1e 56 70 49 a3 state(0)
Oct 30 11:40:28.027147 [MSTR][INFO]  jdhcpd_client_set_pkt: *********** Setting v4 packet 0xa0716c0
Oct 30 11:40:28.027365 [MSTR][INFO] [default:default][SVR][INET][xe-0/0/0.0][SID=1935] jdhcpd_get_v4_v6_protocol_attributes: get configured protocol-attributes
Oct 30 11:40:28.027385 [MSTR][INFO] [default:default][SVR][INET][xe-0/0/0.0][SID=1935] jdhcpd_get_v4_v6_protocol_attributes: get configured protocol-attributes
Oct 30 11:40:28.094256 [MSTR][INFO]  jdhcpd_client_unset_pkt: ***********  Unsetting v4 packet 0xa0716c0

Solution














  • No labels