Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-06-2004, 10:01 PM
|
#1
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Rep:
|
Multiple Network Cards
I have several network cards installed in my slackware box, but I'll concentrate on two. When running, slack defaults to eth0, which is my ethernet card for wired connections. I, unfortunatly, have no use for this unless I'm networking with a friend. I need to to use wlan0 as my default, and I'm not sure how to go about doing this. I appologize if this is painfully obvious, or already covered, but I wasn't able to find any information on it. Thanks!
|
|
|
11-06-2004, 10:04 PM
|
#2
|
Member
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
|
If you type in the command
route
what comes back?
All we need to do is tell your system which is the default gateway.
|
|
|
11-06-2004, 11:51 PM
|
#3
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
Here's what "route" returns:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 1 0 0 eth0
Looks as though wlan0 isn't even listed. The command "ifconfig" lists it, what should I do to add it to the route table?
|
|
|
11-07-2004, 12:01 AM
|
#4
|
Member
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
|
Sorry I should have asked for this as well! What is the output of ifconfig? And what is your wlan0 interface IP address supposed to be? Is it set with dhcp?
|
|
|
11-07-2004, 01:17 AM
|
#5
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
ifconfig:
Code:
eth0 Link encap:UNSPEC HWaddr 00-00-4C-02-00-01-A5-D0-00-00-00-00-00-00-00-00
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 00:30:BD:92:8E:C9
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1040 (1.0 Kb) TX bytes:0 (0.0 b)
Interrupt:22 Memory:feafc000-feafdfff
This is what I get after using 'ifconfig wlan0 up'
It's setup to use a static IP of 192.168.0.2 not DHCP.
On an unrelated note, how can I default "Num Lock" to on instead of off?
Last edited by ryanroler; 11-07-2004 at 01:18 AM.
|
|
|
11-07-2004, 01:32 AM
|
#6
|
Member
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
|
OK, looks like your wlan card is not configuring. This puts you into what could be a whole new realm of ugly!
First thing I see is that you're trying to configure it for the same IP address as eth0. If this is what you want to do (like you are connecting to the same LAN but without the wire), you can try this:
Code:
ifconfig eth0 down
iwconfig wlan0 essid whateveryourapnameis
iwconfig wlan0 key off
iwconfig wlan0 commit
ifconfig wlan0 192.168.0.2 up
In the above example there's a couple things, first off put in the appropriate AP name and wep key if appropriate. You also may or may not need the commit command, I don't need that. You may also need to add a route entry for -net 192.168.0.0
When you go back to using eth0, you need to do the opposite: down the wlan0 and up the eth0
If you have another IP address available in the 192.168.0.0 network, then I would actually set up a different address (i.e. 192.168.0.3) to the wlan0 interface that way you don't have to down the eth0 interface when you're on the wlan. The process is the same as above except you would want to add metric values to your route table entries (eth0 first then wlan0) and a default gw.
I can get the wlan cards to configure, but there are so many little quirks to each of them that the iwconfig stuff may not work right at all for you.
|
|
|
11-08-2004, 04:20 PM
|
#7
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
Okay, no prob with those commands, and I can now ping my router (192.168.0.1), but no network programs (ie. lynx) will use wlan0, at least, they won't use any network, I do know that ping and telnet work though.
In regards to my wired NIC, I don't ever use it, I'm not worried about messing with it.
To solve the problem of programs not finding a network to use, I am guessing that I need to add a route entry, as it has none that references the wlan0 interface. How would I go about adding an entry? I read the man pages and it looks like the command would be something like:
route add -net 192.168.0.0 netmask 255.255.255.0 dev wlan0
But that brings up an error message (SIOCADDRT: No such device). Any ideas?
|
|
|
11-09-2004, 12:45 PM
|
#8
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
Hey, anyone know the command to add this to the route table? I'm really having problems and keep getting the error I mentioned in the previous message. I really want to get internet to work with my linux box so I can quit using windows completely. More I use linux, the more painful it is to use this clunky thing.
|
|
|
11-09-2004, 11:39 PM
|
#9
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
Well, I was forced to take actions into my own hands (as is best I suppose). I finally managed to figure the damn thing out and my wireless card is performing better than in windows. Damn cool. Here's the commands I required to get it up (no pun intended).
Code:
modprobe ndiswrapper
iwconfig wlan0 essid Roler-Net
iwconfig wlan0 key off
iwconfig wlan0 commit
mount /mnt/external
ifconfig eth0 down
ifconfig wlan0 192.168.0.2 netmask 255.255.255.0 up
route add default gw 192.168.0.1
This is in my rc.local file (which runs every startup, if I understand correctly) and it works like a dream, hopefully anyone who's having problems can figure their setup out using this info.
|
|
|
11-10-2004, 05:36 AM
|
#10
|
Member
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
|
Hi, Ryanroler, you got it just right. The only difficulty you will have with this configuration is if you want to use your wired ethernet card. You will need to start eth0 interface, stop the wlan0 interface, and change the routing info for eth0.
Sorry, I've been away from the keyboard for a couple days!
Cheers
|
|
|
11-10-2004, 10:33 PM
|
#11
|
LQ Newbie
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11
Original Poster
Rep:
|
No prob, thanks for the point in the right direction at the very least. It's probably better for me to have figured it out on my own anyway, learned some stuff along the way. Again, thanks a ton for your help though, wouldn't have figured it out without ya.
As for eth0, I'm not worried about my wired connection, I haven't used it in the past 2 years, I doubt I'll start anytime soon, thanks though!
|
|
|
01-14-2005, 08:18 AM
|
#12
|
Member
Registered: Jan 2005
Location: Malaysia
Distribution: Fedora Core 3
Posts: 35
Rep:
|
Hi, just wondering, if i watn to have both eth0 and wlan0 working without on one and off the other, what should i do? My ip address is assigned by dhcp server.
what is that "mount /mnt/external" thing for?
thanks
Kel
|
|
|
All times are GMT -5. The time now is 10:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|