IP v6 on RHEL5

Monday, November 22, 2010 |


Yes..! We are running short in V4 IP addresses. Here explains a way to configure ipv6 on your RHEL box.

1. Operating System Version should be RHEL 5 or higher

[bbaby@blackbox ~]$ more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
[bbaby@basilvm ~]$ uname -r
2.6.18-164.11.1.el5
[bbaby@blackbox ~]$

(kernel subversion (3rd field) must be 15 or higher)

2. Confirm IPv6 is running

modprobe will check whether ipv6 module is loaded to kernel or not. FATAL error is expected.

[root@blackbox ~]# modprobe --dry-run --first-time ipv6
FATAL: Module ipv6 already in kernel.
[root@blackbox ~]#

Make sure that interface is enabled with ipv6

[root@blackbox ~]# cat /proc/net/if_inet6
00000000000000000000000000000001 01 80 10 80 lo
fe8000000000000002163efffe528f78 03 40 20 80 eth0

[root@blackbox ~]# grep NETWORKING_IPV6 /etc/sysconfig/network
NETWORKING_IPV6=yes
[root@blackbox ~]#


2a. Check interfaces

# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:16:3E:52:8F:78
inet addr:192.168.200.206 Bcast:192.168.200.255 Mask:255.255.255.0 inet6 addr: Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14363 errors:0 dropped:0 overruns:0 frame:0
TX packets:1302 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21384433 (20.3 MiB) TX bytes:118347 (115.5 KiB)
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


In this example, there is only one physical interface, eth0. In Red Hat Linux, there will be a file /etc/sysconfig/networking-scripts/ifcfg- for each interface. This file will have directives that control the interface configuration:

3. Determine the IPv6 subnet address based on the router advertisement


The router advertisement on this segment is 2001:558:ff40::. This information will be used to compose the static IPv6 address. The algorithm to create an IPv6 address from an IPv4 address is simple (in my network). Take the currently assigned IPv4 address for the device in question and make them the last four entries of the IPv6 address.

# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BROADCAST=192.168.200.255
HWADDR=00:16:3E:52:8F:78
IPADDR=192.168.200.206
NETMASK=255.255.255.0
NETWORK=192.168.200.0
ONBOOT=yes

3. Determine the IPv6 subnet address based on the router advertisement


# netstat -A inet6 -rn





The router advertisement on this segment is 2001:558:ff40::. This information will be used to compose the static IPv6 address. The  algorithm used here to create an IPv6 address from an IPv4 address is simple. Take the currently assigned IPv4 address for the device in question and make them the last four entries of the IPv6 address.

If there is no IPv6 router advertisement on the segment, there is no way to guarantee what the specific subnet will be. The global IPv6 address prefix for my network  is 2001:558. The next two groups of the IPv6 address are the subnet prefix and are completely dependent on the router configuration. If this command reveals no IPv6 router advertisement, there is no mechanized way to create the IPv6 address.

 

4. Confirm the IPv4 address of the interface that will have a static IPv6 address
 
From the output in step 2, the IPv4 address of eth0 is 192.168.200.206

5. Construct the basic IPv6 address from the router advertisement and the IPv4 address

 
A full static IPv6 address is now created by putting the global address, subnet, and IPv4 address together. Our guideline for creating an IPv6 address from an IPv4 address is very mechanical. Recall that an IPv6 address consists of eight groups of four hexidecimal digits. The eight groups are populated from left to right as follows. The first two groups of four are the  global IPv6 address (2001:0558). The next two groups of four digits are created from the router advertisement determined in section 3. The final four groups of four digits are populated directly from the IPv4 address as straight numbers.
 

Please note that there is no direct binary or decimal or hexidecimal translation involved in this population. Each one of the four IPv4 address numbers becomes one of the final four groups of the IPv6 address in decending order. In this example, the IPv4 address of 192.168.200.206 transposes into the full IPv6 address of:2001:558:ff40::192:168:200:206
The subnet length should always be a /64, so the full IPv6 address becomes: 2001:558:ff40::192:168:200:206/64


This will become the static IPv6 address assigned to the chosen interface. See RFC4291 for full details on IPv6 address formats. One might note that the IPv4 address numbers are decimal representations of hexidecimal digits and that the IPv6 address numbers are actual hexidecimal digits.

6. Assign the IPv6 address to the chosen interface.


The static IPv6 information needs to be added to the file ifcfg-. The address composed in step 5 must be added as "IPV6ADDR=". Further, the directive "IPV6INIT=yes" must be added to the file to ensure the This may be manually edited or executed from the command line:

echo 'IPV6ADDR=2001:558:FF40::192:168:200:206/64'  >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo 'IPV6INIT=yes' >> /etc/sysconfig/network-scripts/ifcfg-eth0


6.a. Confirm the contents of the ifcfg- file

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 

BROADCAST=192.168.200.255
HWADDR=00:16:3E:52:8F:78
IPADDR=192.168.200.206
NETMASK=255.255.255.0
NETWORK=192.168.200.0
ONBOOT=yes
IPV6ADDR=2001:558:FF40::192:168:200:206/64
IPV6INIT=yes


7. Bringing up the static IPv6 address without rebooting

 
Since Red Hat should already have IPv6 services running, adding the static IPv6 interface without rebooting is straightforward

# ifconfig eth0 inet6 add 2001:558:FF40::192:168:200:206/64
# ifconfig eth0 eth0
Link encap:Ethernet HWaddr 00:16:3E:52:8F:78
inet addr:192.168.200.206 Bcast:192.168.200.255 Mask:255.255.255.0 inet6 addr: 2001:558:ff40:0:192:168:200:206/64 Scope:Global inet6 addr: fe80::216:3eff:fe52:8f78/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:827 errors:0 dropped:0 overruns:0 frame:0 TX packets:677 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:86866 (84.8 KiB) TX bytes:92325 (90.1 KiB)


8. Confirmation of IPv6 connectivity

 
A simple IPv6 ping test of a valid IPv6 address will confirm whether IPv6 is working; e.g.

# ping6 -c 1 2001:558:ff40::192:168:200:200 

PING 2001:558:ff40::192:168:200:200(2001:558:ff40:0:192:168:200:200) 56 data bytes 64 bytes from 2001:558:ff40:0:192:168:200:200: icmp_seq=0 ttl=255 time=0.614 ms
--- 2001:558:ff40::192:168:200:200 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.614/0.614/0.614/0.000 ms, pipe 2







Image Courtesy           : http://isoc.org/wp/ietfjournal/?p=151
ipv6 training courtesy         : Tom Creighton  

hpacucli Error - Another instance of ACU is already running

Wednesday, October 6, 2010 |

Error Message

[root@blackbox locks]# hpacucli
HP Array Configuration Utility CLI 8.28-13.0
Detecting Controllers...
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.
[root@blackbox locks]#
[root@blackbox ~]# ps -aef | grep acu
root 8714 8363 0 14:09 pts/0 00:00:00 grep acu
[root@blackbox ~]#
[root@blackbox ~]# ps -aef | grep hp
root 8762 8363 0 14:09 pts/0 00:00:00 grep hp
[root@blackbox ~]#


I was not able to find any other instance of the program on the process table.

Solution

1. Try to remove the lock file


[root@blackbox bbaby]# rm -f /opt/compaq/cpqacuxe/bld/locks/CPQACU_MUTEX
[root@blackbox bbaby]#



In my case this was not resolving problem. I was getting the same error message even after removing lock.

2. Do an strace and find what is blocking

[root@blackbox bbaby]# strace -f /opt/compaq/hpacucli/bld/hpacucli
execve("/opt/compaq/hpacucli/bld/hpacucli", ["/opt/compaq/hpacucli/bld/hpacucl"], [/* 19 vars */]) = 0
brk(0)
---snipped---
[pid 9629] times({tms_utime=4294967301, tms_stime=30064771073, tms_cutime=731361531114068436, tms_cstime=601725772861025720}) = 970423195
[pid 9629] time(NULL) = 1286376261
[pid 9629] time(NULL) = 1286376261
[pid 9629] stat64("/opt/compaq/cpqacuxe/bld/locks/CPQACU_MUTEX", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 9629] semget(0x1000e, 1, IPC_CREAT|0) = 7798791
[pid 9629] semop(7798791, 0x861f7c4, 2) = -1 EAGAIN (Resource temporarily unavailable)
[pid 9629] geteuid32() = 0
[pid 9629] rt_sigaction(SIGHUP, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGINT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGQUIT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGSEGV, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGABRT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGFPE, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGPIPE, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGALRM, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGTERM, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR1, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR2, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR2, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {0x1000000008094054, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] write(1, "Detecting Controllers...\n", 25Detecting Controllers...
) = 25
[pid 9629] write(1, "\n", 1
) = 1
[pid 9629] write(1, "Error: Another instance of ACU i"..., 160Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
) = 160
[pid 9629] write(1, " exit.\n", 13 exit.
) = 13
[pid 9629] write(1, "\n", 1
) = 1
[pid 9629] fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
[pid 9629] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0xff942f40) = 0xfffffffff7cc8000
[pid 9629] read(0,
Process 9621 resumed
Process 9629 detached
[root@blackbox bbaby]#



In this case need to delete the semaphore *7798791*

3. Delete the blocking semaphore


{terminal}
[root@blackbox bbaby]# /usr/bin/ipcrm -s 7798791
[root@blackbox bbaby]#
{terminal}

4. Verify whether it still exits or not


[root@blackbox bbaby]# /usr/bin/ipcs -a

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0052e2c1 1081344 postgres 600 11083776 2

------ Semaphore Arrays --------
key semid owner perms nsems
0x0052e2c1 7569408 postgres 600 17
0x0052e2c2 7602177 postgres 600 17
0x0052e2c3 7634946 postgres 600 17
0x0052e2c4 7667715 postgres 600 17
0x0052e2c5 7700484 postgres 600 17
0x0052e2c6 7733253 postgres 600 17
0x0052e2c7 7766022 postgres 600 17
0x0001000e 7864327 root 0 1
0xffffffff 7831560 root 0 1

------ Message Queues --------
key msqid owner perms used-bytes messages

[root@blackbox bbaby]#



Check the hpacucli status


[root@blackbox bbaby]# hpacucli
HP Array Configuration Utility CLI 8.28-13.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> exit
[root@blackbox bbaby]#

Nagios check_mailq pluggin failing

Thursday, September 23, 2010 |

Problem:

I was trying to add mail Queue monitoring for sendmail mta with the default check_mailq plugin. check_mailq was queried using nrpe which was demonized under xinetd. Even after the basic configuration, nrpe started crying about some access related problem (nrpe checks were called by nagios user)

[root@blackbox libexec]# ./check_nrpe -H localhost -c mailq
CRITICAL: Error code 78 returned from /usr/bin/mailq
[root@blackbox libexec]#

Solution:

1. Checked nrpe.cfg and verified that the configuration is correct --> Positive

[root@blackbox libexec]# grep mailq /usr/local/nagios/etc/nrpe.cfg
command[mailq]=/usr/local/nagios/libexec/check_mailq -M sendmail -w 40 -c 50
[root@blackbox libexec]#

2. Added sudo privileges for nagios user to run /usr/bin/mailq without password

[root@blackbox libexec]# grep mailq /etc/sudoers
nagios BLACKBOX_HOSTS = (root) NOPASSWD: /usr/bin/mailq
[root@blackbox libexec]#

3. Added the missing /usr/bin/sudo command on check_mailq script from nagios pluggins package. PATH_TO_MAILQ is called from utils.pm module

[root@blackbox libexec]# grep sudo /usr/local/nagios/libexec/check_mailq
if (! open (MAILQ, "/usr/bin/sudo $utils::PATH_TO_MAILQ | " ) ) {
[root@blackbox libexec]#

Yayy!! Its working..

[root@blackbox libexec]# ./check_nrpe -H localhost -c mailq
OK: mailq is empty|unsent=0;40;50;0
[root@blackbox libexec]#

Perl time manipulation

Friday, April 16, 2010 |



Its always a challenge for any system guy to maintain application/system performance metrics for analysis and capacity planning. Harvesting the data and plotting requires lot of time related calculations. Since I am a part time programmer, cannot blabber more on perl or python's data extraction/manipulation capabilities.
Today I came across couple of modules which made my life easy while manipulating time related data using a Perl script.

i.   Date::Manip

This is a smart module which can be helpful in converting the time and date.  RPM package of this module is available from RedHat, CentOS repos.

[bbaby@basilvm ~]$ rpm -qa | grep -i manip
perl-DateManip-5.44-1.2.1
[bbaby@basilvm ~]$


Example :
 ## Get current time 
$current_time = localtime;   

 ## Take the difference between time value passed and current time
 $time_diff = DateCalc($time_value, $current_time);
##  Time difference in minutes (%s for seconds)
 $time_min = Delta_Format($time_diff, 0,'%mh');    

 Big chunk of Date::Manip examples are available here

ii.  Time::HiRes
 High resolution alarm, sleep, gettimeofday, interval timers (Examples available here )

DHCRELAY Linux

Monday, April 12, 2010 |

I am sure that many people will not get into the situation were I was in today.  The problem was simple but the fix was not under my control or reach. Had to find a work around to meet the project deadline.

Scenario:

I had to do OS installation of bunch of  brand new servers on a new VLAN.  All servers were connected under a A10 load balancer which was not supporting ip-helper (ie; I was  unable to contact the DHCP servers from the network to do a PXE boot for OS installation). On contacting A10 Load balancer team, they confirmed that their current version is not supporting ip-helper.  As the servers were on remote location, I cannot do a CD based installation and even if I get a hands and eyes support, its going to take long.  My goal was to install RHEL 5.4 from remote corporate satellite server.

Solution:

1. I had DRAC (Dell Remote Access Consoles) on all these servers. I have installed a base OS image by mounting an operating iso image through DRAC (virtual disk).  Then assigned an IP address, subnetmask, gateway on the the newly installed dummy server.
2.  Installed dhcp server rpm "dhcp-3.0.5-21.el5.x86_64.rpm" on the box. It provides dhcrelay service which can be configured as a proxy to route dhcp traffic from local network to remote DHCP server.

Then start the dhcrelay by below command: (yes you are good to go)
/usr/sbin/dhcrelay -i eth0 ip-remote-dhcp-server

 (man dhcrelay will show you full options of this command)

3. The above setting can be made permanent by adding the interface and DHCP server IP on /etc/sysconfig/dhcrelay

INTERFACES="eth0"
DHCPSERVERS="ip-of-remote-dhcp-server"

4. Start the service using

/etc/init.d/dhcrelay start


5. Make sure that the relay service is running on the host by a ps command
ps ax | grep dhcrelay

6. Rebooted the servers need to imaged from DRAC.  Press F12 to get into the PXE boot mode. Server got IP address by proxying through the DHCP relay server.

How it works:

- When the server to be installed boot up it sends a DHCP request as broadcast on the network
11:48:55.809189 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx (oui Unknown), length: 300
- DHCP relay server running on the same network accept this broadcast
- DHCP relay server requests DHCP server on remote network for an IP address
11:48:55.809286 relay-server-IP.bootps > DHCP-IP.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx (oui Unknown), length: 300 

- DHCP relay server did a small trick while requesting the IP by putting mac address as the MAC address of the server to be installed.
11:48:55.809286 relay-servr-IP .bootps > dhcp-server-ip.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx (oui Unknown), length: 300

xx:xx:xx:xx:xx:xx  - MAC of server to be installed

- Rest will be like a normal DHCP request and new server will get IP lease from DHCP server.