VLANs and Trunking
VLANs and Trunking
and Trunking
Interview
Questions and
Answers
42 Interview Q&A for VLANs and Trunking| info@networkjourney.com | +91 9739521088
Contents
1. What is a VLAN? ........................................................................................................... 4
2. How does VLAN tagging work? ..................................................................................... 4
3. What is the purpose of a trunk link in VLANs? ............................................................... 4
4. Explain the difference between access and trunk ports. ................................................ 4
5. What is the IEEE 802.1Q standard? .............................................................................. 4
6. How does VLAN configuration improve network security? ............................................. 5
7. What is VTP (VLAN Trunking Protocol) and how does it work? ..................................... 5
8. Explain the concept of VLAN pruning. ........................................................................... 5
9. What is a VLAN database, and where is it stored? ........................................................ 5
10. How can you troubleshoot VLAN connectivity issues? ................................................. 5
11. What is the role of a VLAN assignment? ..................................................................... 6
12. Explain the purpose of a native VLAN. ........................................................................ 6
13. What is the impact of incorrect VLAN configuration on network performance? ............ 6
14. Describe the concept of VLAN aggregation. ................................................................ 6
15. What is a voice VLAN, and why is it used? .................................................................. 6
16. How do you configure a VLAN on a Cisco switch? ...................................................... 7
17. What is the function of the `show vlan brief` command? .............................................. 7
18. Explain the concept of VLAN hopping and how to prevent it. ....................................... 7
19. What is an extended VLAN, and how is it different from a standard VLAN? ................. 8
20. How can VLANs be used to improve network performance? ....................................... 8
21. What is a private VLAN, and how does it function? ...................................................... 8
22. Explain the concept of VLAN interface (SVI). ............................................................... 8
23. What is the difference between static and dynamic VLAN assignment? ...................... 8
24. How can you verify VLAN configuration on a switch? .................................................. 9
25. What is the purpose of the `vlan.dat` file in Cisco switches? ........................................ 9
26. Describe how VLANs can be used in a data center environment. ................................ 9
27. What is the function of the `switchport mode trunk` command? ................................... 9
28. How does VLAN filtering work? ................................................................................... 9
29. What is the purpose of the `vlan accessmap` command in VLAN configuration? ....... 10
30. What are the common mistakes to avoid when configuring VLANs? .......................... 10
31. What is VLAN hopping, and how can it be mitigated? ................................................ 10
32. How do you configure a VLAN on a Cisco switch for a specific port?......................... 10
33. What is the difference between a Layer 2 and Layer 3 VLAN? .................................. 11
1. What is a VLAN?
Answer: A VLAN (Virtual LAN) is a logical subgroup within a network that groups devices into
a single broadcast domain regardless of their physical location. It allows for better network
segmentation, security, and management. For example, VLANs can separate user
workstations from servers to improve network performance and security.
18. Explain the concept of VLAN hopping and how to prevent it.
Answer: VLAN hopping is an attack where a malicious user gains access to VLANs they are
not supposed to by exploiting VLAN tagging or trunking vulnerabilities. It can be prevented
by disabling unused ports, using VLAN access control lists (ACLs), and ensuring proper
configuration of trunk ports. For example, configuring trunk ports with `switchport trunk
allowed vlan` limits which VLANs can traverse the trunk.
VLAN assignment is used for fixed configurations, while dynamic assignment adapts to
changes in device locations.
allowed vlan` to specify which VLANs can pass through a trunk port. For example, filtering
can prevent VLAN 20 traffic from being sent over a specific trunk link.
37. What is the default VLAN for Cisco switches and how is it
used?
Answer: The default VLAN on Cisco switches is VLAN 1. It is used for management and
administrative purposes, such as accessing the switch for configuration. By default, all
switch ports are assigned to VLAN 1 until configured otherwise. For example, VLAN 1 may be
used for management traffic if no other VLAN is specified.
38. How can you configure a VLAN for a port that will also be
used for trunking?
Answer: To configure a port for both access and trunking, you typically use separate
interfaces for access and trunking configurations. However, if a port needs to handle both
types of traffic, configure it as a trunk and allow specific VLANs for access. For example:
```plaintext
switch configure terminal
switch(config) interface <INTERFACE>
switch(configif) switchport mode trunk
switch(configif) switchport trunk allowed vlan 10,20
```