04-17-2007 04:30 AM
Hi Guys,
I'm trying to add a global route to cluster configuration. I added the following RouteOptions to my Linux VCS main.cf:
MultiNICA EdnMNIC (
Device @ronbgmc1a = { eth2 = "10.107.68.24", eth3 = "10.107.68.25" }
Device @ronbgmc1b = { eth2 = "10.107.68.26", eth3 = "10.107.68.27" }
NetMask = "255.255.255.0"
RouteOptions = "-host 10.107.3.223 eth2"
PingOptimize = 0
NetworkHosts = { "10.107.68.1" }
)
Using the following commands:
[root@ronbgmc1b root]# hastop -all -force
[root@ronbgmc1b root]# pushd /etc/VRTSvcs/conf/config/
/etc/VRTSvcs/conf/config ~
[root@ronbgmc1b config]# vi main.cf
[root@ronbgmc1b config]# hacf -generate .
[root@ronbgmc1b config]# grep Route ./main.cf
RouteOptions = "-host 10.107.3.223 eth2"
[root@ronbgmc1b config]# hastart
However, the new route is not added to the routing table:
[root@ronbgmc1b config]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 10.107.68.1 0.0.0.0 UG 0 0 0 eth2
[root@ronbgmc1b config]#
Can anyone suggest the correct procedure of adding a route to VCS ?
Thanks,
Ron.
04-17-2007 05:26 AM
04-17-2007 07:21 AM
Hi Gene,
Thanks for the prompt answer.
“Digging” further, I managed to deduce that one can add a route to a host using the following command (below is the full session showing that the route was indeed added):
hares -modify EdnMNIC RouteOptions "1.2.3.4"
Bye,
Ron.
The procedure to add the route to main.cf (assuming IP address is 1.2.3.4):
[root@ronbgmc1b config]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 10.107.68.1 0.0.0.0 UG 0 0 0 eth2
[root@ronbgmc1b config]# pushd /etc/VRTSvcs/conf/config
[root@ronbgmc1b config]# haconf -makerw
[root@ronbgmc1b config]# hares -modify EdnMNIC RouteOptions "1.2.3.4"
[root@ronbgmc1b config]# hares -modify EdnMNIC Enabled 1
[root@ronbgmc1b config]# haconf -dump -makero
[root@ronbgmc1b config]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 10.107.68.1 0.0.0.0 UG 0 0 0 eth2
[root@ronbgmc1b config]# pwd
/etc/VRTSvcs/conf/config
[root@ronbgmc1b config]# grep RouteOptions ./main.cf
RouteOptions = "1.2.3.4"
[root@ronbgmc1b config]# hastop -all -force
[root@ronbgmc1b config]# hastatus
attempting to connect....not available; will retry
[root@ronbgmc1b config]# hastart
[root@ronbgmc1b config]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
1.2.3.4 0.0.0.0 255.255.255.255 UH 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 10.107.68.1 0.0.0.0 UG 0 0 0 eth2
[root@ronbgmc1b config]# popd
[root@ronbgmc1b config]#
[root@ronbgmc1a root]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
1.2.3.4 0.0.0.0 255.255.255.255 UH 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.107.68.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 10.107.68.1 0.0.0.0 UG 0 0 0 eth2
Notes: