そういうのがいいブログ

SIerで働く30代サラリーマンSEがインフラエンジニアに憧れてLinux・クラウド・AWSの勉強をするブログ

NECのルーターIX2000シリーズのIPv6の設定手順

※[PR]当ブログの記事の中にはプロモーションが含まれています。

NECルーターIXシリーズで、IPv6の設定方法を知りたい。
・具体的な手順を教えてほしい。

こういった疑問に答えます。

本記事の内容

  1. NECルーターIX2000シリーズのIPv6の設定手順

サトナカ (@souiunogaii)

この記事を書いている私は、某SIerに勤務しながら、
WEB系エンジニア・インフラエンジニアに憧れて、プログラミングおよびインフラ技術の勉強をしています。

こういった私が、解説していきます。

私が実機で試したコマンドや画像を載せて書いています。
記事の信頼性担保に繋がると思います。

NECルーターIX2000シリーズのIPv6の設定手順

今回やりたいこと(ネットワーク構成のイメージ図)

ひかり電話の契約あり

今回の環境は、「ひかり電話契約あり」です。

機器 IPv6アドレスの設定
NTT東日本
FLET'S

ひかり電話HGW
DHCPv6-PD
Prefix長56の
240b:AAAA:BBBB:CC--::/56
ひかり電話HGW

下部のルーター
(NEC IX2215)
DHCPv6-PD
Prefix長60
の再配布(再委任)
240b:AAAA:BBBB:CC1-::/60
ルーター
(NEC IX2215)

配下の各端末
DHCPv6-RA
Prefix長64
240b:AAAA:BBBB:CC10::/64

設定コマンド

基本的に、NECの設定事例のページに合ったコマンドそのままです。

jpn.nec.com

(設定例3 v6プラス(MAP-E方式)の設定 - DHCPv6-PD を使いました)

ip ufs-cache max-entries 20000
ip ufs-cache enable
ip route default Tunnel0.0
ip dhcp enable
RT-Halley(config)# ip ufs-cache max-entries 20000
RT-Halley(config)# ip ufs-cache enable
RT-Halley(config)# ip route default Tunnel0.0
RT-Halley(config)# ip dhcp enable
ipv6 ufs-cache max-entries 10000
ipv6 ufs-cache enable
ipv6 dhcp enable
RT-Halley(config)# ipv6 ufs-cache max-entries 10000
RT-Halley(config)# ipv6 ufs-cache enable
RT-Halley(config)# ipv6 dhcp enable
proxy-dns ip enable
proxy-dns ip request both
RT-Halley(config)# proxy-dns ip enable
RT-Halley(config)# proxy-dns ip request both
ip dhcp profile dhcpv4-sv
  dns-server 192.168.1.1
RT-Halley(config)# ip dhcp profile dhcpv4-sv
RT-Halley(config-dhcp-dhcpv4-sv)# dns-server 192.168.1.1
RT-Halley(config-dhcp-dhcpv4-sv)# exit
ipv6 dhcp client-profile dhcpv6-cl
  option-request dns-servers
  ia-pd subscriber GigaEthernet1.0 ::/64 eui-64
RT-Halley(config)# ipv6 dhcp client-profile dhcpv6-cl
RT-Halley(config-ipv6-dhc-dhcpv6-cl)# option-request dns-servers
RT-Halley(config-ipv6-dhc-dhcpv6-cl)# ia-pd subscriber GigaEthernet2.0 ::/64 eui-64
RT-Halley(config-ipv6-dhc-dhcpv6-cl)# exit
ipv6 dhcp server-profile dhcpv6-sv
  dns-server dhcp
RT-Halley(config)# ipv6 dhcp server-profile dhcpv6-sv
RT-Halley(config-ipv6-dhs-dhcpv6-sv)# dns-server dhcp
RT-Halley(config-ipv6-dhs-dhcpv6-sv)# exit
interface GigaEthernet0.0
  ipv6 enable
  ipv6 traffic-class tos 0
  ipv6 dhcp client dhcpv6-cl
RT-Halley(config)# interface GigaEthernet0.0
RT-Halley(config-GigaEthernet0.0)# ipv6 enable
RT-Halley(config-GigaEthernet0.0)# ipv6 traffic-class tos 0
RT-Halley(config-GigaEthernet0.0)# ipv6 dhcp client dhcpv6-cl
RT-Halley(config-GigaEthernet0.0)# exit
interface GigaEthernet2.0
  ipv6 enable
  ipv6 dhcp server dhcpv6-sv
  ipv6 nd ra enable
  ipv6 nd ra other-config-flag
RT-Halley(config)# interface GigaEthernet2.0
RT-Halley(config-GigaEthernet2.0)# ipv6 enable
RT-Halley(config-GigaEthernet2.0)# ipv6 dhcp server dhcpv6-sv
RT-Halley(config-GigaEthernet2.0)# ipv6 nd ra enable
RT-Halley(config-GigaEthernet2.0)# ipv6 nd ra other-config-flag
RT-Halley(config-GigaEthernet2.0)# exit
interface Tunnel0.0
  tunnel mode map-e
  ip address map-e
  ip tcp adjust-mss auto
  ip napt enable
  no shutdown
RT-Halley(config)# interface Tunnel0.0
RT-Halley(config-Tunnel0.0)# tunnel mode map-e
RT-Halley(config-Tunnel0.0)# ip address map-e
RT-Halley(config-Tunnel0.0)# ip tcp adjust-mss auto
RT-Halley(config-Tunnel0.0)# ip napt enable
RT-Halley(config-Tunnel0.0)# no shutdown
RT-Halley(config-Tunnel0.0)# exit

IPv6パケットフィルタの設定

外部から内部へのIPv6アクセスを制限する動的フィルタリング設定を追加します。

ipv6 access-list block-list deny ip src any dest any
ipv6 access-list dhcpv6-list permit udp src any sport any dest any dport eq 546
ipv6 access-list dhcpv6-list permit udp src any sport any dest any dport eq 547
ipv6 access-list icmpv6-list permit icmp src any dest any
ipv6 access-list tunnel-list permit 4 src any dest any
ipv6 access-list other-list permit ip src any dest any
ipv6 access-list dynamic cache 65535
ipv6 access-list dynamic dflt-list access other-list
RT-Halley(config)# ipv6 access-list block-list deny ip src any dest any
RT-Halley(config)# ipv6 access-list dhcpv6-list permit udp src any sport any dest any dport eq 546
RT-Halley(config)# ipv6 access-list dhcpv6-list permit udp src any sport any dest any dport eq 547
RT-Halley(config)# ipv6 access-list icmpv6-list permit icmp src any dest any
% Warning: Automatically assigned the sequence number 200.
RT-Halley(config)# ipv6 access-list tunnel-list permit 4 src any dest any
RT-Halley(config)# ipv6 access-list other-list permit ip src any dest any
RT-Halley(config)# ipv6 access-list dynamic cache 65535
RT-Halley(config)# ipv6 access-list dynamic dflt-list access other-list
interface GigaEthernet0.0
  ipv6 filter dhcpv6-list 1 in
  ipv6 filter icmpv6-list 2 in
  ipv6 filter tunnel-list 3 in
  ipv6 filter block-list 100 in
  ipv6 filter dhcpv6-list 1 out
  ipv6 filter icmpv6-list 2 out
  ipv6 filter tunnel-list 3 out
  ipv6 filter dflt-list 100 out
RT-Halley(config)# interface GigaEthernet0.0
RT-Halley(config-GigaEthernet0.0)# ipv6 filter dhcpv6-list 1 in
RT-Halley(config-GigaEthernet0.0)# ipv6 filter icmpv6-list 2 in
RT-Halley(config-GigaEthernet0.0)# ipv6 filter tunnel-list 3 in
RT-Halley(config-GigaEthernet0.0)# ipv6 filter block-list 100 in
RT-Halley(config-GigaEthernet0.0)# ipv6 filter dhcpv6-list 1 out
RT-Halley(config-GigaEthernet0.0)# ipv6 filter icmpv6-list 2 out
RT-Halley(config-GigaEthernet0.0)# ipv6 filter tunnel-list 3 out
RT-Halley(config-GigaEthernet0.0)# ipv6 filter dflt-list 100 out
RT-Halley(config-GigaEthernet0.0)# exit

最後に設定の保存

write memory
RT-Halley(config)# write memory
Building configuration...
% Warning: do NOT enter CNTL/Z while saving to avoid config corruption.

設定後の確認

kiriwake.jpne.co.jp

test-ipv6.com

www.kame.net

≫【So-net 光 コラボレーション】キャッシュバックキャンペーン実施中! https://www.so-net.ne.jp/access/hikari/collaboration/ 

≫世界最速インターネットNURO 光 https://www.nuro.jp/hikari/  

参考にした記事

flets.com

kusoneko.blogspot.com

notoken.hatenadiary.com

y2lab.org