Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 568
  • Last Modified:

Wireless card not getting route set correctly (Pretty sure)

I am having a problem getting a wireless LAN card to work in SuSE Linux 9.0.  This is the first time I have tried to get a wireless lan card working in any linux version.  Anyway, I have the card working to the point that I can reach the access point.  I know this because I can open up a browser, direct it to the access point web configuration page and configure away.  Of course I can ping the access point too.  But, I cannot reach beyond the router.  Pining anything outside, like my ISPs DNS server, gives me "not accessable".

I am using DHCP, from the access point, to configure both my wired lan and wireless lan connections.  When I have both connections active the response to "route -nNvee" is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    MSS   Window irtt
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0    0     0      0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0     0     0      0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0     0     0      0

When I have only the wireless card active I get the first route line only.  So, it looks like for some reason the routing does not get fully set up for the wireless lan.  And the obvious question is - why not, and how can I get the route to be set up correctly?  Anybody got any ideas?
0
robertjbarker
Asked:
robertjbarker
  • 3
  • 2
  • 2
3 Solutions
 
asbharadwajCommented:
When you have only the wireless card active, you do not have a default route
add a default route with gateway 192.168.1.1 on wlan0
0
 
robertjbarkerAuthor Commented:
Yes, I tried to do that by setting the default gateway in the Yast network card configuration dialog.  It did not take for some reason. (It would be nice to know why it did not, and why the dhcp did not in the first place since it did for eth0)

So, is there another method for setting that default route?  Two methods come to mind:
 1) Using the "route" command (I suppose I could look up the syntax, but if you know it off the top, could you tell me)
 2) I'm sure there is a configuration file somewhere I could edit directly.  Might you know where it is?
0
 
shivsaCommented:
route add 192.168.1.0 MASK 255.255.255.0 192.168.1.1

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
shivsaCommented:
or
route add -net 192.168.1.0 netmask 255.255.255.0 eth0
0
 
shivsaCommented:
also please note, before adding route, first delete the existing route.

#route del default
#route
#route add default gw 192.168.1.1 netmask 255.255.255.0 dev eth0(or u can use route add default gw 192.168.1.1).
# route


0
 
asbharadwajCommented:
Replace the eth0 by wlan0 in the cmd given by shivsa
since you want to have the default route on the wireless lan card.
0
 
robertjbarkerAuthor Commented:
When this was my starting point (route -nNvee):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    MSS   Window irtt
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0    0     0      0

The command that worked was:

ip route add default via 192.168.1.1 dev wlan0

After which I got (route -nNvee):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    MSS   Window irtt
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0    0     0      0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0    0     0      0

With the same starting point as above, when I entered "route del default" I got "SIOCDELRT: No such process"
After this, when I entered
"route add default gw 192.168.1.1 netmask 255.255.255.0 dev wlan0"
I got
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    MSS   Window irtt
0.0.0.0         192.168.1.1     255.255.255.0   UG    0      0        0 wlan0    0     0      0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0    0     0      0

Which did not give me access beyond my access point/wireless router.  I have feeling that specifying "netmask 0.0.0.0" may have given me better results.

But, anyway, things work now, and thanks for the pointers.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now