Refactor nic configuration