Standard way of course.
What do you mean by that? Have you created and enabled some netctl profile? Have you configured some other network manager (systemd-networkd, ...)?
I suggest taking a look at netctl (either static or dhcp - depending on what you prefer). When either of that does not work, come back here with some log entries or other more specific problems :-)
In case you really just want to issue those two commands on startup, then have a look at systemd.service (man page) to run these commands on boot.
regards,
deep42thought
ifconfig ens3 xx.xxx.xx.xxx/23
ip r a default via XX.XXX.XX.X
The small x-es are for the IP address of the VPS, the capital X-es are for the router IP address, as far as I know, because the second command likely translates to its full form as:
ip route address default via xx.xxx.xx.x
After issuing these two commands I am able to connect to the VPS with SSH too, besides VNC, and networking is usable, then I am able to use ping, curl, wget, etc.
But after I restart the machine, these settings are always lost.
What config file should I edit, or which services should I start (DHCP ?) to make these settings permanent?