- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
[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:
[Route]
Gateway=192.168.10.1
Destination=10.0.0.0/8
[Route]
Gateway=192.168.10.1
Destination=172.19.35.0/24
I then ran:
# ifdown eth1
# ifup eth1
Now, run either "ip route", or "netstat -rn" to check the results.
Hope that helps!!