NetworkManager

NetworkManager is a utility to auto configure wireless and wired networks with the capability to switch between wireless and wired automatically, selecting an optimum configuration. It also allows you to configure your usb modem or share an internet connection over wifi easily. NetworkManager is divided into a core and a UI so it doesn't matter which desktop environment or window manager you are using. Many applications can connect to NetworkManager over dbus to gather information about the network status. For example can disconnect / reconnect according to the status of the connection.

Installation
Possible USE flags for NetworkManager are:
 * - Enables IPv4LL support (automatic network configuration).
 * - Enables support for Bluetooth.
 * - Enables support for internet connection sharing with and.
 * - Use dhclient from for DHCP.
 * - Use for DHCP.
 * - Install documentation.
 * - Enables support for TLS and SSL using.
 * - Enables support for Network Security Service.
 * - Enable support for mobile broadband and PPPoE connections using.
 * - Use for managing DNS information.

Set the USE flags you need and emerge networkmanager:

After the installation you can start networkmanager with:

To make sure that it is started every time you boot your system add it to your default runlevel:

Regardless of whether your wireless device needs it; networkmanager needs CONFIG_CFG80211_WEXT (wireless extensions) to be enabled in the kernel configuration.

Configuration
You will also need to block OpenRC from attempting to automatically initialize your network interfaces. This can be done by modifying : /etc/rc.conf

Ignore Devices
If you have some network devices which you want to configure by yourself (For example mobile phones which connect over a USB network interface) NetworkManager can ignore these devices. Just add the MAC Adresses of the devices you want to ignore to your configuration file NetworkManager.conf

Connection Sharing
To enable this feature of NetworkManager you have to set the connection-sharing USE flag. This feature enables a quick and dirty way to share a network connection for example an internet connection over UMTS. It is not recommended to use this feature in your real router. In the following example PC-A is in connection with PC-B over eth0 and PC-A wants to share the internet connection from an UMTS modem. Right click on the NetworkManager icon in the tray area -> Edit connections. Now select the network interface that is connected to the other host (eth0) Select IPv4 Settings -> Method: Shared to other computers. Now PC-B will get an ip adress from DHCP and you are done.

Hidden SSID
By default NM cannot connect to wireless networks with the SSID hidden and the 'Available to all users' setting enabled. The way this works is that NM caches the BSSID of the known APs when you first manually connect to the network. However that is stored in the .gconf directory in $HOME which isnt used if 'Available to all users' is enabled.

You can manually add the BSSIDs to the global config though.
 * cd to '/etc/NetworkManager/system-connections'
 * edit the file for the network you wish to configure
 * go to the 802-11-wireless section
 * add "seen-bssids=00:00:00:00:00:00;11:11:11:11:11:11;", using your BSSIDs here
 * save the file

You can get your BSSID by running 'nm-tool' or 'iwconfig'. Each needs to be terminated by a semicolon in the config.

User Interface
You can choose different user interfaces for NetworkManager. A QT and GTK GUI and also a CLI is available.

GTK
The GTK Application is running in the system tray area and is called. The ebuild pulls in the by default. If you have a desktop environment that is not Gnome or XFCE you will have to install  to satisfy the application depencies.

If you have Gnome or XFCE running it should work with emerging nm-applet

To start the applet you will need a WM or a panel or some other application which can handle system tray applications. Start the applet with

An icon should appear immediately in your system tray area.

You may also need to do:

Or you may need to run

before starting nm-applet.

KDE
The KDE NetworkManager widget is. Add it to your panel.

CLI
The Command Line Interface is marked as unstable in the portage tree. You will have to unmask it before installation

NetworkManager