The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/Network"
Threesixes (talk | contribs) m (add some netgear garbage, dump some NM garbage, stage 1 of update) |
|||
Line 7: | Line 7: | ||
==== Wi-Fi ==== | ==== Wi-Fi ==== | ||
Most wifi cards require firmware, some do not, such as netgears wg311t atheros AR5212/AR5213. | |||
{{console|body=(chroot) # ##i##emerge linux-firmware}} | |||
===== Using NetworkManager ===== | ===== Using NetworkManager ===== | ||
For laptop/mobile systems where you will be using Wi-Fi and connecting to various networks NetworkManager is strongly recommended. | For laptop/mobile systems where you will be using Wi-Fi, roaming, and connecting to various networks NetworkManager is strongly recommended. See the {{package|net-misc/networkmanager}} package for steps involved in setting up NetworkManager. | ||
{{ | |||
===== Using wpa_supplicant ===== | ===== Using wpa_supplicant ===== | ||
Line 65: | Line 49: | ||
</pre> | </pre> | ||
Note that you will need to add | Note that you will need to add {{c|dhcpcd}} to the default runlevel, and it will automatically manage the connection through wpa_supplicant. DHCPCD has built-in hook for {{c|wpa_supplicant}}. It will connect to your access point, and {{c|dhcpcd}} will acquire an IP address via DHCP: | ||
{{console|body= | |||
(chroot) # ##i##rc-update add dhcpcd default | (chroot) # ##i##rc-update add dhcpcd default | ||
}} | |||
==== Desktop (Wired Ethernet) ==== | ==== Desktop (Wired Ethernet) ==== | ||
For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add | For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add {{c|dhcpcd}} to the default runlevel: | ||
{{console|body= | |||
(chroot) # ##i##rc-update add dhcpcd default | (chroot) # ##i##rc-update add dhcpcd default | ||
}} | |||
When you reboot, {{c|dhcpcd}} will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server. | |||
If your upstream DHCP server is dnsmasq, it can be configured to assign addresses via mac address to make servers on DHCP feasible. | |||
==== Server (Static IP) ==== | ==== Server (Static IP) ==== | ||
For servers, the [[Funtoo Linux Networking]] scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system. | For servers, the [[Funtoo Linux Networking]] scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system. |
Revision as of 17:35, June 6, 2015
This is a template that is used as part of the Installation instructions which covers: Network configuration. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.
Configuring your network
It's important to ensure that you will be able to connect to your local-area network after you reboot into Funtoo Linux. There are three approaches you can use for configuring your network: NetworkManager, dhcpcd, and the Funtoo Linux Networking scripts. Here's how to choose which one to use based on the type of network you want to set up.
Wi-Fi
Most wifi cards require firmware, some do not, such as netgears wg311t atheros AR5212/AR5213.
(chroot) # emerge linux-firmware
Using NetworkManager
For laptop/mobile systems where you will be using Wi-Fi, roaming, and connecting to various networks NetworkManager is strongly recommended. See the net-misc/networkmanager package for steps involved in setting up NetworkManager.
Using wpa_supplicant
wpa_supplicant is another good choice for wireless network connections.
Before installing wpa_supplicant, we should first enable the wireless flag (called wps
) for the installation of the package:
This installs only a command-line tools. For GUI, enable qt4
USE flag in order to use a qt-based wpa_gui
(chroot) # echo '=net-wireless/wpa_supplicant wps' >> /etc/portage/package.use
Now, we can emerge wpa_supplicant:
(chroot) # emerge -a wpa_supplicant
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant/wpa_supplicant.conf
.
The syntax is very easy (The example below refers to a connection to a WPA/WPA2 encrypted connection):
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel #ap_scan=0 #update_config=1 network={ ssid="YourSSID" psk="your-secret-key" scan_ssid=1 proto=RSN key_mgmt=WPA-PSK group=CCMP TKIP pairwise=CCMP TKIP priority=5 }
Note that you will need to add dhcpcd
to the default runlevel, and it will automatically manage the connection through wpa_supplicant. DHCPCD has built-in hook for wpa_supplicant
. It will connect to your access point, and dhcpcd
will acquire an IP address via DHCP:
(chroot) # rc-update add dhcpcd default
Desktop (Wired Ethernet)
For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add dhcpcd
to the default runlevel:
(chroot) # rc-update add dhcpcd default
When you reboot, dhcpcd
will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.
If your upstream DHCP server is dnsmasq, it can be configured to assign addresses via mac address to make servers on DHCP feasible.
Server (Static IP)
For servers, the Funtoo Linux Networking scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See Funtoo Linux Networking for information on how to use Funtoo Linux's template-based network configuration system.