Set DHCP causes macOS to display that the network is not connected

The computer is connected to a wired network. I want to update the DHCP information.

I use this command:

ipconfig set en6 DHCP

which indeed triggers the DHCP update, but causes the network preference to show that the network is not connected, but in fact the network is normal.

But when I use the ifconfig command, I find that the IP is normal, and the network is normal, I can access the page on the browser.

I had to switch the IP allocation method on the GUI to recover.

Set DHCP causes macOS to display that the network is not connected
 
 
Q