2 Replies Latest reply on Dec 8, 2017 8:00 AM by elihuj

    Static Routes on VCSA 6.5

    elihuj Enthusiast

      Our vCenter is multi-homed to allow connectivity to our backup network. Prior to upgrading to 6.0, we had a static route in the /etc/sysconfig/network/ifroute-eth1 file. This allowed communication to work correctly. Here's what I get by default on 6.5:

       

      Kernel IP routing table

      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

      0.0.0.0         10.9.40.1       0.0.0.0         UG    0      0        0 eth1

      0.0.0.0         10.9.24.1       0.0.0.0         UG    0      0        0 eth0

      10.9.24.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0

      10.9.40.0       0.0.0.0         255.255.248.0   U     0      0        0 eth1

       

      If I manually edit the routes to my liking, this is how they look:

       

      Kernel IP routing table

      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

      default         gateway         0.0.0.0         UG    0      0        0 eth0

      10.9.24.0       *               255.255.255.0   U     0      0        0 eth0

      10.9.32.0       10.9.40.1       255.255.224.0   UG    0      0        0 eth1

       

      While this works, it is not persistent. Any ideas on how I can make the routes persist on reboot?

        • 1. Re: Static Routes on VCSA 6.5
          deepak88 Lurker

          vi /etc/sysconfig/network/ifroute-eth0

           

          now add entry in the below format

           

          <TargetNetwork> <GatewayAddress> <Netmask> <Interface>

           

          Similarly for eth1 also do the same.

           

          vi /etc/sysconfig/network/ifroute-eth1

           

          In your case

           

          (eg)

           

          10.9.32.0 10.9.40.1 255.255.224.0 eth1

           

          Once done restart networkd

           

          systemctl restart systemd-networkd

           

          ip route show

          • 2. Re: Static Routes on VCSA 6.5
            elihuj Enthusiast

            Thank you for the reply deepak88. In my 6.0 vCenter, this is exactly how I configured my routes. In my 6.5 vCenter, there is no ifroute-eth* file. Here's the contents of that directory:

             

            root@vm-vcenter04 [ /etc/sysconfig/network ]# ls

            if-up.d  routes  scripts