I have the same problem. I want to disable network and then enable it.

ifconfig ethPCI down
ifconfig ethPCI up
Here is my code:

Qt Code:
  1. args<<"ethPCI"<<"down";
  2. QProcess *proc = new QProcess();
  3. process->start("ifconfig",args);
  4. process->waitForFinished();
  5. args<<"ethPCI"<<"up";
  6. process->start("ifconfig",args);
To copy to clipboard, switch view to plain text mode 

For some reason only the first command is executed which disables the interface. Second command is not executing.
If I move the second command up then it works but I have to disable the network before enabling it otherwise its no use for me.

Thanks for any help on this.