Description

While troubleshooting IPv6 Neighbor Discovery (ND) issues, you may need to enable debugging via sysctl when analyzing the behavior based on PCAP and statistics on the RE is not enough.

Solution

To enable IPv6 ND debugging:

  1. In RE shell (start shell user root):

    sysctl -w net.inet6.icmp6.nd6_debug=1
  2. Ensure that kernel logging is set to any:

    set system syslog file messages kernel any
  3. After enabling debugs, it shows additional log messages on how ND will be handled for exception packets:

    Jun 11 07:51:23  vmx105 kernel: if_rtb_default_ifl_bitmap_set() rtb ifl bitmap itable op 1 done. rtb id 0 ifl idx 362 iff 0xfffff80006323818.
    Jun 11 07:51:23  vmx105 kernel: ge-0/0/2: starting DAD for 2002:500::1
    Jun 11 07:51:23  vmx105 kernel: ge-0/0/2: starting DAD for fe80::5668:a3ff:fe1e:3c80

    Jun 11 07:51:34  vmx105 kernel: nd6_dad_timer: Setting ia->collision_cnt back to 0.
    Jun 11 07:51:34  vmx105 kernel: nd6_dad_timer: whole cc after zeroing: 0x0
    Jun 11 07:51:34  vmx105 kernel: nd6_dad_timer: Setting ia->collision_cnt back to 0.
    Jun 11 07:51:34  vmx105 kernel: nd6_dad_timer: whole cc after zeroing: 0x0
    < . . >
    Jun 11 07:57:23  vmx105 kernel: nd6_ns_input: NS packet from non-neighbor
    Jun 11 07:57:27  vmx105 kernel: nd6_ns_input: NS packet from non-neighbor
  4. Disabling the debug:

    sysctl -w net.inet6.icmp6.nd6_debug=0