[ Bloke.com || Linux || JavaScript || Java || Volleyball || Link Me ]
Free: [ Guestbook || MessageBot || Plugins || Counter || AusPrices || Advertise ]

Home - Linux - General

Setting the hostname
It kinda annoys me that "hostname abc" doesn't work. Anyway, just change /etc/sysconfig/network. Mine looks like
and reboot (you can probably do: /etc/rc.d/init.d/network restart ; hostname tyson, but I didn't really check it that much).

Setting the ip address
Without "netconf". But before that, easier just to install linuxconf, and then as root run "netconf" (make sure you do "su -", to get the path to this program).

Anyway, go ahead and edit /etc/sysconfig/network-scripts/ifcfg-eth0. Mine looks something like:

You might also see BROADCAST, and NETWORK in there, this are basically the first and last ip address in your subnet (which can be worked out from your NETMASK, but beyond the scope here).

If you want to change your GATEWAY, it's in /etc/sysconfig/network.

You should check ifcfg-eth1 if you have a second network card. Once all looks good:

[root@logan /]# /etc/rc.d/init.d/network restart
The restart is very important, especially if you are doing this remotely (which I don't recommend).

Reducing DHCP client setting timeout
When I have my laptop connected at a clients location or somewhere else where I use DHCP, I find it quiet annoying when I'm at the airport and I reboot my laptop since the boot hangs at starting the eth0 interface. This is because it is looking on the network for a DHCP server which of course doesn't exist. The timeout by default is 60 seconds. There are probably better solutions, but mine was to modify ifup so that the timeout is 10 seconds.

Here is the patch (see the -t 10 that is added):

[root@tiger network-scripts]# diff -u ifup.old ifup
--- ifup.old	Sat Nov 16 11:39:17 2002
+++ ifup	Sat Nov 16 11:30:51 2002
@@ -161,7 +161,7 @@
     #if [ -x /sbin/dhcpcd ] && /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then
-    if [ -x /sbin/dhcpcd ] && /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then
+    if [ -x /sbin/dhcpcd ] && /sbin/dhcpcd -t 10 ${DHCPCDARGS} ${DEVICE} ; then 	echo $" done."
     elif [ -z "`pidof -x dhcpcd`" ] && [ -x /sbin/pump ] && /sbin/pump ${PUMPARGS} -i ${DEVICE}; then
 	echo $" done."
[root@tiger network-scripts]#


Last Change: Monday, 10-Jan-2005 07:42:21 EST


The information provided within these pages is provided AS IS, and without any warranty. Following these directions may (but not limited to) crash your computer, delete all the information on your hard disk, open up security holes or cause your house to burn down. I made these pages to provide some information about the setup that I have done, but I did not proofread it for correctness, and in most cases did not test it. There are commands in these pages that would definately delete or corrupt all the data on your computer (especially the dualboot section). In fact it happened to me.... So you are on your own!

Cameron Gregory