How to add an additional temporary IP to the connection that currently provides internet via nmcli?
0
votes
0
answers
451
views
I need to add a specific IP to the interface that actively provides the internet connection, like so:
network_dev=$(nmcli --get-values DEVICE connection show --active | grep w)
sudo ip a add 192.168.250.9/24 dev $network_dev
This address assignment should be temporary and should not be applied between nmcli c up/down id "My connection"
Is there a way to perform this operation directly through nmcli
?
Asked by ceremcem
(2451 rep)
Dec 27, 2022, 06:48 PM