简单的vlan trunk的配置:
第一步:添加vlan
1 Switch>enable
2 Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
default active Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
fddi-default act/unsup
token-ring-default act/unsup
fddinet-default act/unsup
trnet-default act/unsup VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
enet - - - - -
fddi - - - - -
tr - - - - -
fdnet - - - ieee -
trnet - - - ibm - Remote SPAN VLANs
------------------------------------------------------------------------------ Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
31 Switch#vlan database
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode. 36 Switch(vlan)#vlan 2
VLAN added:
Name: VLAN0002
39 Switch(vlan)#vlan 3
VLAN added:
Name: VLAN0003
第二步:建立vlan trunk
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
第三步:将相应的端口添加到相应的vlan