Thanks,
The first thing is to test whether that connects the VM to "the internet".
The "2.3.4.5 dev eth0" is a
static route. The "2.3.4.5" is more specific destination than
the "default", so it should match "first" even when the default route is added "prior".
Alas, the ip commands affect only currently running session.
There are multiple ways to store the config so that it is applied on every boot.
The default on EL (starting with EL7) is to configure network with NetworkManager.service (NM).
- nmcli con mod eth0 ipv4.routes 2.3.4.5 might add the static route "the NM way"
- If one installs package NetworkManager-dispatcher-routing-rules, then NM will read initscripts-format files.
Then file /etc/sysconfig/network-scripts/route-eth0 with content:
2.3.4.5 dev eth0
should create the static route on service start.
If one does revert to
network.service, then the same
initscripts-format file should work.
Note: the "eth0" for nmcli is name of connection. The "eth0" for 'ip' and initscripts is name of interface.