Monday 14 March 2011

Dynamic vs Static Network Configuration

A guest researcher today called us, because his laptop with Fedora Core 4 didn’t get any working IP address. That problem was solved quite quickly: The “Internet Connection Wizard” didn’t allow him to choose a dynamic configuration via DHCP. It was greyed out and the static configuration was one for a private 192.168.* network.
I quickly found out, that “Network Device Control” allowed us to switch to DHCP. After deleting /etc/resolv.conf, it also got the right DNS servers.
But whatever I restarted, it didn’t set a default route although it did get one by DHCP and had it documented in its lease file.
After about one and a half hour of debugging configurations and network configuration scripts I found out, that if the environment variable $GATEWAY is set, it ignores the one given by DHCP. Then I grepped for GATEWAY in the config file. But I just found the default gateway configured for the old, now greyed out static IP configuration.
Although I told myself “No, it can’t be!” I commented out the default gateway of the now unused static configuration. And yes, I wasn’t mistrustful enough about Fedora: It worked. You really have to change parts of the not selected static IP configuration to make the selected dynamic one to work.
Thanks, Fedora! *bangingtheheadontothetable*

No comments:

Post a Comment