0

For long time try to setup my external IP address on centos7,rocky on with "Networkmanager" but its working only with systemd-networkd.

Found some solution and use systemd-networkd but now after update to rocky 9.2 i cant use systemd-networkd anymore.

[Match]
#this is just works
Name=eth1

[Network]
Gateway=XXX.XXX.XXX.XXX
Address=XXX.XXX.XXX.XXX/29
DNS=8.8.4.4

is now 2023 and i am not able still make static external IP to work

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:03:6f:26 brd ff:ff:ff:ff:ff:ff
    inet XXX.XXX.XXX.XXX/32 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever

enter image description here

  • if use /32 is not add brodcast but in diffrent distro like debian is show brd with no issue and its work

  • when use /29 its show correct br but still is not working

  • use command ip addr add XX.XX.XX.222/29 br XX.XX.XX.223 dev eth1 or ip addr add XXX.XXX.XXX.222/32 br XXX.XXX.XXX.222 dev eth1 still fail

  • on windows its working, debian,centors with systemd-networking is working so its just a redhat crap networkmanager

2
  • What is not working? Why do you expect it to work?
    – vidarlo
    Commented Aug 22, 2023 at 10:32
  • @vidarlo necause systemd-networkd was working with no issue
    – user956584
    Commented Aug 22, 2023 at 14:06

1 Answer 1

1

Your XXX.XXX.XXX.223 is the broadcast address, you cannot use this as IP-address for your machine. (as shown in your screenshot from nmtui).

Use XXX.XXX.XXX.222/29 as address and it should work fine.

If for some reasons not.. try editing the network-script file manually:

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
DNS1=8.8.8.8
DNS2=8.8.4.4
NETMASK=255.255.255.248
IPADDR=XXX.XXX.XXX.222
GATEWAY=XXX.XXX.XXX.217

restart the netwerk services systemctl restart network (or reboot the whole machine systemctl reboot).

Hope this helps.

4
  • that correct: Gateway: XX.201.XX.217 Netmask: 255.255.255.248 Broadcast: XX.201.XXX.223 but (Redhat) rockylinux 9.2 remove systemd-network and that suck because now can't use it and have to use networkmanage that never works for me on any Os like debian,centos,ubuntu,rocky
    – user956584
    Commented Aug 23, 2023 at 9:31
  • allright, I've never used the systemd-network, as explained earlier, you can set the config in the /etc/sysconfig/network-scripts/ folder which works fine. in any other case, I suggest to read the rocky9 manual.
    – Mark
    Commented Aug 24, 2023 at 14:15
  • dnf install systemd-networkd might do the trick for you. FYI Network-Manager exists since RHEL6, it will follow-up the older ifcfg in the next RHEL releases, as Network-Manager is more flexible. It might be the default in the next Ubuntu too, combined with netplan.
    – Mark
    Commented Aug 24, 2023 at 14:48
  • my bad i was try do yum install systemd-networkd and dnf install systemd-networkd just work for me thx -- also instrall dnf install systemd-resolved do like on this urtoial and its working addictivetips.com/ubuntu-linux-tips/set-up-systemd-networkd
    – user956584
    Commented Aug 25, 2023 at 5:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .