2

I have a server with two network interfaces. I have configured them as follows in /etc/systemd/network folder:

File: 90-eth1.network

 [Match]
 Name=eth1

[Network] Address=192.168.1.28/24 Gateway=192.168.1.7 DNS=8.8.8.8 DNS=8.8.4.4

File: 91-eno1.network

 [Match]
 Name=eno1

[Network] Address=192.168.1.30/24 Gateway=192.168.1.7 DNS=8.8.8.8 DNS=8.8.4.4

I ran systemctl restart systemd-networkd. Running systemctl status systemd-networkd displays the following:

 ● systemd-networkd.service - Network Configuration
      Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
      Active: active (running) since Sat 2022-09-24 15:09:00 UTC; 45s ago
 TriggeredBy: ● systemd-networkd.socket
        Docs: man:systemd-networkd.service(8)
    Main PID: 1398 (systemd-network)
      Status: "Processing requests..."
       Tasks: 1 (limit: 18499)
      Memory: 1.4M
         CPU: 34ms
      CGroup: /system.slice/systemd-networkd.service
              └─1398 /lib/systemd/systemd-networkd

Sep 24 15:09:00 elxn4 systemd[1]: Starting Network Configuration... Sep 24 15:09:00 elxn4 systemd-networkd[1398]: eth1: Link UP Sep 24 15:09:00 elxn4 systemd-networkd[1398]: eno1: Link UP Sep 24 15:09:00 elxn4 systemd-networkd[1398]: eno1: Gained carrier Sep 24 15:09:00 elxn4 systemd-networkd[1398]: lo: Link UP Sep 24 15:09:00 elxn4 systemd-networkd[1398]: lo: Gained carrier Sep 24 15:09:00 elxn4 systemd-networkd[1398]: eth1: Gained IPv6LL Sep 24 15:09:00 elxn4 systemd-networkd[1398]: eno1: Gained IPv6LL Sep 24 15:09:00 elxn4 systemd-networkd[1398]: Enumeration completed Sep 24 15:09:00 elxn4 systemd[1]: Started Network Configuration.

Running ip addr ls displays:

 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 scope host lo
        valid_lft forever preferred_lft forever
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
     link/ether 00:1e:67:d6:2d:c0 brd ff:ff:ff:ff:ff:ff
     altname enp2s0
     inet6 fe80::21e:67ff:fed6:2dc0/64 scope link
        valid_lft forever preferred_lft forever
 3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
     link/ether 00:1e:67:d6:2d:c1 brd ff:ff:ff:ff:ff:ff
     altname enp3s0
     inet6 fe80::21e:67ff:fed6:2dc1/64 scope link
        valid_lft forever preferred_lft forever

One of the interface is not connected to the switch so it shows no carrier, as expected. My problem is that I am unable to assign static IP address with the above configuration. I was able to assign a static ip manually by running "ip addr add 192.168.1.30 dev eno1" and then ping to another device on the same network so I know that there is no hardware issue with cabling, port, switch, etc.

This is a fresh Linux install. I have installed earlier with same approach and IP address was assigned. I must be missing some step this time.

Sunny
  • 389

0 Answers0