I have created a VLAN:
Linux
vconfig add en0 3
ip addr add 192.168.126.5/24 dev en0.3
ip link set up en0.3
can be translated to macOS by e.g.
MacOS
ifconfig vlan0 create
ifconfig vlan0 vlan 3 vlandev en0
ifconfig vlan0 inet 192.168.126.5 netmask 255.255.255.0
And I can now see, from ip link show
that I have a VLAN saying:
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
options=6063<RXCSUM,TXCSUM,TSO4,TSO6,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether xx:xx:xx:xx:xx:xx
inet 192.168.126.5 netmask 0xffffff00 broadcast 192.168.126.255
vlan: 3 parent interface: en0
media: autoselect
status: active
Why vlan: 3 parent interface: en0
as I have only one physical enterface - also stated "en0"?