I am using ifconfig on my openSUSE 11.4 installation. I have problems automatically
setting the default gateway when connecting through the wireless device. I use Yast to
setup the wireless connection and ‘ifconfig’ shows that I have an IP address on wlan0.
However, ‘route -n’ tells me that the communication is still going through the default
gateway that was last assigned to the ethernet card (even if the ethernet cable is
disconnected) and as a result I cannot connect. It also does not help that I manually
call ‘/etc/init.d/network restart’. I always need to “guess” the default gateway and then
force it manually. That is always an annoying process (in particular when the default
gateway is not obvious).
For example, right now I have (network cable is disconnected):
eth0 Link encap:Ethernet HWaddr E8:9A:8F:7B:17:0F
inet addr:128.208.19.133 Bcast:128.208.19.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:14477 errors:0 dropped:19 overruns:0 frame:0
TX packets:365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1325858 (1.2 Mb) TX bytes:44321 (43.2 Kb)
Interrupt:43 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:224 errors:0 dropped:0 overruns:0 frame:0
TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22286 (21.7 Kb) TX bytes:22286 (21.7 Kb)
wlan0 Link encap:Ethernet HWaddr EC:55:F9:C8:62:C8
inet addr:69.91.218.231 Bcast:69.91.218.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4455 errors:0 dropped:1 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:856318 (836.2 Kb) TX bytes:9845 (9.6 Kb)
I have an IP address through wlan0: 69.91.218.231, but route -n shows that my default gateway is still 128.208.19.100:
Destination Gateway Genmask Flags Metric Ref Use Iface
69.91.218.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
128.208.19.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 128.208.19.100 0.0.0.0 UG 0 0 0 eth0
If I manually force the gateway to be “69.91.218.100”, then I can connect through the wireless.
On older openSUSE installations (e.g., openSUSE 10.0) I was able to deactivate eth0
(e.g., through ‘ifconfig eth0 down’) which would then solve the routing problem.
However, in openSUSE 11.4 if I try to delete the eth0 configuration with Yast or
deactivate it with ‘ifconfig eth0 down’ I get:
eth0 serves root filesystem. Leave it up.
Is there any way how I can have the correct default gateway automatically set up? Or, how can I find out what
the default gateway is without having to guess it?
Thanks!