- What is a trunk port?
- What is the purpose of trunk ports?
- 802.1Q Encapsulation
- Configure trunk port
- Router on a stick (ROAS)
whereas an access port belongs to a single vlan, trunk ports carry traffic from multiple vlans on a single interface.
Answer is vlan tagging
.
Switches will tag
all frames that they send over a trunk link. This allows the receiving switch to know which vlan the frame belongs to
Trunk ports = Tagged ports
Access ports = Untagged ports
There are two main trunking protocols :
ISL (Inter-Switch Link)
= This is a old cisco proprietary and currently not in useIEEE 802.1Q
- size = 2bytes (16 bits)
- Always set to a value of 0x8100 which indicates frame is 802.1Q tagged
- Each hexadecimal id 4bits to 4* 4 = 16bits = Total size
-
- 3bits in length
- used for Cos (class of service), which prioritizes important traffic in congested networks
-
- 1bit in length
- used to indicate frames that can be dropped if the network is congested
-
- 12bits in length = 4096 total vlans (2^12), range from 0 - 4095
- Vlans 0 and 4095 are reserved and cant be used
- therefore the actual range is 1-4094
- identifies the vlan the frame belongs to
- 12bits in length = 4096 total vlans (2^12), range from 0 - 4095
Range of vlan 1-4094 is divided into tow sections:
- It is 1 by default on all trunk ports but can be manually configured
- Switch does not add an 802.1Q tag on frames in the native vlan
- When a switch receives an untagged frame on a trunk port, it assumes the frame belongs to the native VLAN
- It is very important that the vlan matches
- For security reason it is best to change the native vlan to an unused VLAN
SN | COMMANDS | Description |
---|---|---|
1 | Switchport trunk native vlan {vlan id} | change the the vlan |
2 | do show interfaces trunk | |
3 | show vlan brief | shows the access ports assigned to each vlan not the trunk ports that allow each vlan |
- ROAS is used to route between multiple VLANs using a single interface on the router and switch
- The switch interface is configured as a regular trunk
- We configure the VLAN tag and IP address on each subinterface
- The router will tag frames sent out of each subinterface with the vlan tag configured on the subinterface