Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.8K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
Add Default Gateway in OVMM

I am setting up a new environment with dedicated networks assigned for management, storage, and VM data. The network is stretched between two sites and in order to reach everything on the network I need to specify a gateway or route for each network but I cannot find where to add that setting into OVMM. If I need to add this info into /etc/sysconfig/ifcfg-* then what entries can I add to set a gateway for each network that will not interfere with OVMM settings.
Answers
-
Hi,
For an example, assume public networks for two machines:
- Network A with a subnet <subnet-ip> and a default route <def-ip> on bond0
- Network B with a subnet <subnet-ip> and a default route <def-ip> on bond1
The default route for the server should be the route from network A but after restarting the server it uses route from network B.
If you manually define defroute=no in ifcfg-bond1 and restart the network all works fine. But after next restart defroute=no has been deleted from ifcfg-bond1 and again you will have an issue with the default rout
Define Gateway in the ifcfg files and create a route file for the interfaces.
Edit /etc/sysconfig/network-scripts/ifcfg-bond*
Add the below line.
GATEWAY= <Gateway-IP>
And also,
Create route file for the bond0 and bond1 under "/etc/sysconfig/network-scripts/" directory.
# vi /etc/sysconfig/network-scripts/route-bond0
Contents could be as below.
default via <gateway-ip> dev <Interface>
Replace the contents of <> with the actual values.
This is persistent to boot.
Regards,
Chandana