LinuxQuestions.org
Help answer threads with 0 replies.
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 05-16-2006, 02:26 AM   #1
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
How do I make one network card my default ? I have three on my pc.


Hi all,

Well, LOL, I figured out why when I upgrade to 2.16 series kernels I don't have internet.

My pc has two on-board NIC's and I also have a pci-ethernet NIC. I allways use the PCI-NIC as it is seen correctly by this pc when I boot Windows 98 or Windows XP. Those other two NIC's don't get seen properly. No biggie, except until I did this kernel upgrade.

Now in my last kernel the PCI-Based network card was seen as eth0 and that was what I used for my everyday internet. Just that network card.

Now I upgraded and it's seen by Linux as eth1. But I want to use a maual IP setting on there of 192.168.1xx.xx

How do I force my computer now to disregard eth0 and use eht1 with a manually specified IP address.

Linux is "odd" in the fact that in my bios I have the two on-board NIC's turned off, bu t somehow Linux turns them on. It wasn't a big deal until now.

I can get DHCP to work on eth1 but I can't force an IP on it.

Thank you in advance.
 
Old 05-16-2006, 02:34 AM   #2
wraithe
Member
 
Registered: Feb 2006
Location: Australia
Distribution: Linux... :-)
Posts: 241
Blog Entries: 1

Rep: Reputation: 50
first question....
uninstall..or remove...
the distro's i have used all have that ability..
just make sure you keep the right one...eth0 or eth1 is irrelevent once you only have one ethernet...i have one only eth1, did that a while back when i was reconfiguring something and its just stayed that way(not messing with something that works)...

second...linux only looks at bios at boot to find where the drive is...
after that no more lookey...unlike windows that rellies on it...
 
Old 05-16-2006, 03:44 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
You can force your card to have eth0 by adding a line to "/etc/modprobe.conf" that says
Code:
alias eth0 <your_ethernet_driver>
where <your_ethernet_driver> is the name of the kernel module that the network card uses.

Or you start an editor like vi or pico (or whatever other editor you like) and open up
Code:
/etc/rc.d/rc.inet1.conf
In there you will find the network configuration parameters that you've once set using netconfig. You'll see stuff filled in at the positions
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
you can transfer these values to the block below that with the variables that have [1] at the end - these are the configuration parameters for eth1.

Eric
 
Old 05-16-2006, 01:18 PM   #4
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Consider this a virtual "bump" on the "alias eth0 <modulename>" since that's about the only way to make this happen with Slackware's init scripts now. You used to be able to add an ether= line to the kernel boot parameters that would specify something unique to enough of the cards (like an IO port address) but that stopped working well when people stopped using ISA cards.

Now it's basically luck as to which cards are detected first (although they tend to be detected in the same order).

As a last-ditch scenario (or maybe a first-run if you're short on IRQs!) you could also just go into the BIOS and disable the on-board NICs.
 
Old 05-16-2006, 02:54 PM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Adjusting /etc/rc.d/rc.modules to force a module load order works for me. YMMV
 
Old 05-17-2006, 07:48 AM   #6
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
With 2.6.x you might want to prepare to just let udev deal with things (they'll be modprobed in the order they're enumerated on the PCI bus). I don't know how Patrick's going to resolve the inet1 script with the way udev can/will initialize network cards but he's going to need to at some point.
 
Old 05-18-2006, 12:07 PM   #7
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
What if you don't load your network cards as modules and you build the nic support right into the kernel? Then how could you re-arrange the nics?

Thanks
 
Old 05-18-2006, 12:12 PM   #8
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
That would have to use the kernel command-line.
 
Old 05-18-2006, 12:16 PM   #9
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
Quote:
Originally Posted by tuxdev
That would have to use the kernel command-line.
How would I go abouts doing that? I am sure if somebody pointed me in the right direction, I could figure out the rest.

Thanks
 
Old 05-20-2006, 11:42 PM   #10
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
Hi all,

I'm going to guess here Cereal, maybe you pass it at /etc/rc.d/rc.local?

Maybe someone here get back to you soon .

Bye the way thanks guys the advice worked, no more swapping wires
 
  


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
Choosing the default network card for connecting to the internet MaestroC Linux - Networking 4 10-22-2005 07:47 PM
Make a sound card default. darkarcon2015 Slackware 9 01-07-2005 05:13 PM
need help to make card active & respond to the wireless network southamptonfc Linux - Newbie 6 12-09-2004 11:40 PM
Help setting default Network card phyberoptix Linux - Networking 2 11-05-2004 04:41 PM
Can't make my wireless network card to work augu2000 Linux - Hardware 8 08-22-2003 06:54 PM

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

All times are GMT -5. The time now is 11:25 PM.

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