refactor vlan interface code