0

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"?

Chris G.
  • 207
  • 1
  • 9

1 Answers1

1

Why vlan: 3 parent interface: en0 as I have only one physical enterface - also stated "en0"?

It indicates that it's vlan number 3, on the interface en0. VLAN's are tied to a physical interface.

In your case you have only one, but it's common to have multiple Ethernet interfaces, in which case this is crucial information for knowing where the VLAN goes.

vidarlo
  • 6,654
  • 2
  • 18
  • 31