2013年11月28日 星期四

dhcpd6.conf & radvd.conf & ip6tables

1. On CentOS 6.4 or RHEL 6.4. install dhcp and radvd
>yum install dhcp radvd

2. Edit NIC config to add IPv6 address. /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=yes
IPV6ADDR=3ffe:501:ffff:1::1/64

3. edit /etc/dhcp/dhcpd6.conf to assign address pool
subnet6 3ffe:501:ffff:1::/64 {
    range6 3ffe:501:ffff:1::2 3ffe:501:ffff:1::1000
}

4. edit /etc/radvd.conf
interface eth0
{
    AdvSendAdvert on;
    MinRtrAdvInterval 30;
    MaxRtrAdvInterval 100;
    AdvHomeAgentFlag off;
    AdvManagedFlag off; #M bit = 0
    AdvOtherConfigFlag on; #O bit = 1
    prefix fc00:1234:5678:9abc::/64
    {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr off;
    };
};

5. add rule in /etc/sysconfig/ip6tables (before -j REJECT line)
-A INPUT -p udp -m udp -m multiport --ports 546 -j ACCEPT
-A INPUT -p udp -m udp -m multiport --ports 547 -j ACCEPT

6. set dhcpd6 radvd start when system up
>chkconfig radvd on
>chkconfig dhcpd6 on

Reference:
http://www.lijyyh.com/2012/05/dhcpv6ip-ciscolinux-isc-dhcpwindows.html
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-dhcp_for_ipv6_dhcpv6.html

沒有留言:

張貼留言