now add entry in the below format
<TargetNetwork> <GatewayAddress> <Netmask> <Interface>
Similarly for eth1 also do the same.
In your case
10.9.32.0 10.9.40.1 255.255.224.0 eth1
Once done restart networkd
systemctl restart systemd-networkd
ip route show
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
It took me a minute, but I figured out how this should be done. I have a VCSA that is multihomed to three networks.
Anyway, let's say you multiple routes that need to route through eth1 (obviously, pick the NIC where the gateway exists you need to push routes through)...
- Edit the file /etc/systemd/network/10-eth1.network (or whatever the file is on yours that controls the settings for eth1).
- Then add the following lines for each route:
Gateway=<default gateway for the route>
Destination=<destination of the route>
- Restart the interface to enable the new routes:
Example, I had two networks that needed to route through a gateway reachable on eth1:
At the bottom of /etc/systemd/network/10-eth1.network, I added:
I then ran:
# ifdown eth1
# ifup eth1
Now, run either "ip route", or "netstat -rn" to check the results.
Hope that helps!!