思科实现不同局域网的划分与访问

时间:2024-03-16 16:49:47

思科实现不同局域网的划分与访问
Switch>en
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname dzy
dzy(config)#vlan 100
dzy(config-vlan)#vlan 200
dzy(config-vlan)#vlan 300
dzy(config-vlan)#ex
dzy(config)#int ran
dzy(config)#int range fa
dzy(config)#int range fastEthernet 0/1-9
dzy(config-if-range)#sw
dzy(config-if-range)#switchport access vlan 100
dzy(config-if-range)#ex
dzy(config)#int r
dzy(config)#int range fa
dzy(config)#int range fastEthernet 0/10-19
dzy(config-if-range)#switchp
dzy(config-if-range)#switchport access vlan 200
dzy(config-if-range)#ex
dzy(config)#int ra
dzy(config)#int range fa
dzy(config)#int range fastEthernet 0/20-24
dzy(config-if-range)#sw
dzy(config-if-range)#switchport access vlan 300
dzy(config-if-range)#ex
dzy(config)#ex
dzy#
%SYS-5-CONFIG_I: Configured from console by console

dzy#show vlan

VLAN Name Status Ports


1 default active Gig1/1, Gig1/2
100 VLAN0100 active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9
200 VLAN0200 active Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19
300 VLAN0300 active Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2


1 enet 100001 1500 - - - - - 0 0
100 enet 100100 1500 - - - - - 0 0
200 enet 100200 1500 - - - - - 0 0
–More–

思科实现不同局域网的划分与访问