How do you check what VLAN a device is on?

For example, check the VLAN configuration of GE0/0/1.
 display port vlan
Port                    Link Type    PVID  Trunk VLAN List 
------------------------------------------------------------------------------- 
Eth-Trunk0              hybrid       1     -       
GigabitEthernet0/0/1    access       1     - 
GigabitEthernet0/0/2    trunk        1     1-11 13-30 
GigabitEthernet0/0/3    access       10    - 
……

Display information about VLANs configured on bridged Ethernet interfaces. For interfaces configured to support a VoIP VLAN and a data VLAN, the

show vlans



<operational>
8 command displays both tagged and untagged membership for those VLANs.

Note:

When a series of VLANs is created using the

show vlans



<operational>
9 statement, such VLAN names are preceded and followed by a double underscore. For example, a series of VLANs using the VLAN range 1 through 3 and the base VLAN name marketing would be displayed as __marketing_1__, __marketing_2__, and __marketing_3__.

Note:

To display an 802.1X supplicant successfully authenticated in multiple-supplicant mode with dynamic VLAN movement, use the

user@switch>  show vlans             

Name           Tag     Interfaces
default        None
                       xe-0/0/34.0, xe-0/0/33.0, xe-0/0/32.0, xe-0/0/31.0,
                       xe-0/0/30.0, xe-0/0/29.0, xe-0/0/28.0, xe-0/0/27.0,
                       xe-0/0/26.0, xe-0/0/25.0, xe-0/0/19.0, xe-0/0/18.0,
                       xe-0/0/17.0, xe-0/0/16.0, xe-0/0/15.0, xe-0/0/14.0,
                       xe-0/0/13.0, xe-0/0/11.0, xe-0/0/9.0, xe-0/0/8.0,
                       xe-0/0/3.0, xe-0/0/2.0, xe-0/0/1.0
v0001          1
                       xe-0/0/24.0, xe-0/0/23.0, xe-0/0/22.0, xe-0/0/21.0
v0002          2
                       None
v0003          3
                       None
v0004          4
                       None
v0005          5
                       None
0 operational mode command, where vlan-name is the dynamic VLAN.

Options

For EX Series and QFX Series switches:

none

Display information for all VLANs. VLAN information is displayed by VLAN name in ascending order.

brief | detail | extensive

(Optional) Display the specified level of output.

dot1q-tunneling

(Optional) Display VLANs with the Q-in-Q tunneling feature enabled.

management-vlan

(Optional) Display management VLANs.

sort-by (tag | name)

(Optional) Display VLANs in ascending order of VLAN IDs or VLAN names.

vlan-range-name

(Optional) Display VLANs in ascending order of VLAN range names.

summary

(Optional) Display the total number of VLANs and counts of VLANs by type—for example, the number of dynamic, 802.1Q-tagged, and Q-in-Q tunneled VLANs.

vlan-range-name

(Optional) Display information for the specified VLAN range. To display information for all members of the VLAN range, specify the base VLAN name—for example, employee for a VLAN range that includes __employee_1__ through __employee_10__.

For EX Series with ELS Switches and MX Routers:

none

Display information for all VLANs.

brief | detail | extensive

(Optional) Display the specified level of output.

instance instance-name

(Optional) Display information for the specified routing instance.

logical-system logical-system-name

(Optional) Display Ethernet-switching statistics information for the specified logical system.

operational

(Optional) Display information for the operational routing instances.

vlan-name)

(Optional) Display information about the specified VLAN.

interface interface-name

(Optional) Display information about the specified interface.

For SRX devices:

none

Display information for all VLANs.

brief | detail | extensive

(Optional) Display the specified level of output.

interface interface-name

(Optional) Display information about a specific interface.

logical system

(Optional) Display name of the logical system or all.

operational

(Optional) Display information for the operational switching instances.

Required Privilege Level

view

Output Fields

Table 1 lists the output fields for the

show vlans



<operational>
8 command. Output fields are listed in the approximate order in which they appear.

Table 1: show vlans Output Fields

Field Name

Field Description

Level of Output

Name

Name of a VLAN.

none, brief

Tag

802.1Q tag applied to this VLAN. If none is displayed, no tag is applied.

All levels

Interfaces

Interface associated with learned MAC addresses or All-members option (flood entry). An asterisk (*) beside the interface indicates that the interface is UP.

All levels

Address

IP address.

none, brief

Ports Active /Total

Number of interfaces associated with a VLAN: Active indicates interfaces that are UP, and Total indicates interfaces that are active and inactive.

brief

VLAN

Name of a VLAN.

detail, extensive

Admin state

State of the interface. Values are:

enabled—The interface is turned on, and the physical link is operational and can pass packets.

detail,extensive

MAC learning Status

Indicates if MAC learning is disabled.

detail, extensive

Description

Description for the VLAN.

detail,extensive

Primary IP

Primary IP address associated with a VLAN.

detail

Number of interfaces

Number of interfaces associated with a VLAN. Both the total number of interfaces and the number of active interfaces associated with a VLAN are displayed.

detail, extensive

STP

Spanning tree associated with a VLAN.

detail,extensive

Tagged interfaces

Tagged interfaces with which a VLAN is associated.

detail,extensive

Untagged interfaces

Untagged interfaces with which a VLAN is associated.

detail. extensive

Dot1q Tunneling Status

Indicates if Q-in-Q tunneling is enabled.

extensive

Customer VLAN ranges

List of customer VLAN (C-VLAN) ranges associated with this service VLAN (S-VLAN).

extensive

Private VLAN Mode

The private VLAN mode for this VLAN. Values include Primary, Isolated, and Community.

extensive

Primary VLAN

Primary VLAN tag for this secondary VLAN.

extensive

Internal Index

VLAN index internal to Junos OS software.

extensive

Origin

Manner in which the VLAN was created: static or learn.

extensive

Protocol

Port-based VLAN or MAC-based VLAN. MAC-based protocol is displayed when VLAN assignment is done either statically or dynamically through 802.1X,

extensive

IP addresses

IP address associated with a VLAN.

extensive

Number of MAC entries

For MAC-based VLANs created either statically or dynamically, the MAC addresses associated with an interface.

What is device VLAN?

A virtual LAN (VLAN) is a logical overlay network that groups together a subset of devices that share a physical LAN, isolating the traffic for each group. A LAN is a group of computers or other devices in the same place -- e.g., the same building or campus -- that share the same physical network.

How to check VLAN interface in Linux?

For that, you need create an interface file like other interface files in /etc/sysconfig/network-scripts/ directory with vlan id info inside. So for example our eth0. 300 file will look like this. Note: VLAN is a big networking topic.