Hostname/Gateway/Zeroconf

/etc/sysconfig/network:

This file can be edited to set the host name, like this, if all else fails:

     HOSTNAME=host-name

Note that you can also set the name or IP address of a gateway machine that is to forward all packets whose address is unknown. That is, if you don't set the address elsewhere, using the "route" or "ip" command. If you want to set gateway address, do it like this:

     GATEWAY=192.168.2.1

It is also possible to use this same parameter in one of the "ifcfg.ethx" files or the "/etc/network/interfaces" file, if you'd rather.

Finally, if you happen to check your routing tables, you may see a route to 169.254.0.0/16 or "link-local". Huh? Where'd that come from? Well, its a new feature that attempts to automatically discover and configure networked machines and devices, without you ever having set up the network.

Basically, the network startup scripts automatically add a default route to this bogus address so there will always be something in the routing table, even if you forget to configure things properly. The idea was to make all networks work the way Appletalk or NETBIOS did, in that all connected devices would be automagically discovered and connected (and, you wondered what AVAHI did, didn't you). Sweet! Stevie J. finally gets his revenge.

Unfortunately, all this does is make your network stop working while at the same time opening it up to all sorts of attacks. What a concept! You'll probably want to get rid of it and you can do so by adding a parameter to the network file in sysconfig:

/etc/sysconfig/network:

     NOZEROCONF=yes

You'll also want to get rid of the AVAHI daemon itself, since it will otherwise be trying to insinuate itself into all sorts of operations where it doesn't belong. Unfortunately, the smartest people in the world have decided that more than 50 other packages depend on AVAHI. Ripping it out with the package manager or yum will also remove a whole host of useful packages.

Luckily, the easiest way to disable AVAHI is just to not start the daemon. You can do this with these commands:

     su
     /sbin/chkconfig avahi-daemon off

AVAHI will still be installed but it will never run so it shouldn't be a problem.