Debian下IPv6设定主地址 Set primary IPv6 address under Debian Linux
2012-05-12 14:27
766 查看
Linux下选择IPv6主地址是按照一定规则来的 #RFC3484 (davidc)
Prefer same address. (i.e. destination is local machine)
Prefer appropriate scope. (i.e. smallest scope shared with the destination)
Avoid deprecated addresses.
Prefer home addresses.
Prefer outgoing interface. (i.e. prefer an address on the interface we're sending out of)
Prefer matching label.
Prefer public addresses.
Use longest matching prefix.
如果你有一个/64的段,并且为网卡分配了多个同段地址的时候,Linux会自动选择最后添加的地址作为主地址。
要设定个性化主地址,可以在添加非主地址的时候加上[lifetime]属性,将preferred_lft设为0。Linux将自动地把这些地址排除在主地址选择范围之外。
例:
ip addr -6 add xx:xx:xx:xx::8888/xx dev eth0 # 这个地址将包括在主地址选择中
ip addr -6 add xx:xx:xx:xx::A/xx dev eth0 preferred_lft 0 # 这个地址不会当做主地址
Works Cited:
1. davidc, "IPv6 Source Address Selection on Linux" May 11, 2009, Retrieved from http://www.davidc.net/networking/ipv6-source-address-selection-linux
Prefer same address. (i.e. destination is local machine)
Prefer appropriate scope. (i.e. smallest scope shared with the destination)
Avoid deprecated addresses.
Prefer home addresses.
Prefer outgoing interface. (i.e. prefer an address on the interface we're sending out of)
Prefer matching label.
Prefer public addresses.
Use longest matching prefix.
如果你有一个/64的段,并且为网卡分配了多个同段地址的时候,Linux会自动选择最后添加的地址作为主地址。
要设定个性化主地址,可以在添加非主地址的时候加上[lifetime]属性,将preferred_lft设为0。Linux将自动地把这些地址排除在主地址选择范围之外。
例:
ip addr -6 add xx:xx:xx:xx::8888/xx dev eth0 # 这个地址将包括在主地址选择中
ip addr -6 add xx:xx:xx:xx::A/xx dev eth0 preferred_lft 0 # 这个地址不会当做主地址
Works Cited:
1. davidc, "IPv6 Source Address Selection on Linux" May 11, 2009, Retrieved from http://www.davidc.net/networking/ipv6-source-address-selection-linux
相关文章推荐
- linux基础之uboot load address、entry point、 bootm address以及kernel运行地址的意义及联系
- Linux 发行版们应该禁用 IPv4 映射的 IPv6 地址吗?
- Debian Linux 5 --- 时间设定相关与时间同步
- Linux 修改MAC地址提示:SIOCSIFHWADDR: Cannot assign requested address
- 在 Linux 中自动配置 IPv6 地址
- ipv6设置 -----"eth0: duplicate address detected!" 检测到重复地址问题
- ipv6 全球单播地址,link-local address、site-local address、组播、任意波、EUI-64等地址的理解
- ipv6设置 -----"eth0: duplicate address detected!" 检测到重复地址问题
- [windows_internals]Memory Layout (Virtual address space of a C process) under Linux OS
- Linux系统开启IPv6任播(anycast)地址
- Linux(Debian)下内外网网卡静态IP地址的设定
- 〖Linux〗Qt+gsoap开发客户端程序,服务端地址设定的字符串转换处理
- ipv6 address 的设定
- linux ipv6临时地址
- linux基础之uboot load address、entry point、 bootm address以及kernel运行地址的意义及联系
- linux基础之uboot load address、entry point、 bootm address以及kernel运行地址的意义及联系
- Linux IPv6 地址配置
- 这个地址介绍了如何配置debian linux mysql,可以进行远程访问mysql
- Linux 接口地址的获取-暨获取本地IP地址(所有地址,包括IPv4,IPV6,MAC 地址)
- 如何在 Fedora 上设定和取消 IPv6 地址