我找到了一个简单的解决办法:
http://ubuntuforums.org/showthread.php?t=1715807我的情况正好跟他相反:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:37:26:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.33.94/24 brd 192.168.33.255 scope global eth0
inet 192.168.33.95/32 scope global eth0
chenrui@d7-64-gw-2:~$ ip route show
default via 192.168.33.254 dev eth0 src 192.168.33.95
主要是要在default gateway后面加上src 192.168.33.95,命令是:
ip route change default via 192.168.33.254 dev eth0 src 192.168.33.95