[IPv6][CentOS6] CentOS6でのDHCPv6サーバの設定方法。 #ipv6study

AIX、UNIX、Linux

前回FortigateのDHCPv6サーバ機能を使用して、IPv6アドレスを配布する方法を紹介しましたが、今度はCentoOSのDHCPパッケージを利用したDHCPv6の設定方法を紹介したいと思います。

作業環境:

% cat /etc/redhat-release
CentOS release 6.4 (Final)

手順

1. サンプルの設定ファイルをコピーしてくる。

cp -p /usr/share/doc/dhcp*/dhcpd6.conf.sample /etc/dhcp/dhcpd6.conf

2. 必要のパラメータを抜き出して記載する。

# IPv6 address valid lifetime
#  (at the end the address is no longer usable by the client)
#  (set to 30 days, the usual IPv6 default)
default-lease-time 2592000;

#   other addresses for new connections)
#  (set to 7 days, the  usual IPv6 default)
preferred-lifetime 3600;

#  (default is 1/2 preferred lifetime)
#  (set to 1 hour)
option dhcp-renewal-time 3600;

#  (default is 3/4 preferred lifetime)
#  (set to 2 hours)
option dhcp-rebinding-time 7200;

# Enable RFC 5007 support (same than for DHCPv4)
allow leasequery;

# Global definitions for name server address(es) and domain search list
option dhcp6.name-servers <DNSのIPv6アドレス>, <DNSのIPv6アドレス>;
option dhcp6.domain-search "<設定するドメイン名>";

# Set preference to 255 (maximum) in order to avoid waiting for
# additional servers when there is only one
option dhcp6.preference 255;

# Server side command to enable rapid-commit (2 packet exchange)
option dhcp6.rapid-commit;

# The delay before information-request refresh
#  (minimum is 10 minutes, maximum one day, default is to not refresh)
#  (set to 6 hours)
option dhcp6.info-refresh-time 21600;

# The path of the lease file
dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases";


# The subnet where the server is attached
#  (i.e., the server has an address in this subnet)
subnet6 <配布するIPv6アドレスのネットワークアドレス> {
range6 <払い出しを開始するIPv6アドレス> <払い出しを終了するIPv6アドレス>;
ddns-domainname = "<設定するドメイン名>";

3. dhcpd6を起動する。

% /etc/init.d/dhcpd6 start
Starting dhcpd (DHCPv6):                                   [  OK  ]

これで端末やサーバにIPv6アドレスとDNSサーバアドレスが払い出されると思います。

問題があるようでしたらご指摘いただければ助かります。

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました