Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page Ethernet card set up conflicts
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 05-10-2003   #1 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
Ethernet card set up conflicts

I have a small problem with my laptop ethernet set up: I have two possible configurations, one with a wireless usb adapter for use at home and one with pcmcia card for work. These are configured in two files if-th0, and if-eth1. I also have aliases set up in modules.conf to autoload.

Now the problem. If I set the wireless card as eth0 and the lan card set as eth1. When I load at work the system give errors along the lines of incorrect MAC address and cannot change the name of the eth1 to eth0 etc. I then have to configure the card manually. If I swap the setting round I then get the same problem at home, only worse because it then does not load the module correctly. I know (some of?) the programs that are used ifup and if-wireless, but do not have enough knowledge to re programme these.

What I want to know is there a way of checking which card is loaded and then only configuring that device. I know that ifup use the -f to check for valid files but is there a check on hardware and devices, that couls be used.

As I said this is more of a nuisance than a major problem as I could always configure manually every time.

Did any of that make sense?
turls is offline   Reply With Quote
Old 05-10-2003   #2 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,575
It makes perfect sense. That's one of the major problems in Linux's networking code, as I see. For almost all NIC driver modules, it's not possible to set the interface's name. It always chooses eth + the first available number. The worst thing is that it's really easy for the driver module to set the interface's name, so I don't really get it why they don't allow it. Only a few modules allow it. If one of your modules supports it (check with modinfo -p), then set that card to be eth1, and all should be solved.

If that isn't possible, I can only make some suggestions. I would create a new network initialization script, that checks with cardctl/lspci/lsusb which NIC is currently being used, and then configure that one properly.
Dolda2000 is offline   Reply With Quote
Old 05-10-2003   #3 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
I thought about that ie if tulip is loaded set x file to be the if-eth0 file else if the wirless is present use that else null etc.

Now I have my soundcard working(another story) this could be my next big challenge

Can you give a bit more around the interafce name part and how you would do that. I could do it for the wireless driver since I have the module source code and have to compile it anyway to use it. (not part of the Kernel) Would just need the info of which file to mod and how.

Can you check which devices are load in a bash shell?
turls is offline   Reply With Quote
Old 05-11-2003   #4 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,575
Well, I can't really help you patch your driver without knowing which one it is. Can you post an URL?

Of course you can check what modules are loaded from the shell. How else would the kernel hackers do it? Either use lsmod, or cat /proc/modules.
Dolda2000 is offline   Reply With Quote
Old 05-12-2003   #5 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
The driver is an ATMEL found http://atmelwlandriver.sourceforge.net/ though I cannot access this site at the moment.

Is there any specific file that has the module info stored in or is this just a developers choice?
turls is offline   Reply With Quote
Old 05-12-2003   #6 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,575
The module info is stored in the module file itself. modinfo is a program which retrieves it. -p is an option to modinfo that makes it display what paramaters the module accepts.
Which version of the driver are you using?
Dolda2000 is offline   Reply With Quote
Old 05-12-2003   #7 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
The latest one on that site. I only downloaded it about a month ago. I think (can't check at the mo) it was dated december last year. When I have the version will post
turls is offline   Reply With Quote
Old 05-12-2003   #8 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,575
Look in src/usb/vnetusba.c in the driver's source code. Search for a line containing init_etherdev. It should look like this:
Code:
if (!(Adapter->net = init_etherdev(NULL, 0))) {
Change it to this:
Code:
if (!(Adapter->net = init_netdev(NULL, 0, "wlan%d", ether_setup))) {
If you do that, the interface with that device will be called wlan0 instead of eth?. That way, there will be no name conflicts.
Dolda2000 is offline   Reply With Quote
Old 05-13-2003   #9 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
I will try that and let you know how I get on.

Need to learn a bit of c me thinks
turls is offline   Reply With Quote
Old 05-15-2003   #10 (permalink)
Just Joined!
 
Join Date: May 2003
Location: UK-Heart of Cheshire
Posts: 31
Did not work. Gave unresolved symbol errors
turls is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 03:20 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0