You are not logged in.
On my VPS I always have to issue these commands - through VNC -, to get the network working:
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?
Last edited by anselm (2019-10-10 14:32:33)
Offline
Do you have to use those on top of the standard Arch way of getting online, namely the netctl scripts, or are you rolling your own solution there? You don't seem to be obtaining an IP address via DHCPclient so unless you're using static addressing, I'd assume something's getting the machine basically connected to begin with.
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
Standard way of course.
Offline
Okay, and do you require this to happen without touching, for remote initial connections, or could we leave it to happen only when you log in? The latter could be achieved in your .bashrc or somewhere, but getting it to happen automatically on powerup I think requires you to write a systemd unit file, and thus far my experiments at that have failed so I can't help there.
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
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
Offline
I see. I thought there is a configuration file, eg. in /etc which can be edited for this purpose.
Offline
All the settings for netctl are in /etc/netctl, yes.
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
have a look at upstream's great wiki
Offline