For some reason, customer need to use virtual ip as the source address for outband instead of base ip on VCS envroiment.
Under Linux platform, you can use the comand "ip route" to change route table so that outbound packets use the virtual ip as the the source address.
Follow is example:
#ifconfig -a
.................
eth1 Link encap:Ethernet HWaddr 1C:C1:DE:77:EA:3C
inet addr:10.4.1.13 Bcast:10.4.1.255 Mask:255.255.255.0 <==========base ip
inet6 addr: fe80::1ec1:deff:fe77:ea3c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32190 errors:0 dropped:0 overruns:0 frame:0
TX packets:32167 errors:4 dropped:0 overruns:0 carrier:4
collisions:0 txqueuelen:1000
RX bytes:3063872 (2.9 Mb) TX bytes:2237822 (2.1 Mb)
Interrupt:40 Memory:fa000000-fa7fffff
eth1:0 Link encap:Ethernet HWaddr 1C:C1:DE:77:EA:3C
inet addr:10.4.1.18 Bcast:10.4.1.255 Mask:255.255.255.0 <========virtual ip
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:40 Memory:fa000000-fa7fffff
# ip route
...............
10.4.1.0/24 dev eth1 proto kernel scope link src 10.4.1.13
............
At the time, all outbound packets of network segment 10.4.1.0/24 will use the base ip as the source address.
we can use command "ip route" to change:
ip route change 10.4.1.0/24 dev eth1 src 10.4.1.18
#ip route
.....
10.4.1.0/24 dev eth1 scope link src 10.4.1.18
.......
From tcpdump tools, I can find the source address of outbound packets is 10.4.1.18 .
later, you can add it to postonline trigger:
$group = $ARGV[1];
if ($group eq " test") {
system(" ip route change 10.4.1.0/24 dev eth1 src 10.4.1.18 ");
}