nmcli

Colin Law clanlaw at gmail.com
Fri Aug 12 20:39:43 UTC 2022


On Fri, 12 Aug 2022 at 19:37, Jerry Geis <jerry.geis at gmail.com> wrote:
>
> When I use nmcli to set a system for DHCP I use this
>
> nmcli connection modify "$NETWORK_MANAGER_NAME" ipv4.method auto ipv6.method ignore autoconnect yes
>
> When I set for static I use this:
> nmcli connection modify "$NETWORK_MANAGER_NAME" ipv4.method manual ipv6.method ignore autoconnect yes ipv4.addr \
>                         $IPADDRESS/$SUBNET_MASK gw4 $GATEWAY ipv4.dns $DNS
>
> My issue is when I set DHCP it works, when I set static it works, when I change BACK to DHCP the static address remains in the Wired Connection 1 file for network manager. The method is set to auto - but the static and DNS are still in there and messing things up .
>
> What is the correct command or correct option to clear that stuff out ???

If you pull the cable out for 10 seconds and put it back does it sort it out?

Colin




More information about the ubuntu-users mailing list