升级导致vpnclient问题以及解决方案
最近升级了系统,vpnclient就不工作了。总是停在Authenticating user.Negotiating security policies.
花了点时间终于找到了原因,原来是MTU太小了。不知道什么原因我的无线路由的dhcp服务总是返回一个很小的mtu 576。我可以手工将网卡的mtu设成以太网卡缺省的1500。改之后vpnclient就好了。可以用这个命令来改:
ifconfig eth0 mtu 1500
如下步骤可以使每次系统启动时都自动使用1500作为mtu。
1. 网卡启动前设置mtu为155
在/etc/network/interfaces 中 iface eth0 inet dhcp的后面加入这行:
pre-up /sbin/ifconfig $IFACE mtu 1500
如果你使用的固定ip就更简单了。你可以直接在iface eth0 inet dhcp下面加入mtu 1500。你也可以跳过下面的步骤。
2. 避免dhcp设置mtu
在/etc/dhcp3/dhclient.conf中找到request列表,删除其中的interface-mtu.
改之前:
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu;
改之后:
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope;
重启。OK了。
Technorati Tags: vpn, cisco, vpnclient, mtu, dhcp
评论:








