Difference between revisions of "Freekbox Ethernet Configuration"

From FreekiWiki
Jump to navigation Jump to search
(text copied from RTFM)
 
(removing extra space)
Line 1: Line 1:
 
In a freekbox2, the ethernet interface is normally not configured. This 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.
 
In a freekbox2, the ethernet interface is normally not configured. This 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"
 
To set up the interface in Debian, use your favorite text editor (as root) to edit the file "/etc/network/interfaces"
 
 
  
 
#(vi,pico,nano,emacs, etc...) /etc/network/interfaces
 
#(vi,pico,nano,emacs, etc...) /etc/network/interfaces
 
 
  
 
For static ip configuration, the file needs the following lines:
 
For static ip configuration, the file needs the following lines:
 
 
  
 
auto eth0
 
auto eth0
iface eth0 inet static
+
iface eth0 inet static
 
 
 
  
 
address 192.168.0.20
 
address 192.168.0.20
netmask 255.255.255.0 (substituting your own values)
+
netmask 255.255.255.0 (substituting your own values)
broadcast 255.255.255.255
+
broadcast 255.255.255.255
gateway 192.168.0.1
+
gateway 192.168.0.1
 
 
 
  
 
OR for dhcp (if dhcp server enabled on dsl modem)
 
OR for dhcp (if dhcp server enabled on dsl modem)
 
 
  
 
auto eth0
 
auto eth0
iface eth0 inet dhcp
+
iface eth0 inet dhcp
 
 
 
  
 
THEN one needs to bring up (or take daown and then bring up) the eth0 interface with the following commands issued as root
 
THEN one needs to bring up (or take daown and then bring up) the eth0 interface with the following commands issued as root
 
 
  
 
ifdown eth0
 
ifdown eth0
ifup 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.
 
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.
 
 
  
 
On a freekbox, /etc/network/interfaces should contain the "auto eth0" line as a comment. simply remove the "#" before it and it should be set.
 
On a freekbox, /etc/network/interfaces should contain the "auto eth0" line as a comment. simply remove the "#" before it and it should be set.
 
 
  
 
The file also includes commented out examples for static ip address
 
The file also includes commented out examples for static ip address
 
  configuration..
 
  configuration..
 
 
  
 
Thanks to Jeremy and Vagrant
 
Thanks to Jeremy and Vagrant

Revision as of 15:44, 15 October 2004

In a freekbox2, the ethernet interface is normally not configured. This 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"

  1. (vi,pico,nano,emacs, etc...) /etc/network/interfaces

For static ip configuration, the file 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

OR for dhcp (if dhcp server enabled on dsl modem)

auto eth0 iface eth0 inet dhcp

THEN one needs to bring up (or take daown 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.

On a freekbox, /etc/network/interfaces should contain the "auto eth0" line as a comment. simply remove the "#" before it and it should be set.

The file also includes commented out examples for static ip address

configuration..

Thanks to Jeremy and Vagrant