Configuring an ad hoc network on suse

Since I don’t own a gigabit router but I do have Gbit NICs on my laptop and main computer, I set up a peer to peer network for optimal performance when I have to transfer a large volume. I don’t do that often so I end up losing time every time. So I decided to write a small blog post about it. 🙂 My concrete setup is transfering between a windows and linux machine.

In windows, when the network adapter is configured for DHCP but it can’t find a DHCP server, it automatically falls back to link-local addressing. On IPv4, this is the 169.254.0.0/16 block. (Apparently, Microsoft likes to calls this APIPA.)
However, on my opensuse 11.1 box, it seems not automatically configured for that. When you open Yast -> Network Settings, edit the network interface and enable “zeroconf” under “dynamic address”.
Yast network zeroconfig configuration
All easy peasy and intuitive.

But now comes the catch! After applying these settings, it works… but stops working after a few secs/mins! I checked the messages log and found out the dhcp client tries to restore the old lease if it doesn’t receive an offer. This causes the zeroconf address to be invalidated. So, before enabling Zeroconf, be sure to release the lease first. You can do this as follows:

sudo dhclient -r

Possibly if you keep the DHCP+Zeroconf setting in yast, you can just release the lease when you want to setup a local network and it would fallback to zeroconf. Didn’t verify it though (had to go online to document this ;))

One thought on “Configuring an ad hoc network on suse”

  1. In Windows you can set a static ‘alternative’ ip adres (instead of the 169.254.0.x one). When DHCP doesn’t provide an IP than windows takes that IP (and subnetmask etc.)

    Maybe you can also do that on suse somehow?

Leave a Reply to Klaas Cancel reply

Your email address will not be published. Required fields are marked *