View previous topic :: View next topic |
Author |
Message |
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Fri Nov 22, 2002 7:33 am Post subject: KC3: Networking |
|
|
Navigation: [Kernel Compilation] [Table of Contents]
KC3: Networking worked during installation, but now that I compiled my own kernel, it doesn't work anymore. What's wrong?
Firstly, you need to make sure you have the correct kernel modules compiled into the kernel (found in Device Drivers -> Network Device Support -> Ethernet xxxMbit). You can choose which one you have using the output of lspci and the kernel help with each network driver. For instance, my lspci output is:
Code: | ...
00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
... |
This shows I have the nvidia network controller (00:14.0), so I need to select the nForce network driver in the 10/100Mbit menu. It is usually a good idea to compile network devices into the kernel, rather than as a module. This stops you messing around with hotplug & modules.autoload. If you don't know which network driver out of several yours might apply to, compile all the possibilities as modules, then load them one by one (you dont need to reboot for this, if the kernel version you are running is the same as you are compiling the modules for), having a look at the output of 'dmesg|tail' to see which one finds the network controller. That is then the one you need to select to be compiled into the kernel (you can deselect all the others that didn't work). You can also check to see if a new network device appears in the output of 'ifconfig -a'
If you know you have the correct driver compiled in, and your network uses dhcp you don't need to do any extra configuration - you should already have a dhcp client installed (dhcpcd), so simply run '/etc/init.d/net.eth0 start'. If your network card is a different number (eg eth1) create the net.eth1 script as follows:
Code: | cd /etc/init.d
ln -s net.eth0 net.eth1 |
If dhcpcd doesnt work, you can run it directly in debug mode to see where it is going wrong with the following:
If your network uses static addressing, you need to create the /etc/conf.d/net file with something like the following in it:
Code: | config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" ) |
or
Code: | config_eth0=( "192.168.0.2 netmask 255.255.255.0" ) |
depending on your network setup. Then bring it up with '/etc/init.d/net.eth0 start'
Hopefully this should get you a working network connection, so you can then add net.eth0 to the startup script to have networking brought up on boot: rc-update add net.eth0 boot (or net.eth1 as needed)
Last edited by TheCoop on Sun Jan 14, 2007 2:30 pm; edited 1 time in total |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Nov 30, 2002 9:13 pm Post subject: |
|
|
Post comments on this FAQ to [FAQF] KC3: Networking. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20485
|
Posted: Wed May 14, 2003 2:16 am Post subject: |
|
|
From the old FAQ:
It is generally easier in the long run to compile drivers for network cards directly into the kernel, rather than as modules. Make sure the driver for your network card is selected as [*] when you configured the kernel. Also make sure you mounted the partition containing the /boot directory when you copied your kernel to it; otherwise your changes will not take effect. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|