You are not logged in.

#1 2024-03-23 17:13:55

quoin
Member
Registered: 2021-02-08
Posts: 15

[SOLVED] ip addr does not show static IPv4 address

I'm trying to configure a static IP on a network interface, something I've done many times in the past.

Having configured an `/etc/systemd/network/25-firewall.network` (see below), I expected `ip addr` to show the IPv4 address I configured there.  Instead I see no IPv4 address in the output of that command.

I've been running `systemd-networkd` for some time (including when I last configured a static IP on this network interface; not sure what I'm doing different now).

$ ip a
...
3: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether <snip MAC address> brd ff:ff:ff:ff:ff:ff
    inet6 fe80::<snip rest of IPv6 address>/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever
...

$ ip link
...
3: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether <snip MAC address> brd ff:ff:ff:ff:ff:ff
...

$ cat /etc/systemd/network/25-firewall.network
[Match]
Name=enp4s0

[Network]
Address=192.168.60.2/24
Gateway=192.168.60.1

`/etc/systemd/networkd.conf` seems to be untouched from its default state: just section headings with all options below them commented out.

When I `systemctl restart systemd-networkd` journalctl has this to say:
host systemd-networkd[707]: enp4s0: Reconfiguring with /etc/systemd/network/25-firewall.network.

`ip link set enp4s0 up` has no obvious effect.

I don't expect there to be a carrier and I don't need to DHCP: I first want to verify that I've configured static networking before I attempt to ssh to the old device I want to try and make work again (an old mini PC type box in a somewhat unknown state).

Last edited by quoin (2024-03-24 16:03:33)

Offline

#2 2024-03-23 21:40:22

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: [SOLVED] ip addr does not show static IPv4 address

Offline

Board footer

Powered by FluxBB