Step 1:
使用专用的网络线连接到交换机的管理口和电脑的com口上
Step 2:
在windows中打开超级终端,比特率设定为9600
Step 3:
连接后界面“Switch>”, 键入“enable”,变成“Switch#”
Step 4:
设定VLAN,
Switch# vlan database
Switch(vlan )#vlan 100 name RED
Switch(vlan )#apply
Switch(vlan )#exit
Step 5:
查看VLAN:
Switch# show vlan
Step 6:
将需要的网卡加入到对应的vlan中
switch(config)#interface fastEthernet0/1 switch(config-if)#switchportaccess vlan 100 switch(config-if)#exit
Step 7:
Switch: configure t
Switch(config)#monitor session 1 source interface f0/1 - 8 both
//指定SPAN session组号为1,源端口为f0/1-f0/3,对进这三个端口的流量
//rx-->指明是进端口得流量,tx-->出端口得流量 both 进出得流量
Switch(config)#monitor session 1 destinationinterface f0/8
Switch(config)#end
Switch# show monitor
最后的结果应该是如此:
Session1
---------
Type : Local Session
SourcePorts :
Both : Fa0/2-7
DestinationPorts : Fa0/8
Encapsulation : Native
Ingress: Disabled
VLANName Status Ports
------------------------------------ --------- -------------------------------
1 default active Fa0/1, 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
100 RED active Fa0/2, Fa0/3, Fa0/4,Fa0/5
Fa0/6, Fa0/7
1002fddi-default act/unsup
1003token-ring-default act/unsup
1004fddinet-default act/unsup
1005trnet-default act/unsup