cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to add a global route to cluster configuration

ronbarak
Level 2

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.

2 REPLIES 2

Gene_Henriksen
Level 6
Accredited Certified
The Bundled Agents Reference Guide has this:
Assignment of a base IP address to a device is followed by a route add command with the options specified for this attribute. RouteOptions are applicable only when configuring the local host as the default gateway.

Perhaps this is the problem.

ronbarak
Level 2

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:

  1. The format for the hares -modify RouteOptions command above is not according to Veritas manuals (which didn’t work for me, probably because of what you wrote in your message).
  2. I defined the route to be glbal, meaning it is active on all CVS nodes.