Deduplicated network setup code.
Using 'ip route replace' to replace or add the route.
This strategy can be rolled back safely:
1) add new ip (no harm done, old ip still exists)
2) replace route
on error:
Delete the new ip, old one is still in place.
If deleting the new ip fails, it was already modified
from within the container, so we only warn about it.
on success do (3):
3) delete old ip
New IP + gateway are in place, old IP can be deleted.
If deletion fails, we only warn like in the error case.