Fix port collision in network test

Using the same port in two different tests causes problems, since the port may
not have been freed yet. Now every test uses a different port.