This page will have notes on how to program and use a Linux-programmed NSLU2.
The Default IP Address
The standard NSLU2 software uses a fixed IP address for the NSLU2 (which can be changed, of course, usually later after installation). That address is
Technically, this (like all the 192.168.*.* type of address) is an illegal Internet IP number -- which is exactly why this type of address is used in all private networks, behind firewalls (see NAT if you want to know the full story).
Using the Default IP Address
There are two main ideas to communicate, via an Ethernet cable, with the NSLU2:
- Use a switch, or hub: you connect your PC to a switch, and also connect the NSLU2 to the same switch. Advantages of this are:
- You can use standard Ethernet cables;
- Additional PCs, even a gateway or modem can also be attached to the same switch, which would give you Internet access.
Use an Ethernet crossover cable. Such a cable can go directly from the PC to the NSLU2. Disadvantage: you either have to buy a special crossover cable or make one yourself.
In class, we might use a crossover cable; in the lab we can use the switch.
Problem: the network in the lab is 192.168.42.xx where xx is the number of the lab machine. BUT, the NSLU2 does not fit this pattern. OK, so here is what you need to do.
- Suppose you are working on a particular machine, say palma.
On palma, first become root (the command su - will do that for you).
Then, enter the command
ifconfig eth0:1 192.168.1.12
Now, enter the command
and you will see the table of what palma's system has for its IP numbers, attached network(s), and gateway. What's happened is that the "device" called eth0 now serves as an attachment to two networks, 192.168.42.* and 192.168.1.*, and actually palma has two IP numbers, one for each network. After you do this, you should be able to ping the NSLU2 -- if it is attached and running:
Which OS version for the NSLU2?
We'll use SlugOS/BE to program the NSLU2. Instructions on how to install binaries are here; the first step is to download and compile upslug2, a program rewrites the flash memory of the NSLU2 with a new kernel and file system.
Install and After
The Feb9Notes page will have some information on how to install SlugOS/BE on the NSLU2. A general description is here, including instructions on how to attach storage and install packages. These instructions assume that you have connectivity from Linux to the NSLU2 (so you can ssh to the NSLU2), and also that the NSLU2 has connectivity to the Internet, so that it can fetch packages. Some of these instructions are out of date for the latest version of SlugOS.