User:NeddySeagoon/netifrc

Overview
Netifrc is the default network setup methodology provided with Gentoo in the stage3 tarball, so its available in every install. Netifrc and its optional dependencies can do anything a network admin needs to do with a network. This page describes haw to bring up networking using netifrc on a fairly simple system behind a typical domestic router.

Only IPv4 is described here. IPv6 works too.

Users needing the advanced features of netifrc should read /usr/share/doc/netifrc- /net.example.bz2 which is a fully commented example netifrc configuration file.

The Network 'Stack'
In Linux, networking, like so many other things, is arranged like the layers of a cake, the cake is called a stack. When a system is put together the admin chooses the layers in the cake to suit the use case at hand. This makes it easy to add new things as the interfaces between the layers is fixed.

In the cake analogy netifrc is the icing that makes the cake useful. The other layers are all essential but will ned be described here.

ip link - does the interface exist
Before netifrc can work, all the other layers of the cake need to be in place, so a few checks are in order ip link 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 00:e0:4c:69:15:09 brd ff:ff:ff:ff:ff:ff 3: sit0@NONE:  mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 must show your real network interface.

Here three interfaces are listed. lo, eth0 and sit0.

lo, the loopback interface, is not a real interface. eth0 is a real wired interface. sit0 is an IPv6 over IPv4 tunnel endpoint and is not a real interface.

This page will use eth0 as an interface name. Substitute the name of your interface.

Review dmesg
Some network interfaces can appear in the ip link output but still not be working, because they need firmware to be loaded. This is more likely to happen with WiFi than wired interfaces. dmesg | less Check for firmware loading errors associated with network interfaces and fix them before proceeding. The example below is for the Intel iwlwifi WiFi driver. [   1.434197] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-2030-6.ucode failed with error -2 [   1.435521] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-2030-6.ucode' failed. [   1.444479] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-2030-5.ucode failed with error -2 [   1.512125] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-2030-5.ucode' failed. [   1.512127] iwlwifi 0000:02:00.0: no suitable firmware found! In this state it will not work.