Debian 固定 IPv6 アドレス、RA、DNS の問題

Debian 固定 IPv6 アドレス、RA、DNS の問題

私のDebian Stretchコンピュータ(Pi HoleのあるRaspberryPi)で静的IPv6を設定しようとしていますが、処理できないすべての種類の問題に直面しています。

私のdhcpcd.confファイル:

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
#slaac private

# Example static IP configuration:
interface eth0
static ip_address=192.168.1.100/24
static ip6_address=2a01:aaaa:bbbb:cccc::100/64
static routers=192.168.1.1
static domain_name_servers=127.0.0.1 ::1

一部のIPv6 Sysctl変数

net.ipv6.conf.eth0.accept_dad = 1
net.ipv6.conf.eth0.accept_ra = 0
net.ipv6.conf.eth0.accept_ra_defrtr = 1
net.ipv6.conf.eth0.accept_ra_mtu = 1
net.ipv6.conf.eth0.accept_ra_pinfo = 1
net.ipv6.conf.eth0.accept_ra_rtr_pref = 1
net.ipv6.conf.eth0.addr_gen_mode = 1
net.ipv6.conf.eth0.autoconf = 0 
net.ipv6.conf.eth0.use_tempaddr = 2

そして最後に私のresolv.conf(resolvconfはインストールされていません)

# Generated by dhcpcd from eth0.dhcp, eth0.ra
# static resolv.conf file
search mydomain.home
nameserver 127.0.0.1
nameserver ::1

search home # search domain sent by ISP router
nameserver 127.0.0.1
nameserver ::1
nameserver 2a01:aaaa:bbbb:cccc:dddd:eeee:ffff:gggg # ISP router's IPv6
# /etc/resolv.conf.tail can replace this line

eth0 IPv6アドレス:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2a01:aaaa:bbbb:cccc:dddd:eeee:ffff:ccb0/64 scope global temporary dynamic
       valid_lft 1763sec preferred_lft 563sec
    inet6 2a01:aaaa:bbbb:cccc:dddd:eeee:ffff:f540/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 1763sec preferred_lft 563sec
    inet6 2a01:aaaa:bbbb:cccc::100/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::aaaa:bbbb:cccc:f540/64 scope link
       valid_lft forever preferred_lft forever

だから私が理解していない一つのことがあります。

  1. 固定IPv6アドレスを設定し、autoconfをブロックしましたが、まだSLAAC IPv6アドレスを取得します(mngtmpaddr CONFFLAGを使用)。なぜですか?
  2. ルーターの広告(構成できないISPルーターからの送信)をブロックしましたが、dhcpcdはまだRAを使用してresolv.confを生成します(検索ドメインのホームとルーターIPv6をDNSとして使用)。
  3. IPv6のデフォルトルートはRAによって学習されたようです。私が見るには正当なようですが、これが正しいアプローチであるかどうか100%確信できません。

ご協力ありがとうございました

ベストアンサー1

おすすめ記事