Linux 70% Lab – DHCP with IPv6
先設定一般DHCP功能(不固定發放某IP給特定CLIENT)
Server1:
- yast -i dhcpv6
- vi /etc/sysconfig/network/dhcp6s
做以下修改:
2:DHCP6SIF="eth0"
新增以下內容:
interface eth0 {
server-preference 255;
renew-time 60;
rebind-time 90;
prefer-life-time 130;
valid-life-time 200;
allow rapid-commit;
option dns_servers 2002:a78:d01:0:800:27ff:fe03:b3e9 31100173.com;
link 31100173.com {
range 2002:a78:d01::1000 to 2002:a78:d01::2000/64;
prefix 2002:a78:d01::/64;
};
};
- service dhcp6s start
- chkconfig dhcp6s on
Client1:(建議使用一台新VM)
- yast –i dhcpv6
- yast –> Networking Devices –> Networking Settings –> Edit 要使用的網卡
--> 標定Dynamic Address 選單選DHCP 和 DHCP Version 6 Only
--> Next –>OK
設定發放固定IP給特定Client:
Client1
- vi /var/lib/dhcpv6/client6.leasesxxxxxxxxxxx
開著等下設定會需要參考這裡的內容
Server1:
將內容改成:
interface eth0 {
server-preference 255;
renew-time 60;
rebind-time 90;
prefer-life-time 130;
valid-life-time 200;
allow rapid-commit;
option dns_servers 2002:a78:d01:0:800:27ff:fe03:b3e9 31100173.com;
link 31100173.com {
range 2002:a78:d01::1000 to 2002:a78:d01::2000/64;
prefix 2002:a78:d01::/64;
};
host client1 {
duid [client1文件中的duid];
iaidinfo {
iaid [client1文件名的iaid];
renew-time 1000;
rebind-time 2000;
};
address {
2002:a78:d01::1688/64;
prefer-life-time 2000;
valid-life-time 3000;
};
};
};
Client1:
沒有留言:
張貼留言