Difference between revisions of "Freekbox Ethernet Configuration"
(mention ifplugd) |
|||
Line 1: | Line 1: | ||
− | + | Most Freekbox 3 machines are configured with ifplugd, which automatically brings the ethernet interfaces up and down. They are set up by default to use DHCP and so will work without change with most DSL and cable connections or local networks with a router. For static ip's read below. | |
− | + | In a freekbox2 and some early freekbox3s, the ethernet interface is normally not configured. On those older boxes, therefore, some configuration must be done before the box can connect to either a network, or a dsl modem. Most networks require machines to be set up to use DHCP, which automatically assigns IP addresses and other related information, or in some cases one needs to set up a static IP. | |
− | + | To set up the interface in Debian, use your favorite text editor (as root) to edit the file "/etc/network/interfaces", for example: | |
− | + | nano /etc/network/interfaces | |
− | + | ==DHCP== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Most network situations will use a dynamically configured ip address (DHCP). The following lines are needed in /etc/network/interfaces. | |
auto eth0 | auto eth0 | ||
iface eth0 inet dhcp | iface eth0 inet dhcp | ||
− | + | On a freekbox, /etc/network/interfaces should contain the "auto eth0" line as a comment and the dhcp line is already uncommented. simply remove the "#" before auto eth0 and it should be set. | |
− | + | ==static== | |
− | |||
− | + | For static ip configuration, /etc/network/interfaces needs the following lines: | |
− | + | auto eth0 | |
− | + | iface eth0 inet static | |
− | + | address 192.168.0.20 | |
+ | netmask 255.255.255.0 (substituting your own values) | ||
+ | broadcast 255.255.255.255 | ||
+ | gateway 192.168.0.1 | ||
== Static DNS == | == Static DNS == | ||
Line 39: | Line 36: | ||
Most people using DHCP will not need to edit this file, though there are exceptions. | Most people using DHCP will not need to edit this file, though there are exceptions. | ||
+ | |||
+ | ==Bringing up the interface== | ||
+ | |||
+ | THEN one needs to bring up (or take down and then bring up) the eth0 interface with the following commands issued as root | ||
+ | |||
+ | ifdown eth0 | ||
+ | ifup eth0 | ||
+ | |||
+ | OR simply reboot the machine, which will accomplish the same thing, since the "auto eth0" line will cause the interface to be automatically configured at boot. | ||
[[Category:Tech support]] | [[Category:Tech support]] |
Revision as of 17:19, 15 November 2005
Most Freekbox 3 machines are configured with ifplugd, which automatically brings the ethernet interfaces up and down. They are set up by default to use DHCP and so will work without change with most DSL and cable connections or local networks with a router. For static ip's read below.
In a freekbox2 and some early freekbox3s, the ethernet interface is normally not configured. On those older boxes, therefore, some configuration must be done before the box can connect to either a network, or a dsl modem. Most networks require machines to be set up to use DHCP, which automatically assigns IP addresses and other related information, or in some cases one needs to set up a static IP.
To set up the interface in Debian, use your favorite text editor (as root) to edit the file "/etc/network/interfaces", for example:
nano /etc/network/interfaces
DHCP
Most network situations will use a dynamically configured ip address (DHCP). The following lines are needed in /etc/network/interfaces.
auto eth0 iface eth0 inet dhcp
On a freekbox, /etc/network/interfaces should contain the "auto eth0" line as a comment and the dhcp line is already uncommented. simply remove the "#" before auto eth0 and it should be set.
static
For static ip configuration, /etc/network/interfaces needs the following lines:
auto eth0 iface eth0 inet static address 192.168.0.20 netmask 255.255.255.0 (substituting your own values) broadcast 255.255.255.255 gateway 192.168.0.1
Static DNS
DNS information is set in "/etc/resolv.conf". An example of the file is below:
search freegeek.org nameserver 198.107.0.14 nameserver 206.26.36.34
Most people using DHCP will not need to edit this file, though there are exceptions.
Bringing up the interface
THEN one needs to bring up (or take down and then bring up) the eth0 interface with the following commands issued as root
ifdown eth0 ifup eth0
OR simply reboot the machine, which will accomplish the same thing, since the "auto eth0" line will cause the interface to be automatically configured at boot.