-
Notifications
You must be signed in to change notification settings - Fork 1.6k
获取最新有效期 ipv6 地址 #1327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
遇到同样问题,感谢分享 |
没搞懂如何操作,可以傻瓜一点吗? |
获取IPv6结果失败! 未能成功执行命令 |
Open
这个示例是在Linux系统中获取最新有效期IPv6地址,win请查阅#531 (comment) |
我竟然获取到了个fec0开头的,是不是可以不排除fe80,而是只获取240开头的呢 |
不想获取的地址添加排除就行了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
获取最新
valid_lft
时间的ipv6ip a
命令可以查看到网口ip地址,存在多个ipv6,每个ipv6都有valid_lft
和preferred_lft
时间,获取最新的valid_lft
有效时间(最大值);当然你可以用将下面命令中valid_lft
换成preferred_lft
(其实两者效果一样)使用
valid_lft
使用
preferred_lft
$3 !~ /^fe80::/
是用于排除已fe80::
开头的ipv6;需要排除其他已xxxx
开头的ipv6自行添加或者使用
直接获取以
2408|2409|240e
开头的ipProblem
No response
Other Description
No response
Checklist
The text was updated successfully, but these errors were encountered: