[debian-users 00395] 固定IPv6アドレスの割り当て
Yasuhiro KIMURA
yasu @ utahime.org
2019年 1月 25日 (金) 11:18:18 JST
木村と申します。
Debianで固定IPv6アドレスを使う場合の設定方法について質問させてください。
さくらのVPSで新たにVMを契約してDebian stretchをインストールしました。
さくらのVPSではVM一つに対して固定のIPv4アドレスとIPv6アドレスが一つず
つ割り当てられます。DebianのインストーラにはIPv6アドレスに関する設定項
目がないので、インストール直後の状態ではIPv6アドレスはリンクローカルの
ものしか割り当てられていません。プロバイダから提供されたネットワーク設
定に関する情報は
IPv4:
アドレス: 153.126.abc.def
ゲートウェイ: 153.126.abc.1
ネットマスク: 255.255.254.0
プライマリDNS: 133.242.0.3
セカンダリDNS: 133.242.0.4
IPv6:
アドレス: 2401:2500:102:3025:153:126:abc:def
ゲートウェイ: fe80::1
プレフィックス長: 64
DNS: 2401:2500::1
とのことなので、
https://slide.rabbit-shocker.org/authors/znz/sakura-vps-debian-ipv6/
ここで提供されているスライドを参考にして、/etc/network/interfacesを以
下のように変更しました。
----------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug ens3
iface ens3 inet static
address 153.126.abc.def/23
gateway 153.126.abc.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 133.242.0.3 133.242.0.4
dns-search example.com
iface enc3 inet6 static
address 2401:2500:102:3025:153:126:abc:def
netmask 64
gateway fe80::1
accept_ra 0
autoconf 0
privext 0
dns-nameservers 2401:2500::1
----------------------------------------------------------------------
しかしながらこの後システムを再起動しても、
----------------------------------------------------------------------
root @ kusanagi:~# ip addr show ens3
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 153.126.abc.def/23 brd 153.126.abc.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::xxxx:xxff:fexx:xxxx/64 scope link
valid_lft forever preferred_lft forever
root @ kusanagi:~#
----------------------------------------------------------------------
のように依然としてIPv6アドレスはリンクローカルのものしか割り当てられて
いません。どのように設定したらens3インターフェースにグローバルスコープ
の固定IPv6アドレスを割り当てることが出来るのでしょうか。
---
木村 康浩
debian-users メーリングリストの案内