Friday, November 6, 2009

Setting up a DHCP server

assuming the Network you want to add a DHCP server to is the network

your router IP Address is

Your ISP's DNS servers IP Address is

the leases that you want to give out are to

first install the DHCP server software.

yum install dhcp.i386

once installed

edit /etc/dhcpd.conf (if it doesn't exist create it)

vi /etc/dhcpd.conf

add in the following lines

ddns-update-style interim;
ignore client-updates;

subnet netmask {


default-lease-time 21600;
max-lease-time 43200;
option routers;
option ip-forwarding off;
option domain-name-servers;
option broadcast-address;
option subnet-mask;

save the file :wq

next, configure the dhcpd service to start at start up

chkconfig dhcpd on

to make sure it is running either reboot or type
/etc/init.d/dhcpd start

that's it , your done. Your DHCP server will give out IP addresses to any clients that connect to your network.
there are many other options that you can add to your DHCP server, like reserving an IP address for a specific mac-address etc

to see all of these option just check out the man pages of dhcpd
man dhcpd

Thursday, November 5, 2009

Source .bashrc when you connect over SSH

If your .bashrc file is not being sourced when you connect to your system over SSH and it only gets sourced when you open up a terminal locally on the system.

you may need to add the following to your etc/profile file

if [ -e ~/.bashrc ]; then
. ~/.bashrc

Tuesday, November 3, 2009

VMWare boot from CD

VMWare can be very frustrating when you try and boot a VM from a CD .

The VM’s BIOS is set to boot from disk first, so you need to change the boot device order. The problem is that the boot process is so fast that you never have enough time to hit the F2 key and enter the bios setup to change the boot order of your VM.
A solution to the problem is to edit the .vmx file in your VM's directory and simply add the following line.

bios.bootDelay = “boot delay in milliseconds”

for example if you want to give yourself 20 seconds add the following line
bios.bootDelay = “20000”

save the file and then restart your Virtual machine.
You will now have enough time to enter into the VM's console and hit the F2 key so that you can edit the boot order in the Bios.