You are not logged in.

#1 2018-10-13 08:13:34

COLDFUSION
Member
From: Bikini Bottom
Registered: 2009-12-02
Posts: 32

problem with systemd-networkd

Hello there. I've just installed and configured a copy of Arch Linux on my VPS. It has an static IP address of "xx.44.46.240" and connects through a gateway at "xx.24.11.254". As it's said in https://wiki.archlinux.org/index.php/Systemd-networkd I created a .network file containing:

[Match]
Name=ens192

[Network]
Address=xx.44.46.240/32
Gateway=xx.24.11.254
DNS=8.8.8.8

then I enabled and restarted the "systemd-networkd" service, but when I tried to ping a public IP afterwards "Network unreachable" was shown. Here it's the output of "# systemctl status systemd-networkd":

ens192: Gained carrier
ens192: Could not set route: network is unreachable

I did some search on forums online and I found this solution to get the connectivity temporarily:

# ip route add xx.24.11.254/32 dev ens192
# ip route add 0.0.0.0/0 via xx.24.11.254

So what's wrong with the service configs? How could I get it fixed?

Last edited by COLDFUSION (2018-10-13 08:57:24)


So close no matter how far

Offline

#2 2018-10-13 08:38:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: problem with systemd-networkd

Typo in the Gateway.

Offline

#3 2018-10-13 09:00:52

COLDFUSION
Member
From: Bikini Bottom
Registered: 2009-12-02
Posts: 32

Re: problem with systemd-networkd

The file is good It's just here in the post (I mistakenly deleted the dot when I was replacing part A with xx).


So close no matter how far

Offline

#4 2018-10-13 15:08:23

gjaltemba
Member
Registered: 2017-12-29
Posts: 26

Re: problem with systemd-networkd

COLDFUSION wrote:

The file is good It's just here in the post (I mistakenly deleted the dot when I was replacing part A with xx).

Configure static routes

Specify static routes in a systemd network unit's [Route] section. In this example, we create a unit file, 10-static.network, and define in it a static route to the 172.16.0.0/24 subnet:
10-static.network

[Route]
Gateway=192.168.122.1
Destination=172.16.0.0/24

Offline

#5 2018-10-13 15:20:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: problem with systemd-networkd

So bad censoring. I guess we can't trust anything posted. Good luck.

Offline

Board footer

Powered by FluxBB