Configuring the network interfaces on Gentoo

On Gentoo the main portion of the network configuration will be done inside the configuration file /etc/conf.d/net.

For example, to configure the IP address and netmask for the eth0 interface you should add the following line to the /etc/conf.d/net file:

config_eth0 {"192.168.0.1 netmask 255.255.255.0"}

config_eth0=( "192.168.0.1 netmask 255.255.255.0" ) (27/09/2010)

 

this line will set the IP address = 192.168.0.1 and the netmask = 255.255.255.0

  • to view all network devices you can issue the following command:

# ls /dev/init.d/net*

# ls /etc/init.d/net*

  • if your device is not listed you shall procede as follows:
  • make a link to net.lo

# ln -s /etc/init.d/net.lo /etc/init.d/net.<your device name>

  • Bring up the interface

# /etc/init.d/net.<your device name> start

  • If you want the interface to be brought up on boot, use the rc-update command issuing the following command:

# rc-update add net.<your device name> default.

To change the IP address and netmask of the interface go to the first few lines of this article.


gg1

Posted by at April 30, 2010
Filed in category: Bash Tip & Tricks, linux, sysadmin, UNIX TLC, xAppSoftware News, and tagged with: , ,

One Response to Configuring the network interfaces on Gentoo

  1. Pingback: Links 1/5/2010: Fedora Kiosk Spin, Many New Sugar-based XOs | Techrights

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <font color="" face="" size=""> <span style="">

Statistical data collected by Statpress SEOlution (blogcraft).