up ip addr add 2a04:92c7:abcd:481::78bc/64 dev eth0
up ip addr add 2a04:92c7:abcd:481:2126:6232:4691:21f1/64 dev eth0
up ip addr add 2a04:92c7:abcd:481:5fe4:268e:d1b4:ece0/64 dev eth0
up ip -6 route add 2a04:92c7:abcd::1 dev eth0
up ip -6 route add default via 2a04:92c7:abcd::1
inet6 240e:128:7139:ba00::859/128 scope global dynamic noprefixroute
inet6 240e:128:7139:ba00:4234:c25d:bf20:8337/64 scope global temporary dynamic
inet6 240e:128:7139:ba00:ac60:cd0d:6df6:b994/64 scope global dynamic mngtmpaddr noprefixroute
IPv6地址作用域和地址分类
IPv6地址指定给接口,一个接口可以指定多个地址。
IPv6地址有作用域:
link local 地址 本链路有效
site local 地址 本区域(站点)内有效,一个site通常是个校园网
global 地址 全球有效,即可汇聚全球单播地址
IPv6地址分类:
unicast 单播(单点传送)地址
multicast 组播(多点传送)地址
anycast 任播(任意点传送)地址
IPv6没有定义广播地址,其功能由组播地址替代
root@server:~# ip address add 192.168.12.22/24 dev eth0 # 增加
root@server:~# ip address del 192.168.12.22/24 dev eth0 # 删除
如果临时添加,先ping,到新增的IP网络可通,再在云服务器上的网卡文件里,配置静态IP地址
To reconfigure servers running Debian, you will need to edit the file
/etc/network/interfaces.d/50-cloud-init
To reconfigure servers running Ubuntu, you will need to edit the file
/etc/netplan/50-cloud-init.yaml
To reconfigure servers running CentOS, you will need to edit the file
/etc/sysconfig/network-scripts/ifcfg-eth0