1

I've got an Ubuntu 14.04 guest installed in virtualbox. Often when the host machine changes networks or is suspended and restarted, the guest VM loses network connectivity. I can reliably get it back by using the network manager GUI applet (the one with the up and down arrows that lives in the corner of the taskbar) and just doing a "disconnect" on that interface followed by clicking on the name of the interface to reconnect.

enter image description here

I would have thought that doing "ip link set eth0 down" and then "ip link set eth0 up" would function the same way, but this does not restore connectivity for the interface.

Can someone tell me what shell equivalent commands are executed by the network manager when you do a "disconnect" followed by a "reconnect"?

1 Answer 1

1

I believe the commands executed by the network manager are nmcli. You could verify the man page of nmcli to see how to disconnect and reconnect the network from command line.

From here, I see that the commands that are executed are,

Connect to a configured connection by name

nmcli connection up id <connection name>

Disconnection by name

nmcli connection down id <connection name>

You could verify the man page of your nmcli and figure out on what commands you need to bring down the network connection and bring it back again using the command line.

You must log in to answer this question.

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