Difference between revisions of "Install/Network"

From Funtoo
Jump to navigation Jump to search
(Marked this version for translation)
Line 2: Line 2:
{{InstallPart|Network configuration}}
{{InstallPart|Network configuration}}
</noinclude><translate>
</noinclude><translate>
=== Configuring your network ===
=== Configuring your network === <!--T:1-->


<!--T:2-->
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.
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 ====
==== Wi-Fi ==== <!--T:3-->
Most wifi cards require firmware, some do not, such as netgears wg311t atheros AR5212/AR5213.
Most wifi cards require firmware, some do not, such as netgears wg311t atheros AR5212/AR5213.
{{console|body=(chroot) # ##i##emerge linux-firmware}}
{{console|body=(chroot) # ##i##emerge linux-firmware}}
Line 12: Line 13:
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.
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 ===== <!--T:4-->
wpa_supplicant is a good choice for home wireless network connections where roaming is to a minimum.  See the {{package|net-wireless/wpa_supplicant}} package for steps involved in setting up wpa_supplicant.
wpa_supplicant is a good choice for home wireless network connections where roaming is to a minimum.  See the {{package|net-wireless/wpa_supplicant}} package for steps involved in setting up wpa_supplicant.


==== Desktop (Wired Ethernet) ====
==== Desktop (Wired Ethernet) ==== <!--T:5-->


<!--T:6-->
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:
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:


<!--T:7-->
{{console|body=
{{console|body=
(chroot) # ##i##rc-update add dhcpcd default
(chroot) # ##i##rc-update add dhcpcd default
}}
}}


<!--T:8-->
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.
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.


<!--T:9-->
If your upstream DHCP server is dnsmasq, it can be configured to assign addresses via mac address to make servers on DHCP feasible.
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) ==== <!--T:10-->
===== Funtoo Networking Scripts =====
===== Funtoo Networking Scripts =====
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.


===== Iproute2 / Net-Tools =====
===== Iproute2 / Net-Tools ===== <!--T:11-->
A lesser prefered way to configure static ip addresses and routes is by the legacy net-tools, or iproute2 package.  See: {{package|sys-apps/iproute2}}
A lesser prefered way to configure static ip addresses and routes is by the legacy net-tools, or iproute2 package.  See: {{package|sys-apps/iproute2}}


==== Hostname ====
==== Hostname ==== <!--T:12-->
By default Funtoo uses "localhost" as hostname. Although the system will work perfectly fine using this name, some ebuilds refuse to install when detecting localhost as hostname. It also may create confusion if several systems use the same hostname. Therefore, it is advised to change it to a more meaningful name. The hostname itself is arbitrary, meaning you can choose almost any combination of characters, as long as it makes sense to the system administrator. To change the hostname, edit
By default Funtoo uses "localhost" as hostname. Although the system will work perfectly fine using this name, some ebuilds refuse to install when detecting localhost as hostname. It also may create confusion if several systems use the same hostname. Therefore, it is advised to change it to a more meaningful name. The hostname itself is arbitrary, meaning you can choose almost any combination of characters, as long as it makes sense to the system administrator. To change the hostname, edit


<!--T:13-->
{{console|body=
{{console|body=
(chroot) # ##i##nano /etc/conf.d/hostname
(chroot) # ##i##nano /etc/conf.d/hostname
}}
}}


<!--T:14-->
Look for the line starting with hostname and change the entry between the quotes. Save the file, on the next boot Funtoo will use the new hostname.
Look for the line starting with hostname and change the entry between the quotes. Save the file, on the next boot Funtoo will use the new hostname.


<!--T:15-->
{{warning|Do not use special characters in the hostname, as the shell may interpret these, leading to unpredictable results. Use the Latin alphabet: a-z, A-Z, 0-9}}
{{warning|Do not use special characters in the hostname, as the shell may interpret these, leading to unpredictable results. Use the Latin alphabet: a-z, A-Z, 0-9}}
{{tip|Use short hostnames (up to 8 or 10 characters) to prevent the terminal screen being filled with the hostname, leaving little space for the command itself. This become particularly poignant when coding long command strings in various programming languages like Bash, Python, SQL and Perl}}
{{tip|Use short hostnames (up to 8 or 10 characters) to prevent the terminal screen being filled with the hostname, leaving little space for the command itself. This become particularly poignant when coding long command strings in various programming languages like Bash, Python, SQL and Perl}}
</translate>
</translate>

Revision as of 04:27, July 14, 2015


   Note

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 a good choice for home wireless network connections where roaming is to a minimum. See the net-wireless/wpa_supplicant package for steps involved in setting up wpa_supplicant.

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)

Funtoo Networking Scripts

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.

Iproute2 / Net-Tools

A lesser prefered way to configure static ip addresses and routes is by the legacy net-tools, or iproute2 package. See: sys-apps/iproute2

Hostname

By default Funtoo uses "localhost" as hostname. Although the system will work perfectly fine using this name, some ebuilds refuse to install when detecting localhost as hostname. It also may create confusion if several systems use the same hostname. Therefore, it is advised to change it to a more meaningful name. The hostname itself is arbitrary, meaning you can choose almost any combination of characters, as long as it makes sense to the system administrator. To change the hostname, edit

(chroot) # nano /etc/conf.d/hostname

Look for the line starting with hostname and change the entry between the quotes. Save the file, on the next boot Funtoo will use the new hostname.

   Warning

Do not use special characters in the hostname, as the shell may interpret these, leading to unpredictable results. Use the Latin alphabet: a-z, A-Z, 0-9

   Tip

Use short hostnames (up to 8 or 10 characters) to prevent the terminal screen being filled with the hostname, leaving little space for the command itself. This become particularly poignant when coding long command strings in various programming languages like Bash, Python, SQL and Perl