HOWTO: Get networking and network services working in Sabayon aka The Networking Guide

From Sabayon Wiki
Revision as of 06:22, 20 May 2011 by Dadaist (Talk | contribs) (Wireless)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Prenotes

Eventually this will be complete, but currently this is just a first draft to be extended.

Q.What is a Shell ?

A. Shell is a command line interface or terminal, known to window users as The Command Prompt. (Window's shell is terrible).

To get in a Shell, press Alt-f2 (The shortcut key for the Run command window) and type konsole or gnome-terminal or xterm depending on your preference.

To get into a Root Shell either use the su (switch user command) by typing su - (the - means to change to that user's settings and home directory) or press Alt-f2 and type kdesu shellprogram or gnomesu shellprogram where shell program is konsole, gnome-terminal, xterm or another. Technically the Shell is actually the environment of the command line and not just the frontend for it. The most common Linux shell is BASH (Bourne Again Shell)

Q. What is all this Alt-F2 ing ?

A.Most useful tool bar known to new Sabayon Users is The Run Command Dialog, which allows you run all sorts of programs and commands simply by typing the name of the command and pressing enter. Alt-F2 is the Global shortcut (It works in KDE, Gnome, XFCE, etc) for this, it can also be accessed by right clicking desktop and select run Command from the menu.

Q. What I need for this guide ?

A. You need a Sabayon Linux or a Gentoo Linux install, a brain, some eyes and the ability to read, think and learn.

Hardware & Drivers

Wired

The majority of wired ethernet cards are currently supported by their respective drivers in the Linux kernel. Sabayon Linux should automatically detect the correct module/s for your computer's wired ethernet card.

If this isn't the case (You don't have a device called eth0 or eth1 after typing ifconfig -a as root in terminal) then type the command lspci in a root terminal to identify your PCI based wired ethernet card or type lsusb -v in a root terminal to identify your USB based wired ethernet card.

The information you are looking for is the line that follows on from Ethernet controller: , for PCI Based wired ethernet cards.

The information you are looking for is found after the idVendor, iManufactur and iProduct lines , for USB Based wired ethernet cards.

From those lines identify the manufacturer and model of your wired ethernet card, and the use Google or your favourite search engine (add linux or gentoo as one of the search terms) to identify which kernel module you manually need to load or which drivers you may need to install to get a working kernel module.

Once you have identified the module you need to load, load it by typing (in root shell) modprobe modulename (where modulename is the name of linux kernel module for your computer's wired ethernet device / card). Then check that it is loaded by typing (in root shell) lsmod | grep modulename (where modulename is the name of Linux kernel module for your computer's wired ethernet device / card).

If the module is loaded then you will see the modulename returned in console, now you should be able to type ifconfig -a (as root) in terminal and a device called ethX (where X is mostly likely 0 or 1) is shown in console / terminal/

If not please type dmesg | tail -n 50 (as root) in shell and paste the output at rafb.net/paste or pastebin.ca. Then seek help on the Sabayon forums or IRC and attach the URL for the dmesg paste.


Wireless

The majority of wireless ethernet cards are currently supported by either their respective drivers in the Linux kernel or using their Windows drivers via ndiswrapper. Sabayon Linux should automatically detect the correct module/s for your computer's wireless ethernet card.

If this isn't the case (You don't have a device called eth0 or eth1 after typing ifconfig -a as root in terminal) then type the command lspci in a root terminal to identify your PCI based wireless ethernet card or type lsusb -v in a root terminal to identify your USB based wireless ethernet card.

The information you are looking for is the line that follows on from Network controller: , for PCI Based wireless ethernet cards.

The information you are looking for is found after the idVendor, iManufactur and iProduct lines , for USB Based wireless ethernet cards.

From those lines identify the manufacturer and model of your wired ethernet card, and the use Google or your favourite search engine to identify (add linux or gentoo as one of the search terms) which kernel module you manually need to load or which drivers you may need to install to get a working kernel module, or whether you are best to use ndiswrapper.

Common native wireless chipsets / devices that have native drivers (either in kernel or 3rd party) include Aironet (airo), Hermes (hermes), Broadcom (bcm43xx), acx, adm8211, hostap-driver , Intel (ipw2100, ipw2200, ipw3945), linux-wlan-ng, Atheros (madwifi-ng), Orinco (orinoco), Prism (Prism2, prism54) , Realtek 2x00 range ( rt2400, rt2500, rt2561, rt2570, rt2x00), Realtek 818x range (rtl8180, rtl8187) , Netgear (wg511t) and Zydas (zd1211).

The list of wireless chipsets / devices that are supported with ndiswrapper is found at http://ndiswrapper.sourceforge.net/mediawiki/index.php/List .

Once you have identified the module you need to load, install the correct driver package by using emerge. Mostly likely either by typing emerge drivername in terminal (as root) or by typing emerge ndiswrapper in terminal (as root) . Before installing the drivers or ndiswrapper, type uname -a to identify your Sabayon installation's current Linux kernel , then type ls -l /usr/src/linux and ensure that the arrow points to the same kernel version reported by uname. If not type rm /usr/src/linux in terminal (as root) to delete the link and recreate by typing ln -s /usr/src/linux/linux-kernelversion-kerneltype /usr/src/linux in terminal (as root) . (where kernelversion is numerical version number of your kernel from uname and kerneltype is either gentoo or sabayon from uname).

If using ndiswrapper type ndiswrapper -i /path/to/windowsdriver.inf followed by ndiswrapper -m to correctly install the windows driver in ndiswrapper.

Once the driver or ndiswrapper is installed then load it by typing (in root shell) modprobe modulename (where modulename is the name of linux kernel module for your computer's wireless ethernet device / card), or modprobe ndiswrapper respectively.

Then check that it is loaded by typing (in root shell) lsmod | grep modulename (where modulename is the name of linux kernel module for your computer's wired ethernet device / card).

If the module is loaded then you will see the modulename returned in console, now you should be able to type ifconfig -a (as root) in terminal and a device called ethX (where X is mostly likely 0 or 1, unless your are using madwifi and then it is athX) is shown in console / terminal/

If not please type dmesg | tail -n 50 (as root) in shell and paste the output at http://rafb.net/paste or http://pastebin.ca. Then seek help on the Sabayon forums or IRC and attach the URL for the dmesg paste.

Network Setup aka Getting an IP address

Sabayon Linux has the ability to use either NetworkManager or the original Gentoo networking scripts. By default Sabayon Linux uses NetworkManager with the Knetworkmanager GUI.

If NetworkManager doesn't work for you, or you require features that NetworkManager doesn't currently support (eg multiple network connections, static ip) You can remove its boot services by typing rc-update del NetworkManager && rc-update del dhcdbd (as root) in terminal.

Once doing this your system is only using the baselayout or original Gentoo networking scripts. The configuration file for these scripts is found and /etc/conf.d/net and can be automatically generating using the net-setup wizard by typing net-setup(as root) in terminal.

For further or more advanced configuration you can manually edit /etc/conf.d/net file as root by pressing alt-f2 and typing kdesu 'kwrite /etc/conf.d/net' or by typing nano /etc/conf.d/net (as root) in terminal. You will want to have a look at the /etc/conf.d/net.example and the Gentoo Handbook Networking section (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=3) first to give you an idea of the syntax used to configure the scripts.

Once done restart the Gentoo networking scripts using /etc/init.d/net.ethX restart.

If your networking still doesn't work , you can attempt to manually get it working by following the generic steps below. Type the following as root in terminal: For DHCP

modprobe -r modulename && modprobe modulename
ifconfig ethX up
dhcpcd -d ethX up

For Static

modprobe -r modulename && modprobe modulename
ifconfig ethX ipaddress up

Where modulename is name of relevant kernel module, ethX is your wired or wireless ethernet device and ip address is your static IP address.

If you are still having issues getting an IP address seek help on the Sabayon forums or IRC and attach information about your networking device (wired / wireless, manufacturer, model, kernel driver), also attach the output of tail -n 50 /var/log/messages typed as root in terminal (preferably pastebinned).


Network Servers and Services

Still to come be patient.

References

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=3

http://gentoo-wiki.com/HARDWARE_Wireless

Initially written by --Appleman1234 23:22, 21 April 2007 (PDT)