Abstract out network config. Support setting hostname.