Network configuration for Linux

Most howto's on this site are written for Windows.
It is not hard to do it on Linux, just configure the appropriate daemons.
Check your distribution on how to get the daemons.

I assume your network interface is eth0.
IP address for eth0 is assumed to be 192.168.5.5 with netmask 255.255.255.0
IP address for the Dbox is assumed to be 192.168.5.7
Just adapt this to your local network.

Because this question is asked over and over: The Dbox has no fixed IP address!
It gets assigned an IP address via RARP (BR-Kernel) or Bootp/DHCP. Or the GUI sets one later.
MAC Address

Some boxes have a sticker at the back telling its MAC Address.
If not, you have to detect the MAC using tcpdump.
Dbox MAC addresses start with 00:50:9C

hosts

First you need an entry in /etc/hosts
Enter the IP address and desired hostname of the Dbox there. This has to match your network of course.
192.168.5.7 dbox

RARP

Easy on 2.2.X kernels:
rarp -s dbox MAC-ADDRESS-OF-BOX-SEPARATED-BY-COLONS
On 2.4.X kernels you need a separate rarpd.
The latter has to bne started with option -e

The MAC Address of the Dbox goes into /etc/ethers:
MAC-Address-incl-Colons IP-Address
00:50:9c:xx:xx:xx 192.168.5.7

TFTP

You need a tftpd.
Enter the following into /etc/inetd.conf:

tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /dbox2/tftpboot

Where /dbox2/tftpboot has to be adapted to your local settings.

If you use xinetd (e.g. on RedHat 7.0 and later), check the file /etc/xinetd.d/tftp:
service tftp
 {
 disable = no
 socket_type = dgram
wait = yes
 user = nobody
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.tftpd
 server_args = /dbox2/tftpboot
}
 
Note! Restart inetd after making changes to its configuration. Otherwise the changes are not accepted. This is best done by:

kill -HUP `pidof inetd`

or
kill -HUP `pidof xinetd`

DHCP/BOOTP

You need a dhcpd or bootpd
DHCP
You need an entry for the host:

subnet 192.168.5.0 netmask 255.255.255.0 {
}
host dbox {
hardware ethernet 00:50:9c:xx:xx:xx;
fixed-address 192.168.5.7;
allow bootp;
server-name "192.168.5.5";
filename "/dbox2/tftpboot/ppcboot";
}

If you want to use u-boot, this should look like this:

subnet 192.168.5.0 netmask 255.255.255.0 {
}
host dbox {
hardware ethernet 00:50:9c:xx:xx:xx;
fixed-address 192.168.5.7;
if exists vendor-class-identifier {
filename "yadd_kernel_1";
option root-path "/dbox2/yadd_1";
} else {
filename "u-boot";
} }
This is for a dhcpd version V3.0 and later. Older dhcpd do not understand the if-Syntax.

Restart the dhcpd to accept the changes. The easiest way is:

 /etc/init.d/dhcpd restart

Hint: If you want to enable the debug mode, you either have to comment the line with the filename (for the short circuiting method), or enter /minflsh/kernel/os as filename (for the minflsh method)
BOOTP
Instead of a dhcpd, you can also use a bootpd.
You need an entry in /etc/bootptab

dbox:hd=/tftpboot:bf=ppcboot:ha=00509cxxxxxx:ip=192.168.5.7:sa=192.168.5.5:sm=255.255.255.0

hd: directory where the botofile is (relative to the entry in inetd.conf)
bf: The bootfile, ppcboot for Linux or os (from minflsh) for enabling the debug mode.
ha: MAC-Address of Dbox, without colons
ip: The desired IP address for the Dbox
sa: Server Address
sm: Subnet mask

and in /etc/inetd.conf:

bootps dgram udp wait root /usr/sbin/tcpd bootpd -d4 -c /dbox2

NFS



You need an nfsd.
The directory for NFS has to be exported.
This is done in /etc/exports

/dbox2 dbox(rw,no_root_squash)

activate this by
exportfs -a
or do a

/etc/init.d/nfsd restart

Feedback

E-Mail

Further Assistance

If you have problems, consult the forum
or visit the IRC channel #dbox2 using, for example, irc.freenet.de as IRC server.

Copyright

Copyright (c) 2002 by Dietmar Hölscher,  Max Kliche


Home