Debian配置IPV6


開啟IPV6:

sed -i "s/net.ipv6.conf.all.disable_ipv6 = 1/net.ipv6.conf.all.disable_ipv6 = 0/g" /etc/sysctl.conf
sed -i "s/net.ipv6.conf.default.disable_ipv6 = 1/net.ipv6.conf.default.disable_ipv6 = 0/g" /etc/sysctl.conf
sysctl -p

配置IPV6 IP:

root@cn-sh-fx-bcache-03:~ # cat /etc/network/interfaces




# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The bond0 network interface
auto bond0
iface bond0 inet static
slaves eth0 eth1
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
bond-xmit-hash-policy 2
    address (v4 IP)
    netmask (v4 掩碼)
    gateway (v4 網關)



iface bond0 inet6 static
address (v6地址)
netmask (v6掩碼)
up route -A inet6 add default gw (v6網關_ dev bond0

查看v6的路由

ip -6 route show

測試:

ping6 IPV6


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM