进入超级终端
en
show run
switch#config t
switch(config)# host 2960 //给交换机起个名字叫2960
2960(config)#inter g0/1 //配置千兆口interface Gigabit Ethernet 0/1口)
2960(config-if)#switchport mode trunk
2960(config-if)#switchport trunk allowed vlan 20-21 //在这个千兆口上放两个网段20,21网段的trunk
2960(config-if)#no ip address
2960(config-if)#no shutdown
2960(config-if)#exit
2960(config)#exit
2960#wr //写入
2960#config t
2960(config)#int f0/1 //配置interface FastEthernet 0/1口
2960(config-if)#int f0/1
2960(config-if)#switch mode access
2960(config-if)#switch access vlan 51
2960(config-if)#no ip address
2960(config-if)#int f0/2 //配置interface FastEthernet 0/2口,依次类推
2960(config-if)#switch mode access 2960(config-if)#switch access vlan 20 2960(config-if)#no ip address 2960(config-if)#no shutdown
2960(config-if)#no shutdown
...配置到0/12.剩下的可以配置为21网段即可。
本文档详细介绍了如何使用Cisco2960交换机进行VLAN划分,包括将Gigabit Ethernet 0/1口配置为trunk端口,允许20和21两个VLAN,并将FastEthernet接口配置为access模式,分别接入51和20 VLAN。通过这些步骤,实现了网络的VLAN隔离和数据传输。
1万+

被折叠的 条评论
为什么被折叠?



