HOWTO: Create A STATIC IP in Sabayon 3.5
NOTE: Anytime it mentions eth0, you can substitute eth0 for your own network interface. It may be eth1, eth2, whatever. The following is all done with root access.
$ su -
First you have to stop your computer from using DHCP to get an IP automatically. To do this we remove Network Manager, remove KNetworkManager (GUI Front-end), and dhcdbd, then tell the computer not to try to use DHCP.
# rc-update del NetworkManager
# rc-update del dhcdbd
# emerge -C knetworkmanager
# sed -i 's/RC_PLUG_SERVICES=".*"/RC_PLUG_SERVICES=""/' /etc/rc.conf
#reboot
You're now free to set a static IP address. Do the following and follow the instructions on screen:
# net-setup
You'll be asked for your desired IP address and your Gateway (your router's IP address). You can leave the Nameserver space empty, and net-setup will generate a pair of DNS addresses for you.
When finished, edit /etc/conf.d/net
# nano /etc/conf.d/net
It should look something like this after having run net-setup:
# Sabayon Linux static network configuration tool config_eth0="192.168.0.101 broadcast 192.168.0.255 netmask 255.255.255.0" routes_eth0="default via 192.168.0.1"
Add the remaining line:
modules="ifconfig"
Check to see if eth0 (your network card) is still in your init script.
#rc-update show
If net.eth0 does not exist, do the following to fix it by adding a symbolic link.
# cd /etc/init.d
# ln -s net.lo net.eth0
Add net.eth0 to your runlevel
# rc-update add net.eth0 boot
Reboot!
# reboot
Cross your fingers and hope it works!
see /usr/share/doc/openrc/net.example for information on advanced /etc/conf.d/net configuration options