0

In my CentOS server, for compliance reason, I cant directly access the file /etc/sysconfig/network-scripts/ifcfg-eth0 but I can use nmcli to configure that file.

My problem is that I need to add this line below to that file:

IPV6ADDR_SECONDARIES="4566:1p44:e000:092b:0000:0000:0000:0000/64 4566:1p44:e000:092b:0000:0000:0000:0001/64"

But I cant find any nmcli command that adds this line to the file. Should I stop looking or is there a command?

1 Answer 1

0

You can make it work like this (I had to make some fake addresses for that purpose):

nmcli con mod enp0s3 ipv6.method manual ipv6.addresses "4566:1244:e000:092b:0000:0000:0000:0000/64"
nmcli con mod enp0s3 +ipv6.addresses "4566:1244:e000:092b:0000:0000:0000:1/64"
nmcli con show enp0s3 | grep ipv6.addresses
ipv6.addresses:                         4566:1244:e000:92b::/64, 4566:1244:e000:92b::1/64

You can also use nmtui which is easier but useless when you automate things. I've tested it on RHEL 9.3 where these config files are deprecated entirely and I had no way of editing, but I think it should work for you.

1
  • 1
    WORKED PERFETCTLY! THANK YOU!
    – Samul
    Commented Jan 27 at 19:26

You must log in to answer this question.

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