每次重新连接 wifi 都要再加一遍路由 感觉好麻烦
sudo route -n delete -net 192.168.0.0/16
sudo route -n add -net 192.168.0.0/16 192.168.6.254
1
xdz0611 2016-12-07 12:15:46 +08:00
楼主默认的路由啥样的
路由器的配置呢,应该默认会推送路由信息的啊 |
3
XiaoxiaoPu 2016-12-07 13:14:07 +08:00 via iPad
一般路由器支持加额外的静态路由吧?在路由器管理界面找找看
|
4
Micky 2016-12-07 13:15:29 +08:00
wifi: 你先走,我断后!
|
5
iCyMind 2016-12-07 13:46:31 +08:00
在 OSX 上 , 每次开机或者网络环境发生变化时,
- `/etc/resolv.conf` - `/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist` - `/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist` 这三个文件都会发生变化 , 写个 Agent 监控这几个文件 , 当发生改变时自动执行添加路由的脚本. ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.icymind.network</string> <key>ProgramArguments</key> <array> <string>/Users/simon/Dropbox/Script/com.icymind.network.sh</string> </array> <key>WatchPaths</key> <array> <string>/etc/resolv.conf</string> <string>/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist</string> <string>/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> ``` |
6
jeffma 2016-12-07 18:48:24 +08:00 1
|