Introduction
本篇文章主要記錄測試IPv6功能時,會使用到的一些指令與方法。
Add/Delete IPv6 address
Add:
ip -6 addr add 2001:db8:0:f101::1/64 dev eth0
Delete:
ip addr del 2001:db8:0:f101::1/64 dev eth0
Delete IPv4 address
刪除IPv4 loopback:
ip addr del 127.0.0.1/32 dev lo
刪除IPv4 address:
ip addr del 192.168.0.1/16 dev eno1
用這種方法要還原設定只要重啟網路服務即可:
service network restart
DHCP Configuration
先在某張網卡上設定static fc00::1/64,接著在dhcp的設定中加入:
default-lease-time 2592000; preferred-lifetime 604800; option dhcp-renewal-time 3600; option dhcp-rebinding-time 7200; allow leasequery; option dhcp6.info-refresh-time 21600; dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases"; subnet6 fc00::/64 { range6 fc00:0:0:0::10 fc00:0:0:0::1000; }
最後重新啟動dhcpd6服務即可。
留言
張貼留言