|
zhong:/home/zhong # route #有线上网时
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.79.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 172.16.79.1 0.0.0.0 UG 0 0 0 eth0
zhong:/home/zhong # route #无线上网时
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.64.0 * 255.255.248.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default 172.16.64.2 0.0.0.0 UG 0 0 0 eth1
问题起因:HP笔记本,在公司有时用无线上网,有时又要用有线上网,无线AP默认网关是172.16.64.2,有线网络的默认网关是172.16.79.1。openSUSE10.3的网络配置界面上,只有一个网关配置栏,每当切换上网方式的时候总要更改网关,麻烦。我想是否可以让#route中同时存在两条路由:
172.16.79.0 172.16.79.1 255.255.255.0 U 0 0 0 eth0
172.16.65.0 172.16.64.2 255.255.248.0 U 0 0 0 eth1
这样是否就可以不用频繁更改网关了?如果可行,那又该如何写呢?
请老大们指教,谢谢您! |
|