IPv6 Node Information Queries

  • [janog:08187] 逆引きについての素朴な疑問 から

RFC4620

とかをICMPv6で取得するもので、FreeBSDとかはI-Dの頃の実装らしい。
icmp6.c

/*
* Process a Node Information Query packet, based on
* draft-ietf-ipngwg-icmp-name-lookups-07.
*
* Spec incompatibilities:
* - IPv6 Subject address handling
* - IPv4 Subject address handling support missing
* - Proxy reply (answer even if it's not for me)
* - joins NI group address at in6_ifattach() time only, does not cope
* with hostname changes by sethostname(3)
*/

なのでFF02::1にも反応?
ping6

-w Generate ICMPv6 Node Information DNS Name query, rather than
echo-request. -s has no effect if -w is specified.

% ping6 -w ff02::1%bge0
PING6(72=40+8+24 bytes) fe80::202:(snip):5205%bge0 --> ff02::1%bge0
39 bytes from fe80::202:(snip):5205%bge0: xxxxxxx
37 bytes from fe80::20b:(snip):4fbd%bge0: yyyyyyy
38 bytes from fe80::211:(snip):19b%bge0: zzzzzzz.example.jp.
40 bytes from fe80::211:(snip):b6%bge0: aaaaaaa.example.ad.jp.
38 bytes from fe80::211:(snip):fec5%bge0: sssssssss.example.jp.
39 bytes from fe80::202:(snip):e77e%bge0: hhhhhhhhh.example.ne.jp.
41 bytes from fe80::210:(snip):e0c6%bge0: 666666666.example.jp.
41 bytes from fe80::250:(snip):4705%bge0: dddddd.example.jp.
40 bytes from fe80::250:(snip):4714%bge0: rrrrrrrr.example.jp.
26 bytes from fe80::210:(snip):7f35%bge0: mx0
39 bytes from fe80::250:(snip):4722%bge0: ttttttttttt

hostnameが帰ってくる
Validate IPv6 destination address.[icmp-name-lookups-07, Section 4.]で
同じlinkからしか答えないということらしい