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.
|
|
05-16-2006, 03:26 AM
|
#1
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Rep:
|
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.
|
|
|
05-16-2006, 03:34 AM
|
#2
|
Member
Registered: Feb 2006
Location: Australia
Distribution: Linux... :-)
Posts: 241
Rep:
|
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...
|
|
|
05-16-2006, 04:44 AM
|
#3
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
05-16-2006, 02:18 PM
|
#4
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
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.
|
|
|
05-16-2006, 03:54 PM
|
#5
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012
Rep:
|
Adjusting /etc/rc.d/rc.modules to force a module load order works for me. YMMV
|
|
|
05-17-2006, 08:48 AM
|
#6
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
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.
|
|
|
05-18-2006, 01:07 PM
|
#7
|
Member
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479
Rep:
|
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
|
|
|
05-18-2006, 01:12 PM
|
#8
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012
Rep:
|
That would have to use the kernel command-line.
|
|
|
05-18-2006, 01:16 PM
|
#9
|
Member
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479
Rep:
|
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
|
|
|
05-21-2006, 12:42 AM
|
#10
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:36 PM.
|
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
|
|