(16) Networking

This simple set up will suit most people, most of the time, it does the bare minimum using DHCP to get an IP address off your Router. If you have a different set up, such as dial up modem, you will have to read the Gentoo Handbook. I prefer Fixed IP myself, but most people seem to want DHCP.

Edit the hostname to what ever you want. You can always change this at a latter date. I choose genoot as my hostname


(chroot) raspberrypi / #   nano -w /etc/conf.d/hostname

#Set to the hostname of this machine
hostname="genoot"

So far we have been using the Raspbian Networking, we need to install some Gentoo Networking. So the next job is to re-install Gentoo Network Interface Management Scripts to reflect the minor edits.


(chroot) raspberrypi / #   emerge net-misc/netifrc

Next we want to create a new config file, for the networking and tell it to use DHCP to automaticaly obtain an IP address like so (copy paste):


(chroot) raspberrypi / #   nano /etc/conf.d/net

# Set the dns_domain_lo variable to the selected domain name
dns_domain_lo="homenetwork"
config_eth0="dhcp"

Now we can link the network card and set networking to start at boot by default


(chroot) raspberrypi / #   cd /etc/init.d
(chroot) raspberrypi init.d #   ln -s net.lo net.eth0
(chroot) raspberrypi init.d #   rc-update add net.eth0 default
 * service net.eth0 added to runlevel default
(chroot) raspberrypi init.d #   cd /
(chroot) raspberrypi / #

We need to install DHCP and make sure it always starts when the system boots


(chroot) raspberrypi / #   emerge --ask net-misc/dhcpcd
(chroot) raspberrypi / #   rc-update add dhcpcd default
 * service dhcpcd added to runlevel default

LAN local networking can be defined by editing /etc/hosts, this is entirely optional. I have a small LAN and it just makes my life a lot easier. It is only a plain text file, and its rather simple. For example I added 192.168.1.254 router which stops me from having to remember the IP, I can just type http://router in my browser.


(chroot) raspberrypi / #   nano -w /etc/hosts

Next : Set Root Password and add a User Account

PREVIOUS INDEX NEXT