Setup IPV6 DHCP server with stateful status

1 yum install radvd

2 config radvd.conf

interface p3p1.1003
{
    AdvSendAdvert on;
    AdvManagedFlag on;       #dhcpv6  无状态 
    AdvOtherConfigFlag on;   #dhcpv6  无状态   如果AdvManagedFlag和AdvOtherConfigFlag都为on,就是dhcpv6 有状态
    MinRtrAdvInterval 30;
    MaxRtrAdvInterval 100;
#    AdvLinkMTU 1480;
    prefix 2100:8:8:8::/64       #dhcpv6  无状态   如果是dhcpv6有状态,需要注释掉
    {
        AdvOnLink off;
        AdvAutonomous off;
        AdvRouterAddr off;
    };
#    RDNSS 2008:8:8:8::1
#    {};
};

interface p3p1.2003
{
    AdvSendAdvert on;
    AdvManagedFlag on;       #dhcpv6  无状态 
    AdvOtherConfigFlag on;   #dhcpv6  无状态   如果AdvManagedFlag和AdvOtherConfigFlag都为on,就是dhcpv6 有状态
    MinRtrAdvInterval 30;
    MaxRtrAdvInterval 100;
#    AdvLinkMTU 1480;
    prefix 2008:8:8:8::/64       #dhcpv6  无状态   如果是dhcpv6有状态,需要注释掉
    {
        AdvOnLink off;
        AdvAutonomous off;
        AdvRouterAddr off;
    };
#    RDNSS 2008:8:8:8::1
#    {};
};
 

3 config dhcpd6.conf
 

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed.
ddns-update-style none;

# Option definitions common to all supported networks...
default-lease-time 2592000;
max-lease-time 2592000;

# This DHCP server is the official DHCP server for the local network
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# Subnet declaration
subnet6 2100:8:8:8::/64  {
        option dhcp6.name-servers 2100:8:8:8::2;
        option dhcp6.domain-search "test.example.com","example.com";
        option dhcp6.vendor-opts #00:00:CF:9C:81:04:2100:8:8:8::1;
        00:00:CF:9C:
            00:81:00:10:
                21:00:00:08:
                00:08:00:08:
                00:00:00:00:
                00:00:00:02;
        range6 2100:8:8:8::500 2100:8:8:8::1000;
host ru {
    hardware ethernet 00:11:22:33:44:55;
    fixed-address6 2100:8:8:8::408;
}
}

subnet6 2008:8:8:8::/64  {
        option dhcp6.name-servers 2008:8:8:8::2;
        option dhcp6.domain-search "test.example.com","example.com";
        option dhcp6.vendor-opts #00:00:CF:9C:81:04:2008:8:8:8::1;
        00:00:CF:9C:
            00:81:00:10:
                20:08:00:08:
                00:08:00:08:
                00:00:00:00:
                00:00:00:02;
        range6 2008:8:8:8::500 2008:8:8:8::1000;
host ru1 {
    hardware ethernet 00:11:22:33:44:55;
    fixed-address6 2008:8:8:8::408; # 根据MAC 填充IP地址
}
}
 

  • 21
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值