LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2004, 10:01 PM   #1
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Rep: Reputation: 0
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!
 
Old 11-06-2004, 10:04 PM   #2
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
If you type in the command

route

what comes back?
All we need to do is tell your system which is the default gateway.
 
Old 11-06-2004, 11:51 PM   #3
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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?
 
Old 11-07-2004, 12:01 AM   #4
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
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?
 
Old 11-07-2004, 01:17 AM   #5
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 11-07-2004, 01:32 AM   #6
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
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.
 
Old 11-08-2004, 04:20 PM   #7
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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?
 
Old 11-09-2004, 12:45 PM   #8
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 11-09-2004, 11:39 PM   #9
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 11-10-2004, 05:36 AM   #10
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
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
 
Old 11-10-2004, 10:33 PM   #11
ryanroler
LQ Newbie
 
Registered: Sep 2004
Location: WA, USA
Distribution: Slackware 10.0
Posts: 11

Original Poster
Rep: Reputation: 0
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!
 
Old 01-14-2005, 08:18 AM   #12
ksmj
Member
 
Registered: Jan 2005
Location: Malaysia
Distribution: Fedora Core 3
Posts: 35

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to forward with multiple network cards dcgva Linux - Networking 2 06-22-2004 02:38 PM
Setting up Slackware 9.1 to use multiple network cards? Lynx2112 Slackware 7 06-10-2004 06:52 PM
multiple network cards, wireless fell over and died Smerk Linux - Wireless Networking 13 04-08-2003 08:05 PM
multiple network cards in router Smerk Linux - Networking 4 03-06-2003 07:40 PM
VMWare and multiple network cards Syd Nicholson Linux - Networking 0 06-26-2001 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration