ifconfig6

语法

ifconfig6 -r [name] | -l [name]

ifconfig6 -s name [dad num] [auto | [man [id mac] [host IPv6 gwIPv6][dns IPv6]]]

说明

显示或修改网络接口的 IPv6 配置。

选项

name
指定适配器名称,例如 eth0。
-r name
重新配置指定接口,然后设置自动策略。如果指定接口已设置为自动,将会刷新 IPv6 配置。
-l name
列出指定接口的配置。
-s name dad num
设置指定接口的重复地址检测传输次数。
-s name auto
设置指定接口的自动策略。
-s name man id mac
设置指定接口的备用接口 ID。必须通过手动策略控制接口。
-s name man host IPv6 gw IPv6
设置指定接口的静态主机 IP 和网关地址。必须通过手动策略控制接口。
-s name man dns IPv6
设置指定接口的 DNS 服务器 IP 地址。必须通过手动策略控制接口。

示例

列出 eth0 接口的配置:

Shell> ifConfig6 -l eth0

使用自动配置动态请求 eth0 接口的 IPv6 地址配置:

Shell> ifconfig6 -s eth0 auto

根据自动策略设置 eth0 的 DAD 传输次数:

Shell> ifconfig6 -s eth0 auto dad 10

根据手动策略设置 eth0 的备用接口 ID:

Shell> ifconfig6 -s eth0 man id ff:dd:aa:88:66:cc

使用 eth0 接口的静态 IPv6 地址配置,并指定该配置在网络重新加载后仍然存在:

Shell> ifconfig6 -s eth0 man host 2002::1/64 2002::2/64 
gw 2002::3/64

将 DER 格式的第三个 TLS 证书导出到名为 abc.crt 的文件中:

Shell> tlsconfig -x -i 3 -f abc.crt -t DER

指定 TLS 密码算法:

Shell> tlsconfig -c AES128-SHA256:AES256-SHA256

显示 TLS 支持的密码:

Shell> tlsconfig -c list

对 TLS 连接启用证书验证:

Shell> tlsconfig -k PEER -o HOSTNAME

指定使用 TLS v1.2 协议版本:

Shell> tlsconfig -v 1.2