★风云★刀的小站

Kratos
一款专注于用户阅读体验的响应式博客主题
  1. 首页
  2. 技术
  3. 正文

解决Win下Anyconnect获取不了IPv6地址问题

2017-12-24 2027点热度 1人点赞 0条评论

最近遇到个问题,那就是win下的anyconnect无法获取用ocserv搭建服务的IPv6地址。

很是纳闷,在服务器端debug了下看到分配给客户端IPv6的地址了,但是客户端anyconnect就是无法获取,如下图。我用ocserv的openconnect客户端就能获取到地址。

查询各方资料无法找到解决方案。无意中在官方的changelog中找到一段话。

ocserv: reworked the MTU discovery. Disable MTU discovery when not requested and set the minimum packet size to 1280 for IPv6 and 800 bytes for IPv4. When the MTU discovery fails to calculate an MTU over the minimum then disable MTU discovery and rely on packet fragmentation. Also set the DPD packet size to equal the current MTU, to allow detecting broken DTLS connections.

链接地址:https://ocserv.gitlab.io/www/changelog.html

大概看了下,意思就是说MTU小于1280的话就不给IPv6地址。

随即我就查看了电脑的网卡的MTU,如下:


网卡的MTU才1300,anyconnect网卡启用的MTU才1206。这当然获取不了IPv6地址。

知道原因后着手将网卡的MTU改成默认的1500。电脑重启,如下:

再次使用Anyconnect连接ocserv正常获取IPv6地址。

问题解决啦。

后来我想了下,造成电脑MTU变成1300的原因是安装了思科的VPN客户端(RemoteVPN使用的客户端)。卸载或者使用自带的MTU设置工具设置成默认的即可恢复。

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: Anyconnect Cisco IPv6 Win
最后更新:2019-03-23

hale

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2022 iteachs.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

苏ICP备2022000219号-1