1.vlan分割广播域(物理分割和逻辑分割)
(使用vlan进行分割,分为两个广播域)其vlan优势是(控制广播、增强网络安全性、简化网络管理)
2.静态vlan的配置,vlan的范围
3.一个交换机配置vlan
一个交换机配置两个vlan,两个广播域,每一个广播域可以单独通信
3.1实验拓扑
3.2配置四台计算机ip
Switch>en Switch# Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#exit Switch#sh vl br Switch#sh vl br VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig0/1, Gig0/2 10 VLAN0010 active 20 VLAN0020 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch(config)#int range f0/1-10 Switch(config-if-range)#switchport mode access Switch(config-if-range)#switchport access vlan 10 Switch(config-if-range)#end Switch(config)#int range f0/11-20 Switch(config-if-range)#switchport mode access Switch(config-if-range)#switchport access vlan 20 Switch(config-if-range)#end Switch#sh vl br VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig0/1, Gig0/2 10 VLAN0010 active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10 20 VLAN0020 active Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active
pc0:f0/1-----pc1:f0/8--------pc2:f0/16---------pc3:f0/20
vlan10:f0/1--10 vlan20:f0/11--20
pc0和pc1可以通信,pc2和pc3可以互相通信,pc0和pc2不能通信(同意vlan下可以通信)
标签:12,default,Fa0,vlan,Switch,交换机,active,config From: https://www.cnblogs.com/wang97bk/p/17293314.html