Change network timeout from zero to two sec, add network tests

And parameterize network commands for setting timeout and retries on the command line.