Persistent static routes
Hi,
I have a problem configuring my network on the RHEV (3.0 beta) hypervisors. For our storage network I need to add a route which should survive reboots.
Normally one would place a route-<devicename> file in /etc/sysconfig/network-scripts and be done with it, however this does not seems to survive reboots on RHEVH machines.
What would be the preferred method of doing this?
Responses
Have you run `persist /etc/sysconfig/network-scripts/route-<devicename>` after creating the file?
Technically, RHEV-H is a liveCD image deployed to the local drive. the root FS is in read-only state, and in order to be able to change configs, you need to update the config file and run `persist./path/to/file`
I don't think thisis documented anywhere besides KB articles, because normally, there should be no reason to actually do anything in the RHEV-H command shell, everything should be done from the admin GUI
>Can adding a static route be done using the admin GUI?
Not currently, we normally let the kernel handle routing, according to the interface IP. Besides, you can use VLANs, that provides far better isolation, though it's not applicable for every use case of course. If you really require static routing, the only way currently is to do it manually. However, if this is such a critical feature, please file an RFE for this capability through a support case.
>Also, can you duplicate network configuration between hosts?
You cannot duplicate network configs because there is no guarrantee that every host will have the same set of NICs. RHEV operates in terms of "Logical Network", which on the hosts is turned into a virtual switch (a bridge interface that rides on a physical NIC or a bond and into which VMs plug in). On one host a logical network can be using a bond, on another a simple NIC, it's all flexible.
If you have a similar set of machines, you could use the RHEV-M API to automate setting the same network on all of the hosts of course. Instructions are in the API guide
If you decide to bring an interface up (ethx) or a logical network (bridge) with an ip address configuration for storage network, then initscripts will configure routing for it automatically. Is it possible for you to give output of "ifconfig", "route -n" and the static route that you want to add so that we can understand why you had to add it manually?
You can avoid the requirement for static routing if you do either of the below, if possible.
1 - Place your NFS server on 172.30.15.17/255.255.240.0 network.
Or
2 - Configure "nfs" bridge using an IP from 192.168.225.0/255.255.255.0 after putting it in the same vlan or network.
If none of the above is possible, you need to go the route of static network as explained earlier and do "persist" it.