老规矩,感谢Ys-routesim软件制作方
双二层交换机组建trunk,不同vlan间的电脑互相访问
SWA的配置
switch>enable
switch#vlan database
switch(vlan)#vlan 2
switch(vlan)#vlan 3
switch(vlan)#exit
(设定vlan2和vlan3)
switch#config t
switch(config)#int f0/5
switch(config-if)#switchport access vlan 2
switch(config-if)#int f0/6
switch(config-if)#switchport access vlan 2
switch(config-if)#int f0/7
switch(config-if)#switchport access vlan 2
switch(config-if)#exit
(端口5、6、7划到vlan2里)
switch(config)#int f0/8
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan 1,2,3
switch(config-if)#switchport trunk encap dot1q
(端口8为trunk口)
switch(config-if)#exit
switch(config)#exit
switch#show vlan
Vlan Name Status Ports
------- -------- ---------- ------------------------
1 default Active F0/1, F0/2, F0/3, F0/4
2 Vlan02 Active F0/5, F0/6, F0/7
3 Vlan03 Active
1002 fddi-d Active
1004 fnet-d Active
VLAN Type SAID MTU
-------- ------- -------------- --------
1 enet 100001 1500
1002 fddi 101002 1500
1002 fnet 101003 1500
SWB的配置
switch>enable
switch#vlan database
switch(vlan)#vlan 2
switch(vlan)#vlan 3
switch(vlan)#exit
(设定vlan2和vlan3)
switch#config t
switch(config)#int f0/5
switch(config-if)#switchport access vlan 2
switch(config-if)#int f0/6
switch(config-if)#switchport access vlan 2
switch(config-if)#int f0/7
switch(config-if)#switchport access vlan 2
switch(config-if)#exit
(端口5、6、7划到vlan2里)
switch(config)#int f0/1
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan 1,2,3
switch(config-if)#switchport trunk encap dot1q
(端口1为trunk口)
switch(config-if)#exit
switch(config)#exit
switch#show vlan
Vlan Name Status Ports
------- -------- ---------- ------------------------
1 default Active F0/2, F0/3, F0/4, F0/8
2 Vlan02 Active F0/5, F0/6, F0/7
3 Vlan03 Active
1002 fddi-d Active
1004 fnet-d Active
VLAN Type SAID MTU
-------- ------- -------------- --------
1 enet 100001 1500
1002 fddi 101002 1500
1002 fnet 101003 1500