求助:sisco 2960 G 划分vlan和vlan8021Q
求助:sisco 2960 G 划分vlan和vlan8021Q24口的交换机
要求:
一、1-10号口为vlan2 普通的端口隔离。
二、11-23为接ad(猫出来的网线),24口接ROS,拨号专用。
11-23的vlan id 分别设置为11-23.
求详细的命令:
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.End with CNTL/Z.
Switch(config)#vlan 2 #创建vlan2
Switch(config-vlan)#name vlan2 #命令vlan2
Switch(config-vlan)#exit
#进入接口f0/1-10中,把端口1-10划分到vlan2中
Switch(config)#inter range f0/1-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config-if-range)#exit
Switch(config)#vlan 11#增加vlan11
Switch(config-vlan)#name vlan11#命名vlan11
Switch(config-vlan)#exit
Switch(config)#interface f0/11 #进入f0/11,划分到vlan11中
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 11
Switch(config-if)#exit
#同理创建vlan11-vlan23 ,把端口f0/12-23分别划分到vlan12-vlan23中
Switch(config)#vlan 12
Switch(config-vlan)#name vlan11
VLAN #11 and #12 have an identical name: vlan11
Switch(config-vlan)#exit
Switch(config)#interface f0/12
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 12
Switch(config-if)#exit
Switch(config)#vlan 13
Switch(config-vlan)#name vlan13
Switch(config-vlan)#exit
Switch(config)#interface f0/13
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 13
Switch(config-if)#exit
Switch(config)#vlan 14
Switch(config-vlan)#name vlan14
Switch(config-vlan)#exit
Switch(config)#interface f0/14
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 14
Switch(config-if)#exit
Switch(config)#vlan 15
Switch(config-vlan)#name vlan15
Switch(config-vlan)#exit
Switch(config)#interface f0/15
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 15
Switch(config-if)#exit
Switch(config)#vlan 16
Switch(config-vlan)#name vlan16
Switch(config-vlan)#exit
Switch(config)#interface f0/16
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 16
Switch(config-if)#exit
Switch(config)#vlan 17
Switch(config-vlan)#name vlan17
Switch(config-vlan)#exit
Switch(config)#interface f0/17
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 17
Switch(config-if)#exit
Switch(config)#vlan 18
Switch(config-vlan)#name vlan18
Switch(config-vlan)#exit
Switch(config)#interface f0/18
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 18
Switch(config-if)#exit
Switch(config)#vlan 19
Switch(config-vlan)#name vlan19
Switch(config-vlan)#exit
Switch(config)#interface f0/19
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 19
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name vlan20
Switch(config-vlan)#exit
Switch(config)#interface f0/20
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#vlan 21
Switch(config-vlan)#name vlan21
Switch(config-vlan)#exit
Switch(config)#interface f0/21
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 21
Switch(config-if)#exit
Switch(config)#vlan 22
Switch(config-vlan)#name vlan22
Switch(config-vlan)#exit
Switch(config)#interface f0/22
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 22
Switch(config-if)#exit
Switch(config)#vlan 23
Switch(config-vlan)#name vlan23
Switch(config-vlan)#exit
Switch(config)#interface f0/23
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 23
Switch(config-if)#exit
Switch(config)#interface f0/24 #把f0/24设置为trunk模式,即所有的vlan都可以通过
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)# #同理创建vlan11-vlan23 ,把端口f0/12-23分别划分到vlan12-vlan23中
Switch(config)#vlan 12
Switch(config-vlan)#name vlan11
VLAN #11 and #12 have an identical name: vlan11
Switch(config-vlan)#exit
Switch(config)#interface f0/12
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 12
Switch(config-if)#exit
上面那一段是不是错了?
Switch(config-vlan)#name vlan11
VLAN #11 and #12 have an identical name: vlan11
Switch(config-vlan)#exit
这里的中间一句是不是错的?
我也是按你的设置 的,可就是不通。不知道原因出在哪里。
二楼的命令,我怎么看都像锐捷的交换机! 繁华 发表于 2014-3-6 16:05
Switch>
Switch>en
Switch#conf t
.
刚划分了几个vlan,显示不匹配,是什么原因?
繁华 发表于 2014-3-6 16:05
Switch>
Switch>en
Switch#conf t
查询提示不对?
qkhhgdpyg 发表于 2014-3-7 09:56
#同理创建vlan11-vlan23 ,把端口f0/12-23分别划分到vlan12-vlan23中
Switch(config)#vlan 12
Switch(con ...
查询vlan的结果
骑毛驴 发表于 2014-3-7 11:28
二楼的命令,我怎么看都像锐捷的交换机!
锐捷和思科的是一样,就想以前华为的和思科的也是一样的。思科告了华为后,华为才改版的。
繁华 发表于 2014-3-7 17:22
锐捷和思科的是一样,就想以前华为的和思科的也是一样的。思科告了华为后,华为才改版的。
同志:忘解决我的问题~~~:D
唉,name vlan xx这些个语句都去了,一不小心重名 目前的设置如下,还是不能通。
请高手解答以上设置后是否正确,我是按以上设置后,24口接ROS并且划分了vlanID跟其它口不能相通.
请解答下交换机设置上还有其它要补的吗?
Switch>
Switch>en
Switch#config
Enter configuration commands, one per line.End with CNTL/Z.
Switch(config)#vlan 2 #创建vlan2
Switch(config-vlan)#name vlan2 #命令vlan2
Switch(config-vlan)#exit
#进入接口G0/1-10中,把端口1-10划分到vlan2中
Switch(config)#inter range G0/1-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config-if-range)#exit
Switch(config)#vlan 11#增加vlan11
Switch(config-vlan)#name vlan11#命名vlan
Switch(config-vlan)#exit
Switch(config)#interface G0/11 #进入G0/11,划分到vlan11中
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 11
Switch(config-if)#exit
#同理创建vlan11-vlan23 ,把端口G0/12-23分别划分到vlan12-vlan23中
Switch(config)#vlan 12
Switch(config-vlan)#name vlan12
Switch(config-vlan)#exit
Switch(config)#interface G0/12
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 12
Switch(config-if)#exit
Switch(config)#vlan 13
Switch(config-vlan)#name vlan13
Switch(config-vlan)#exit
Switch(config)#interface G0/13
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 13
Switch(config-if)#exit
Switch(config)#vlan 14
Switch(config-vlan)#name vlan14
Switch(config-vlan)#exit
Switch(config)#interface G0/14
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 14
Switch(config-if)#exit
Switch(config)#vlan 15
Switch(config-vlan)#name vlan15
Switch(config-vlan)#exit
Switch(config)#interface G0/15
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 15
Switch(config-if)#exit
Switch(config)#vlan 16
Switch(config-vlan)#name vlan16
Switch(config-vlan)#exit
Switch(config)#interface G0/16
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 16
Switch(config-if)#exit
Switch(config)#vlan 17
Switch(config-vlan)#name vlan17
Switch(config-vlan)#exit
Switch(config)#interface G0/17
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 17
Switch(config-if)#exit
Switch(config)#vlan 18
Switch(config-vlan)#name vlan18
Switch(config-vlan)#exit
Switch(config)#interface G0/18
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 18
Switch(config-if)#exit
Switch(config)#vlan 19
Switch(config-vlan)#name vlan19
Switch(config-vlan)#exit
Switch(config)#interface G0/19
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 19
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name vlan20
Switch(config-vlan)#exit
Switch(config)#interface G0/20
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#vlan 21
Switch(config-vlan)#name vlan21
Switch(config-vlan)#exit
Switch(config)#interface G0/21
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 21
Switch(config-if)#exit
Switch(config)#vlan 22
Switch(config-vlan)#name vlan22
Switch(config-vlan)#exit
Switch(config)#interface G0/22
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 22
Switch(config-if)#exit
Switch(config)#vlan 23
Switch(config-vlan)#name vlan23
Switch(config-vlan)#exit
Switch(config)#interface G0/23
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 23
Switch(config-if)#exit
Switch(config)#interface g0/24 #把g0/24设置为trunk模式
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#
设置后的查询如下:
interface fastEthernet 0/24
switchport mode trunk
switchport trunk native vlan 99
switchport trunk allowed vlan 1-23
no shutdown
end
copy run start
show run 给各位看看配置 show ver 看看 htqt 发表于 2014-3-19 13:10
show ver 看看
以下结果
Switch>en
Switch#show ver
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE4, REL
EASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Fri 26-Mar-10 09:14 by prod_rel_team
Image text-base: 0x00003000, data-base: 0x01400000
ROM: Bootstrap program is C2960 boot loader
BOOTLDR: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(44)SE5, RELEASE SOFTWARE
(fc1)
Switch uptime is 2 days, 5 minutes
System returned to ROM by power-on
System image file is "flash:c2960-lanbasek9-mz.122-50.SE4/c2960-lanbasek9-mz.122
-50.SE4.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
--More--
*Mar3 00:05:15.841: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discover
ed on GigabitEthernet0/5 (2), with C2960-01-SZ GigabitEthernagree to comply with
applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
cisco WS-C2960G-24TC-L (PowerPC405) processor (revision H0) with 65536K bytes of
memory.
Processor board ID FOC1406V5F8
Last reset from power-on
1 Virtual Ethernet interface
24 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
64K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : EC:C8:82:C7:A5:00
Motherboard assembly number : 73-10015-10
Power supply part number : 341-0098-02
Motherboard serial number : FOC14282X4N
Power supply serial number : AZS1438001Q
Model revision number : H0
Motherboard revision number : A0
Model number : WS-C2960G-24TC-L
System serial number : FOC1406V5F8
Top Assembly Part Number : 800-26673-06
Top Assembly Revision Number : B0
Version ID : V06
CLEI Code Number : COMP300ARA
Hardware Board Revision Number: 0x01
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 24 WS-C2960G-24TC-L 12.2(50)SE4 C2960-LANBASEK9-M
Configuration register is 0xF
Switch#
页:
[1]