123
分类:
2012-07-08 09:07:38
1,2同Swithc1一样。
Switch>
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
Switch>en
Switch#con t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan 1
Switch()#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#exit
Switch(config)#exit
Switch#vlan database
Switch(vlan)#vlan 2 name v2
VLAN 2 added:
Name:v2
Switch(vlan)#vlan 3 name v3
VLAN 3 added:
Name:v3
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#con t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#exit
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12
2 v2 active Fa0/1
3 v3 active Fa0/2, Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#con t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 0/12Switch(config-if)#con t
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/12
Switch(config-if)#duplex full
Duplex will not be set until speed is set to non-auto value
Switch(config-if)#speed 100
Switch(config-if)#exit
Switch#exit