首页 > 其他 > 详细

配置VLAN

时间:2018-07-31 18:31:00      阅读:115      评论:0      收藏:0      [点我收藏+]

技术分享图片

SW1

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hostname R1

R1(config)#line console 0

R1(config-line)#logging synchronous 

R1(config-line)#exec-timeout 00
R1(config-line)#end

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#vlan 2
R1(config-vlan)#name caiwu

R1(config-vlan)#vlan 3
R1(config-vlan)#name it
R1(config-vlan)#end
 
R1(config)#interface range fastEthernet 0/1-2

R1(config-if-range)#switchport mode access 

R1(config-if-range)#switchport access vlan 2
R1(config-if-range)#exit

R1(config)#interface range fastEthernet 0/3-5

R1(config-if-range)#switchport mode access 

R1(config-if-range)#switchport access vlan 3
R1(config-if-range)#exit
R1(config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#show vlan brief 

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    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
2    caiwu                            active    Fa0/1, Fa0/2
3    it                               active    Fa0/3, Fa0/4, Fa0/5
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
R1#

 

配置VLAN

原文:https://www.cnblogs.com/peter1007/p/9397172.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!