Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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





config on DHCP server


Code Block
titlenew commands
collapsetrue
[edit system processes]
jcluser@vMX-addr-0# show 
dhcp-service {
    traceoptions {
        file dhcp_logfile size 10m;
        level all;
        flag packet;
    }
}

[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

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




monitoring traffic


Code Block
titlemonitoring
collapsetrue
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-----