You are not logged in.

#1 2021-01-21 23:17:50

PhantomNomad
Member
Registered: 2020-06-30
Posts: 2

Problem with multiple network adapters

I've got Arch setup and working with one network adapter using systemd-networkd since I'm using it as a server for the most part.  I have 4 network adapters in the machine and out like to setup a second with another static IP on the same subnet.  I created a new .network file and set the match name to the second network.  It only has an address line in the [network] area.  When I restart systemd-networkd only the first adapter comes up.  Here are the files:

20-wired.network
[Match]
Name=eno1

[Network]
Address=192.168.32.10/21
Gateway=192.168.33.1
DNS=192.168.32.2

21-wired.network
[Match]
Name=eno2

[Network]
Address=192.168.32.5/21

What am I doing wrong?
Thanks.

Offline

#2 2021-01-22 19:47:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Problem with multiple network adapters

It only has an address line in the [network] area

https://wiki.archlinux.org/index.php/Network_configuration#Static_IP_address wrote:

To manually configure a static IP address, add an IP address as described in #IP addresses, set up your routing table and configure your DNS servers.

Try adding gateway & dns addresses for each interface with  a static ip-address.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-01-23 10:24:16

Koatao
Member
Registered: 2018-08-30
Posts: 92

Re: Problem with multiple network adapters

Lone_Wolf wrote:

It only has an address line in the [network] area

Try adding gateway & dns addresses for each interface with  a static ip-address.

systemd-networkd can set a static IP address to interface and bring it up without gateway. Like you can do it with iproute2 anyway. It is not related to bringing up an interface.

@PhantomNomad, does eno2 has a carrier?

you can have a bit more information with networkctl command:

networkctl status
networkctl status eno2

What if you manually configure and bring up eno2?

ip a add 192.168.32.5/21 dev eno2
ip link set eno2 up

Offline

Board footer

Powered by FluxBB