Jimmy's weblog

4/27/2005

Nipl.net: the Free Community project

Filed under: — jimmy @ 12:02 pm

Today I joined the Free Community Project. They offer free web services, like webhosting, ssh accounts, revision-control repositories and so on. Check out their homepage and get more information about the project.

4/24/2005

Linzer Linuxtage 05

Filed under: — jimmy @ 1:48 pm

RAID5 Talk

Last week I was giving a talk about software RAID under Linux at Linzer Linuxtage. I’ve been there for three days, unfortunately I missed the first day of the event. A lot of interesting talks and the event was well organised. I have to be there next year, too :-)
There was also an assurer of CA-CERT who gave a talk and provided information during the breaks. So finally I got my free server certificate :-)

Here are some pictures of the event:
Gallery of “Linzer Linuxtage 2005″

4/15/2005

Automatic network setup

Filed under: — jimmy @ 9:52 pm

You know the problem… Whenever you connect to a new network you have to configure your notebook. This is really annoying, especially when working in different networks daily. There are a lot of methods to solve this problem, but I was always too lazy to find out which is the best. “Why can’t I do this with system tools”, I always asked myself. Well, I can do it with system tools, reading manpages is sometimes helpful ;-)
Package ifupdown has a feature called mapping, which allows to have something like profiles (man interfaces). Thus we can define different network setups:

auto eth0
mapping eth0
        script /etc/network/ping-places.sh
        map 192.168.0.90/24 192.168.0.42 home
        map 192.168.0.90/24 192.168.0.100 sevian7
#
# Profile sevian7
#
iface sevian7 inet dhcp
        up cp /etc/resolv.conf.sevian7 /etc/resolv.conf
        up cp /etc/apt/sources.list.sevian7 /etc/apt/sources.list
#
# Profile home
#
iface home inet static
        address 192.168.0.90
        netmask 255.255.255.0
        gateway 192.168.0.1
        up cp /etc/resolv.conf.annenhof /etc/resolv.conf

We could know start such a profile with the following command

ifup -v eth0=home

This is only useful for testing because ifup can automatically detect your wanted profile. How does this work?
The shell script /etc/network/ping-places.sh fires up eth0 with IP address 192.168.0.90. It then tries to ping 192.168.0.42 and if this ping is answered ifup starts the profile home. If the ping fails fails the next mapping is read and we now ping 192.168.0.100.
I’m using this scheme for about six months now with about ten different profiles by pinging the gateways or other computers in the networks. It works pretty cool, except in networks where I ping the gateways, which most times have the same IP address 192.168.0.1. That’s why I sometimes have to ping other workstations, which might be offline. A good solution would be using arping instead of ping, but I was too lazy again for that :-)
BTW: ping-places.sh is located in /usr/share/doc/ifupdown/examples (at least on Debian)