Forum Stats

  • 3,733,314 Users
  • 2,246,743 Discussions
  • 7,856,658 Comments

Discussions

Add Default Gateway in OVMM

User_TCQ1L
User_TCQ1L Member Posts: 2
edited July 2020 in Oracle VM

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

  • commenter-Oracle
    commenter-Oracle Member Posts: 15 Employee
    edited July 2020

    Hi,

    For an example, assume public networks for two machines:

    1. Network A with a subnet <subnet-ip> and a default route <def-ip> on bond0
    2. 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

Sign In or Register to comment.