Cisco catalyst configuring VLANs

一. 设置当前交换机为server模式
switch>enable
switch# configure t
switch(config)>vtp mode server
switch(config)>exit

二. 删除原先的vlan
switch>enable
switch# configure t
switch(config)>no vlan VLAN-ID
switch(config)>exit

三. 增加一个新的vlan
switch>enable
switch# configure t
switch(config)>vlan VLAN-ID
switch(config)>name VLAN-NAME
switch(config)>exit

比如

Switch# configure terminal
Switch(config)# vlan 20
Switch(config-vlan)# name test20
Switch(config-vlan)# end

四. 分配一个到指定的vlan

Switch# configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface gigabitethernet0/1 
Switch(config-if)# switchport mode access 
Switch(config-if)# switchport access vlan 2
Switch(config-if)# end 

五. 重载配置

copy running-config startup-config

六. 备忘录
vlan的id 比如10 20 30,这些你在网关上要对应,我这是使用的routeros。这样才能起到一个局域网内有不同的网段以及网段之间的阻隔。

Leave a Comment

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: