VMware Cloud Community
BTJitsamji
Contributor
Contributor

rc.local

Hi, I'm trying to understand the functions of "rc.local" file and staic routes in an ipstorage setup.

We are using esx software iscsi and netapp storage.

The ESX host will need to connect to different routed subnets to access the iscsi targets which have been setup on different vfilers:

eg dmz vfiler (subnet x) and internal vfiler (subnet y).

we have got the dmz vfiler working by adding the following route:

subnet x:

"route add -net 10.80.200.128 netmask 255.255.255.240 gw 10.80.197.195" >> /etc/rc.local"

So the question is: could we get away with adding another static route for subnet y in the rc.local file?

Considering the vswitch has ony one 2nd service console, I'm not too sure if we need another service console to access subnet y iscsi target.

"Caveat: I'm in a design team and I don't have access to the servers and storage, the build are done by another team. So I'm unable to test this my self."

0 Kudos
3 Replies
jonhutchings
Hot Shot
Hot Shot

I might be missing something but why are you setting up manual static routes rather than setting up the nics with ips on the subnets you need to access?

Anyway assuming you really do want to dd static routes then either add them to rc.local or add them to /etc/sysconfig/network-scripts/routes-

this gets processed by /etc/sysconfig/network-scripts/ifup-routes

I've never actually tried the above method on ESX however it's how it's done on RH 9 and RH Enterprise onwards (though it was a bit flaky on RH9)

0 Kudos
BTJitsamji
Contributor
Contributor

Jon,

the reason for the statics is because we are using one vswitch with various vlans (port groups).

the 2nd service console connects to the iscsi target, and because the vmkernal is on a different tcpip stack, we need a static to get the 2nd service console to connect to the iscsi target.

so the static is there for the 2nd service console to route out the network.

0 Kudos
jonhutchings
Hot Shot
Hot Shot

fair enough - either method should work just fine I think . ifup-routes is called during network init (i.e called /etc/init.d/network )

rc.local runs at the end so you network route will come up later if you use this, this may or may not cause problems if you have services in init.d that expect to talk out (such as reconnecting iscsi volumes contained in /etc/fstab....)