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
posted @   better_feng  阅读(5092)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示