Networking FAQ

I was wondering if anyone has setup stargate to have a static IP address for its wired ethernet. If so, what changes are involved in doing so?

In /etc/init.d/networking disable

pump -I eth0

and add

ifconfig eth0 <IPADDR> netmask <WHAT YOU WANT> broadcast <WHAT YOU WANT>
route add default gw <GATEWAY IP> eth0

If you don't disable the pump command, the dhcp client is still running and it will renew its lease every 5 minutes. So if you don't want to modify /etc/init.d/networking and just want to use "ifconfig" in command line, you will have to kill the process running pump. Just type "pkill -TERM pump".

The command "route add ..." is used to set up the gateway, if you want to reach computers outside your sub-network, that is defined by the netmask. Forget this if you only connect your Stargate to one computer, using a cross-over cable, since there is no external network.

What was the problem with pump, exactly?

The hack basically makes pump a script that does some stuff and then calls dhcp with some options. I'm not exactly sure how pump itself is different than dhcp, but this seems to work…

There is doubtless some cleanup that could be done here.

Resolving hostnames? That's a great clue. I removed resolv.conf on a system that resolved hostnames. When I rebooted, it created a new one. I just need to figure out what created the new one.

resolv.conf is created dynamically by dhcpcd/pump…

The problem was that I had moved the S05mountall.sh script to ps since it included ps specific stuff like openconfig.

The needed script, which is similar to that in the Stayton release, points /var and /tmp at the ram file system and creates a number of subdirectories in /var. One of the directories (/var/run) is necessary for pump to run.

All is better now.

 

I want to make a stargate ssh into another machine without having to type in the password. I know how to use ssh-keygen in general and have successfully done that between two ordinary linux machines. The thing about stargate is that its /root/ is read-only so I can not modify and add .ssh directory in /root/. So when I run ssh-keygen, it finds no keys in .ssh because that directory can't be created in the read-only /root/. But ssh still looks for the authorized keys in that /root/.ssh directory. I can think of two ways to get around this. One is if we can somehow remount /root/ under rewrite directory like /home/ and make it rewritable. The other one is just change the configuration of ssh to simply look for the authorized keys somewhere else. Does anyone know how to do these?

Why is your /root/ director RO? On mine, it's read-write and have successfully generated keys.. Why don't you just chmod your /root directory if it's RO?

 

If you cannot make the /root dir r-w for some reason, of the top of my head (w/o trying to see if it works) you could try the following:

  1. Change the $HOME variable to a writable directory. You'll cheat ssh-keygen into thinking that that new directory is your home directory and it'll generate the keys there.
  2. use the -i option with ssh to indicate explicitly the location of the identity file.

Do I need to config ssh or something before using scp? I tried to scp some files to stargate and got connection timed out. Ping works in both ways. Here is the interface status:

    ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr FF:FF:FF:5F:DB:AF
              inet addr:192.168.0.169  Bcast:192.168.0.255
    Mask:255.255.255.0
              UP BROADCAST RUNNING  MTU:1500  Metric:1
              RX packets:343 errors:0 dropped:8 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:8 txqueuelen:100
              RX bytes:64170 (62.6 Kb)  TX bytes:0 (0.0 b)
              Interrupt:25

Any suggestion will be highly appreciated.

if using csh or tcsh:
setenv HOME /tmp/whatever

if using sh or bash:
export HOME=/tmp/whatever

echo $HOME to check the values.

 

You need to have a valid Hwaddr -- I don't know why, but something about the FF:FF:... Addresses does not seem to work. Try something like "10:00:00:01:02:03"... This value is set in different places on different systems -- I would guess that it's set in your bootldr. Yes -- ping still works, but for some reason higher-level protocols need it to be set better.

We realized that the problem was an incompatibility between the scp on Stargate and the scp on our workstations. So, we installed OpenSSH on our workstations, and its scp works fine.

Useful networking tools

This is a bit off topic, but I wanted to mentioned a set of tools that I'm finding very helpful in my work with Stargate networking: the Knoppix security tools distro. Knoppix is a linux distro on a CD; you just boot up the CD and you have yourself a nice, functional linux box. Some white-hat security types have customized Knoppix with all sorts of security tools, including the kismet 802 sniffer, ethereal, tcpdump, etc. They've even patched the Orinoco drivers for you - It All Just Works (tm). It's very handy to carry around a XP laptop and a CD (and a CF card or pen drive for persistent storage), rather than having to deal with two laptops.

I see from the mailing list discussion that Bluetooth sniffing tools are in the offing, but they're not in the initial .1 version. And Knoppix doesn't have USB 2.0 support yet. :^( Minicom's also missing, but if I get a chance I will try to build a customized version with it.

http://www.knoppix-std.org