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