ACCESSCisco 的中心配置实例之四—-vlan的统筹及安排(核心交换机)

4、vlan的计划暨安排

于本节中我们讲课vlan的宏图和具体的部署命令。在此例中我们因此的是vtp(VLAN
Trunking
Protocol)server的模式,在这种模式被我们得配备基本交换机的vtp模式吗server,各接入交换机的vtp模式吧cilent,那么配置好后接交换机就见面经过trunk口自动从基本交换机学习及具备的vlan配置信息。在接交换机中仅仅需要加上相应的端口即可,这样好管理暨配置。具体的安排命令我们经过简单聊节来演示:

 

4.1 骨干交换机的连带部署

(这是一模一样宝已安排好了之交换机,但立刻并无会见影响我们的以身作则效果。所有我们新作的安排会于演示了后去掉。)

TEST#sh vlan        #
显示都部分vlan信息,并且还要出示了各端口所属的vlan

ACCESS 1ACCESS 2

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                              active    Gi1/2, Gi1/3, Gi1/4, Gi1/5, Gi1/6, Gi1/7, Gi1/8, Gi1/9, Gi1/10, Gi1/11, Gi1/13, Gi1/14, Gi1/16, Gi1/17, Gi1/18, Gi1/19, Gi1/20, Gi3/12, Gi3/13, Gi3/16

2    firewall                             active    Gi1/1

10   Engineering                         active    Gi3/9, Gi3/10

20   Procurement                        active    Gi3/19

30   QAQC                            active   

40   Operation                        active   

50   Yard                                  active    Gi3/18

60   BM                              active   

70   HRAD                              active   

80   Facility                          active   

100  Finance                        active   

110  GO                             active   

120  Wlan                            active   

150  Server                         active    Gi3/1, Gi3/2, Gi3/3, Gi3/4, Gi3/5, Gi3/6, Gi3/7, Gi3/8

160  Client                             active    Gi3/11, Gi3/15

View Code

 

# 从当下行向下是也其他协商预留的vlan号段,这些不必理会。

ACCESS 3ACCESS 4

1002 fddi-default                     act/unsup 1003 token-ring-default               act/unsup

1004 fddinet-default                  act/unsup

1005 trnet-default                    act/unsup



VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -        0      0  

2    enet  100002     1500  -      -      -        -    -        0      0  

10   enet  100010     1500  -      -      -        -    -        0      0  

20   enet  100020     1500  -      -      -        -    -        0      0  

30   enet  100030     1500  -      -      -        -    -        0      0  

40   enet  100040     1500  -      -      -        -    -        0      0  

50   enet  100050     1500  -      -      -        -    -        0      0  

60   enet  100060     1500  -      -      -        -    -        0      0  

70   enet  100070     1500  -      -      -        -    -        0      0  

80   enet  100080     1500  -      -      -        -    -        0      0  

100  enet  100100     1500  -      -      -        -    -        0      0  

110  enet  100110     1500  -      -      -        -    -        0      0  

120  enet  100120     1500  -      -      -        -    -        0      0  

150  enet  100150     1500  -      -      -        -    -        0      0  

160  enet  100160     1500  -      -      -        -    -        0      0   

1002 fddi  101002     1500  -      -      -        -    -        0      0  

1003 tr    101003     1500  -      -      -        -    -        0      0  

1004 fdnet 101004       1500  -      -      -        ieee  -        0      0  

View Code

TEST#conf

Configuring from terminal, memory, or network [terminal]? t

Enter configuration commands, one per line.  End with CNTL/Z.

TEST(config)#vlan 200               # 我们新建一个vlan号为200之vlan

TEST(config-vlan)#name test              #
给这个vlan命名,这样好日常的治本。

TEST(config-vlan)#?

ACCESS 5ACCESS 6

VLAN configuration commands:

  are           Maximum number of All Route Explorer hops for this VLAN (or zero if none specified)

  backupcrf     Backup CRF mode of the VLAN

  bridge        Bridging characteristics of the VLAN

  exit          Apply changes, bump revision number, and exit mode

  media         Media type of the VLAN

  mtu           VLAN Maximum Transmission Unit

  name          Ascii name of the VLAN             # 刚才我们就是用的这条命令

  no            Negate a command or set its defaults

  parent        ID number of the Parent VLAN of FDDI or Token Ring type VLANs

  private-vlan  Configure a private VLAN

  remote-span   Configure as Remote SPAN VLAN

  ring          Ring number of FDDI or Token Ring type VLANs

  said          IEEE 802.10 SAID

  shutdown      Shutdown VLAN switching

  state         Operational state of the VLAN

  ste           Maximum number of Spanning Tree Explorer hops for this VLAN (or zero if none specified)

  stp           Spanning tree characteristics of the VLAN

  tb-vlan1      ID number of the first translational VLAN for this VLAN (or zero if none)

  tb-vlan2      ID number of the second translational VLAN for this VLAN (or zero if none)

View Code

 

TEST(config-vlan)#END             # 建好vlan后退出及特权模式受到

TEST#show ip int brief        

# 显示目前有端口配置状态,我们会发觉这并没有vlan200底有关消息

ACCESS 7ACCESS 8

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet1          unassigned      YES NVRAM  down                  down   

Vlan1                  192.168.113.254 YES NVRAM  up                    up     

Vlan2                  172.16.0.2      YES NVRAM  up                    up     

Vlan10                 192.168.101.254 YES NVRAM  up                    up     

Vlan20                 192.168.102.254 YES NVRAM  up                    up     

Vlan30                 192.168.103.254 YES NVRAM  up                    up     

Vlan40                 192.168.104.254 YES NVRAM  up                    up     

Vlan50                 192.168.105.254 YES NVRAM  up                    up     

Vlan60                 192.168.106.254 YES NVRAM  up                    up     

Vlan70                 192.168.107.254 YES NVRAM  up                    up     

Vlan80                 192.168.108.254 YES NVRAM  up                    up     

Vlan100                192.168.110.254 YES NVRAM  up                    up     

Vlan110                192.168.111.254 YES NVRAM  up                    up     

Vlan120                192.168.112.254 YES NVRAM  up                    up     

Vlan150                192.168.100.254 YES NVRAM  up                    up     

Vlan160                192.168.115.254 YES NVRAM  up                    up     

GigabitEthernet1/1     unassigned      YES unset  up                    up     

GigabitEthernet1/2     unassigned      YES unset  down                  down   

GigabitEthernet1/3     unassigned      YES unset  down                  down   

GigabitEthernet1/4     unassigned      YES unset  down                  down   

GigabitEthernet1/5     unassigned      YES unset  down                  down   

GigabitEthernet1/6     unassigned      YES unset  down                  down   

GigabitEthernet1/7     unassigned      YES unset  down                  down   

GigabitEthernet1/8     unassigned      YES unset  down                  down   

GigabitEthernet1/9     unassigned      YES unset  down                  down   

GigabitEthernet1/10    unassigned      YES unset  down                  down   

GigabitEthernet1/11    unassigned      YES unset  down                  down   

GigabitEthernet1/12    unassigned      YES unset  down                  down   

GigabitEthernet1/13    unassigned      YES unset  down                  down   

GigabitEthernet1/14    unassigned      YES unset  down                  down   

GigabitEthernet1/15    unassigned      YES unset  up                    up     

GigabitEthernet1/16    unassigned      YES unset  down                  down   

GigabitEthernet1/17    unassigned      YES unset  down                  down   

GigabitEthernet1/18    unassigned      YES unset  down                  down   

GigabitEthernet1/19    unassigned      YES unset  down                  down   

GigabitEthernet1/20    unassigned      YES unset  down                  down   

GigabitEthernet3/1     unassigned      YES unset  up                    up     

GigabitEthernet3/2     unassigned      YES unset  up                    up     

GigabitEthernet3/3     unassigned      YES unset  up                    up      

GigabitEthernet3/4     unassigned      YES unset  up                    up     

GigabitEthernet3/5     unassigned      YES unset  up                    up     

GigabitEthernet3/6     unassigned      YES unset  up                    up     

GigabitEthernet3/7     unassigned      YES unset  up                    up     

GigabitEthernet3/8     unassigned      YES unset  down                  down   

View Code

 

TEST#sh vlan # 显示一下vlan信息

 

ACCESS 9ACCESS 10

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                           active    Gi1/2, Gi1/3, Gi1/4, Gi1/5, Gi1/6, Gi1/7, Gi1/8, Gi1/9, Gi1/10, Gi1/11, Gi1/13, Gi1/14, Gi1/16, Gi1/17, Gi1/18, Gi1/19, Gi1/20, Gi3/12, Gi3/13, Gi3/16

2    firewall                          active    Gi1/1

10   Engineering                       active    Gi3/9, Gi3/10

20   Procurement                      active    Gi3/19

30   QAQC                           active   

40   Operation                        active   

50   Yard                             active    Gi3/18

60   BM                             active   

70   HRAD                           active   

80   Facility                          active   

100  Finance                            active   

110  GO                            active   

120  Wlan                              active   

150  Server                         active    Gi3/1, Gi3/2, Gi3/3, Gi3/4, Gi3/5, Gi3/6, Gi3/7, Gi3/8

160  Client                           active    Gi3/11, Gi3/15

200  test                             active     

View Code

 

# 这个是咱新建好之vlan,但是vlan中没任何端口。  

ACCESS 11ACCESS 12

1002 fddi-default                       act/unsup

1003 token-ring-default                  act/unsup

1004 fddinet-default                     act/unsup

1005 trnet-default                       act/unsup



VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -        0      0  

2    enet  100002     1500  -      -      -        -    -        0      0  

10   enet  100010     1500  -      -      -        -    -        0      0  

20   enet  100020     1500  -      -      -        -    -        0      0  

30   enet  100030     1500  -      -      -        -    -        0      0  

40   enet  100040     1500  -      -      -        -    -        0      0  

50   enet  100050     1500  -      -      -        -    -        0      0  

60   enet  100060     1500  -      -      -        -    -        0      0  

70   enet  100070     1500  -      -      -        -    -        0      0  

80   enet  100080     1500  -      -      -        -    -        0      0  

100  enet  100100     1500  -      -      -        -    -        0      0  

110  enet  100110     1500  -      -      -        -    -        0      0  

120  enet  100120     1500  -      -      -        -    -        0      0  

150  enet  100150     1500  -      -      -        -    -        0      0  

160  enet  100160     1500  -      -      -        -    -        0      0  

200  enet  100200     1500  -      -      -        -    -        0      0  

1002 fddi  101002     1500  -      -      -        -    -        0      0  

View Code

 

TEST#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

TEST(config)#interface gigabitEthernet 1/2

# 我们进来端口配置模式,配置gigabitEthernet 1/2斯端口

TEST(config-if)#switchport access vlan 200        #
将以此端口加入到刚刚打好的vlan200遭受

TEST(config-if)#end

TEST#sh vlan                                                  #
退出来证实一下

 

ACCESS 13ACCESS 14

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                         active    Gi1/3, Gi1/4, Gi1/5, Gi1/6, Gi1/7, Gi1/8, Gi1/9, Gi1/10, Gi1/11, Gi1/12, Gi1/14, Gi1/16, Gi1/17, Gi1/18, Gi1/19, Gi1/20, Gi3/12, Gi3/13, Gi3/14

2     firewall                          active    Gi1/1

10   Engineering                      active    Gi3/9, Gi3/10

20   Procurement                    active    Gi3/19

30   QAQC                         active   

40   Operation                        active   

50   Yard                            active    Gi3/18

60   BM                             active   

70   HRAD                           active   

80   Facility                          active   

100  Finance                          active   

110  GO                             active   

120  Wlan                            active   

150  Server                         active    Gi3/1, Gi3/2, Gi3/3, Gi3/4, Gi3/5, Gi3/6, Gi3/7, Gi3/8

160  Client                            active    Gi3/11, Gi3/15

200  test                               active    Gi1/2    

View Code

ACCESS 15ACCESS 16

# 现在GI1/2这个端口已经属于vlan200了。

1002 fddi-default                       act/unsup

1003 token-ring-default                  act/unsup

1004 fddinet-default                     act/unsup

1005 trnet-default                       act/unsup



VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -        0      0  

2    enet  100002     1500  -      -      -        -    -        0      0  

10   enet  100010     1500  -      -      -        -    -        0      0  

20   enet  100020     1500  -      -      -        -    -        0      0  

30   enet  100030     1500  -      -      -        -    -        0      0  

40   enet  100040     1500  -      -      -        -    -        0      0  

50   enet  100050     1500  -      -      -        -    -        0      0  

60   enet  100060     1500  -      -      -        -    -        0      0  

70   enet  100070     1500  -      -      -        -    -        0      0  

80   enet  100080     1500  -      -      -        -    -        0      0  

100  enet  100100     1500  -      -      -        -    -        0      0  

110  enet  100110     1500  -      -      -        -    -        0      0  

120  enet  100120     1500  -      -      -        -    -        0      0  

150  enet  100150     1500  -      -      -        -    -        0      0  

160  enet  100160     1500  -      -      -        -    -        0      0  

200  enet  100200     1500  -      -      -        -    -        0      0  

1002 fddi  101002     1500  -      -      -        -    -        0      0  

1003 tr    101003     1500  -      -      -        -    -        0      0  

View Code

 

TEST#sh ip int brief     

# 再显一下富有端口的状态,我们见面发现相同无vlan200的相关信息。

ACCESS 17ACCESS 18

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet1          unassigned      YES NVRAM  down                  down   

Vlan1                  192.168.113.254 YES NVRAM  up                    up     

Vlan2                  172.16.0.2      YES NVRAM  up                    up     

Vlan10                 192.168.101.254 YES NVRAM  up                    up     

Vlan20                 192.168.102.254 YES NVRAM  up                    up     

Vlan30                 192.168.103.254 YES NVRAM  up                    up     

Vlan40                 192.168.104.254 YES NVRAM  up                    up     

Vlan50                 192.168.105.254 YES NVRAM  up                    up     

Vlan60                 192.168.106.254 YES NVRAM  up                    up     

Vlan70                 192.168.107.254 YES NVRAM  up                    up     

Vlan80                 192.168.108.254 YES NVRAM  up                    up     

Vlan100                192.168.110.254 YES NVRAM  up                    up     

Vlan110                192.168.111.254 YES NVRAM  up                    up     

Vlan120                192.168.112.254 YES NVRAM  up                    up     

Vlan150                192.168.100.254 YES NVRAM  up                    up     

Vlan160                192.168.115.254 YES NVRAM  up                    up     

GigabitEthernet1/1     unassigned      YES unset  up                    up     

GigabitEthernet1/2     unassigned      YES unset  down                  down   

GigabitEthernet1/3     unassigned      YES unset  down                  down   

GigabitEthernet1/4     unassigned      YES unset  down                  down   

GigabitEthernet1/5     unassigned      YES unset  down                  down   

GigabitEthernet1/6     unassigned      YES unset  down                  down   

GigabitEthernet1/7     unassigned      YES unset  down                  down   

GigabitEthernet1/8     unassigned      YES unset  down                  down   

GigabitEthernet1/9     unassigned      YES unset  down                  down   

GigabitEthernet1/10    unassigned      YES unset  down                  down   

GigabitEthernet1/11    unassigned      YES unset  down                  down   

GigabitEthernet1/12    unassigned      YES unset  down                  down   

GigabitEthernet1/13    unassigned      YES unset  down                  down   

GigabitEthernet1/14    unassigned      YES unset  down                  down   

GigabitEthernet1/15    unassigned      YES unset  up                    up     

GigabitEthernet1/16    unassigned      YES unset  down                  down   

GigabitEthernet1/17    unassigned      YES unset  down                  down   

GigabitEthernet1/18    unassigned      YES unset  down                  down   

GigabitEthernet1/19    unassigned      YES unset  down                  down   

GigabitEthernet1/20    unassigned      YES unset  down                  down   

GigabitEthernet3/1     unassigned      YES unset  up                    up     

GigabitEthernet3/2     unassigned      YES unset  up                    up     

GigabitEthernet3/3     unassigned      YES unset  up                    up     

GigabitEthernet3/4     unassigned      YES unset  up                    up     

GigabitEthernet3/5     unassigned      YES unset  up                    up     

GigabitEthernet3/6     unassigned      YES unset  up                    up     

GigabitEthernet3/7     unassigned      YES unset  up                    up     

GigabitEthernet3/8     unassigned      YES unset  down                  down   

View Code

 

TEST#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

TEST(config)#int vlan 200           #
给这个vlan添加相应的ip地址,注意此处的语法

TEST(config-if)#ip add 10.10.10.0.1 255.255.255.0   # 添加具体的ip地址

TEST(config-if)#no shut                                                
# 使能是端口

TEST(config-if)#end

TEST#sh ip int b                        

# 重新显示一下富有端口的状态,我们会发觉已经发矣vlan200底端口信息了。

ACCESS 19ACCESS 20

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet1          unassigned      YES NVRAM  down                  down   

Vlan1                  192.168.113.254 YES NVRAM  up                    up     

Vlan2                  172.16.0.2      YES NVRAM  up                    up     

Vlan10                 192.168.101.254 YES NVRAM  up                    up     

Vlan20                 192.168.102.254 YES NVRAM  up                    up     

Vlan30                 192.168.103.254 YES NVRAM  up                    up     

Vlan40                 192.168.104.254 YES NVRAM  up                    up     

Vlan50                 192.168.105.254 YES NVRAM  up                    up     

Vlan60                 192.168.106.254 YES NVRAM  up                    up     

Vlan70                 192.168.107.254 YES NVRAM  up                    up     

Vlan80                 192.168.108.254 YES NVRAM  up                    up     

Vlan100                192.168.110.254 YES NVRAM  up                    up     

Vlan110                192.168.111.254 YES NVRAM  up                    up     

Vlan120                192.168.112.254 YES NVRAM  up                    up     

Vlan150                192.168.100.254 YES NVRAM  up                    up     

Vlan160                192.168.115.254 YES NVRAM  up                    up     

Vlan200                10.10.0.1       YES manual up                    up     

GigabitEthernet1/1     unassigned      YES unset  up                    up     

GigabitEthernet1/2     unassigned      YES unset  down                  down   

GigabitEthernet1/3     unassigned      YES unset  down                  down   

GigabitEthernet1/4     unassigned      YES unset  down                  down   

GigabitEthernet1/5     unassigned      YES unset  down                  down   

GigabitEthernet1/6     unassigned      YES unset  down                  down   

GigabitEthernet1/7     unassigned      YES unset  down                  down   

GigabitEthernet1/8     unassigned      YES unset  down                  down   

GigabitEthernet1/9     unassigned      YES unset  down                  down   

GigabitEthernet1/10    unassigned      YES unset  down                  down   

GigabitEthernet1/11    unassigned      YES unset  down                  down   

GigabitEthernet1/12    unassigned      YES unset  down                  down   

GigabitEthernet1/13    unassigned      YES unset  down                  down   

GigabitEthernet1/14    unassigned      YES unset  down                  down   

GigabitEthernet1/15    unassigned      YES unset  up                    up     

GigabitEthernet1/16    unassigned      YES unset  down                  down   

GigabitEthernet1/17    unassigned      YES unset  down                  down   

GigabitEthernet1/18    unassigned      YES unset  down                  down   

GigabitEthernet1/19    unassigned      YES unset  down                  down   

GigabitEthernet1/20    unassigned      YES unset  down                  down   

GigabitEthernet3/1     unassigned      YES unset  up                    up     

GigabitEthernet3/2     unassigned      YES unset  up                    up     

GigabitEthernet3/3     unassigned      YES unset  up                    up     

GigabitEthernet3/4     unassigned      YES unset  up                    up     

GigabitEthernet3/5     unassigned      YES unset  up                    up     

GigabitEthernet3/6     unassigned      YES unset  up                    up     

GigabitEthernet3/7     unassigned      YES unset  up                    up     

View Code

 

##
小结一下:在刚之布置过程遭到,端口Gi1/2下面所连接的微机的网关就是vlan200之地址——10.10.0.1。下面所并的微机找到呼应的网关后当会去探寻具体的路由,这些我们下节会讲解。

 

TEST#show inter trunk       

#
显示当前交换机中之trunk接口。作为trunk接口的端口下联的凡接入层(或者是会师聚层)的交换机。

 

ACCESS 21ACCESS 22

Port        Mode         Encapsulation  Status        Native vlan

Gi1/15      on           802.1q         trunking      1

Gi3/17      on           802.1q         trunking      1

Gi3/20      on           802.1q         trunking      1

Gi3/21      on           802.1q         trunking      1

Gi3/22      on           802.1q         trunking      1

Gi3/23      on           802.1q         trunking      1

Gi3/24      on           802.1q         trunking      1



Port        Vlans allowed on trunk

Gi1/15      1-4094

Gi3/17      1-4094

Gi3/20      1-4094

Gi3/21      1-4094

Gi3/22      1-4094

Gi3/23      1-4094

Gi3/24      1-4094



Port        Vlans allowed and active in management domain

Gi1/15      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/17      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/20      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/21      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/22      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/23      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/24      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200



Port        Vlans in spanning tree forwarding state and not pruned

Gi1/15      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/17      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/20      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/21      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/22      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/23      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

Gi3/24      1-2,10,20,30,40,50,60,70,80,100,110,120,150,160,200

View Code

 

TEST#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

TEST(config)#int gi1/15              #
我们以gi1/15来证实,如何拿这个端口配置成trunk接口

 

TEST(config-if)#switchport mode ?            # 首先定义是接口的模式也trunk

      access              Set trunking mode to ACCESS unconditionally

      dynamic           Set trunking mode to dynamically negotiate
access or trunk mode

private-vlan          Set the mode to private-vlan host or promiscuous

trunk              Set trunking mode to TRUNK unconditionally

TEST(config-if)#switchport mode trunk

TEST(config-if)#switchport trunk encapsulation ?     

#
然后定义trunk口的封装类型,此处选择dot1q也给802.1q,为通用封装类型

  dot1q             Interface uses only 802.1q trunking encapsulation
when trunking

  isl                      Interface uses only ISL trunking
encapsulation when trunking

  negotiate          Device will negotiate trunking encapsulation with
peer on interface

 

TEST(config-if)#switchport trunk encapsulation dot1q      

# 回车晚虽以此trunk口的包裹类型定义成了dot1q

##
小结一下:刚才部署的凡怎将下联接入层交换机的端口配置成trunk模式,并且如何用以此trunk口封装成特定的品类,接下去我们介绍如何安排是基本交换机的VTP的一部分连锁设置。

TEST(config)#vtp  mode ?

  client       Set the device to client mode.

  server       Set the device to server mode.

  transparent  Set the device to transparent mode.

 

TEST(config)#vtp  mode server 

# 首先我们以大局配置模式中将vtp的mode设置成server

TEST(config)#vtp domain pjoe    

#
然后安排vtp的domain,所有的交换机应该以一个domain中,此例中我们定义之doamin为pjoe

 

TEST(config)#vtp password pjoeserver

#
配置是vtp的插手密码,这样可防范非授权的交换机随便进入到之domian中来。

TEST#sh vtp status
                                         #
配置了后显得一下vtp的状态

VTP Version                        : 2

Configuration Revision                       : 22

Maximum VLANs supported locally    : 1005

Number of existing VLANs           : 20

VTP Operating Mode              : Server    #  vtp的模式吗server模式

VTP Domain Name                 : pjoe      #  vtp的域名是pjoe

VTP Pruning Mode                : Disabled

VTP V2 Mode                      : Disabled

VTP Traps Generation                : Enabled

MD5 digest                      : 0x00 0xB3 0x21 0xB7 0x56 0xD7 0x06
0x4F  

# 此处表示的凡vtp的密码(已加密)

Configuration last modified by 192.168.113.254 at 12-3-07 22:52:46

Local updater ID is 192.168.113.254 on interface Vl1 (lowest numbered
VLAN interface found)

TEST#

TEST#

##
小结一下:经过上述之部署就以挑大梁交换机的vtp等之布置工作做到了,只需要再次布局好搭交换机的有关vtp参数与呼应之trunk接口,接入交换机就会打着力交换机上落到所有的vlan信息,而无需还确立梯次vlan。

 

 

TEST#sh vlan        # 接下来我们去丢新长的vlan,先亮一下。

ACCESS 23ACCESS 24

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                           active    Gi1/3, Gi1/4, Gi1/5, Gi1/6, Gi1/7, Gi1/8, Gi1/9, Gi1/10, Gi1/11, Gi1/12, Gi1/14, Gi1/16, Gi1/17, Gi1/18, Gi1/19, Gi1/20, Gi3/12, Gi3/13, Gi3/14,

2    firewall                        active    Gi1/1

10   Engineering                       active    Gi3/9, Gi3/10

20   Procurement                      active    Gi3/19

30   QAQC                         active   

40   Operation                              active   

50   Yard                            active    Gi3/18

60   BM                              active   

70   HRAD                           active   

80   Facility                          active   

100  Finance                          active   

110  GO                              active   

120  Wlan                            active   

150  Server                         active    Gi3/1, Gi3/2, Gi3/3, Gi3/4, Gi3/5, Gi3/6, Gi3/7, Gi3/8

160  Client                           active    Gi3/11, Gi3/15

200  test                              active    Gi1/2

1002 fddi-default                       act/unsup

1003 token-ring-default                  act/unsup

1004 fddinet-default                     act/unsup

1005 trnet-default                       act/unsup



VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -        0      0  

2    enet  100002     1500  -      -      -        -    -        0      0  

10   enet  100010     1500  -      -      -        -    -        0      0  

20   enet  100020     1500  -      -      -        -    -        0      0  

30   enet  100030     1500  -      -      -        -    -        0      0   

40   enet  100040     1500  -      -      -        -    -        0      0  

50   enet  100050     1500  -      -      -        -    -        0      0  

60   enet  100060     1500  -      -      -        -    -        0      0  

70   enet  100070     1500  -      -      -        -    -        0      0  

80   enet  100080     1500  -      -      -        -    -        0      0  

100  enet  100100     1500  -      -      -        -    -        0      0  

110  enet  100110     1500  -      -      -        -    -        0      0  

120  enet  100120     1500  -      -      -        -    -        0      0  

150  enet  100150     1500  -      -      -        -    -          0      0  

160  enet  100160     1500  -      -      -        -    -          0      0  

200  enet  100200     1500  -      -      -        -    -          0      0  

1002 fddi  101002     1500  -      -      -        -    -           0      0  

1003 tr    101003     1500  -      -      -        -    -           0      0  

View Code

TEST#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

TEST(config)#no vlan 200                  # 第一步,删除vlan200

TEST(config)#no int vlan 200             # 第二步,删除int vlan200
,经过就半步就是足以彻底的去除vlan200了

 

TEST(config)int gi1/2                        # 进入到gi1/2这个端口中

TEST(config-if)#switchport access vlan 1    #
将这端口还划分到vlan1中

TEST(config-if)#end

TEST#shv vlan     

# 确认一下,我们成之用gi1/2回归到vlan1中,并且删除掉了vlan200

 

ACCESS 25ACCESS 26

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                           active    Gi1/2, Gi1/3, Gi1/4, Gi1/5, Gi1/6, Gi1/7, Gi1/8, Gi1/9, Gi1/10, Gi1/11, Gi1/13, Gi1/14, Gi1/16, Gi1/17, Gi1/18, Gi1/19, Gi1/20, Gi3/12, Gi3/13, Gi3/16

2    firewall                           active    Gi1/1

10   Engineering                      active    Gi3/9, Gi3/10

20   Procurement                       active    Gi3/19

30   QAQC                           active   

40   Operation                        active   

50   Yard                            active    Gi3/18

60   BM                              active   

70   HRAD                         active   

80   Facility                          active   

100  Finance                           active   

110  GO                               active   

120  Wlan                             active   

150  Server                         active    Gi3/1, Gi3/2, Gi3/3, Gi3/4, Gi3/5, Gi3/6, Gi3/7, Gi3/8

160  Client                             active    Gi3/11, Gi3/15

1002 fddi-default                        act/unsup

1003 token-ring-default                  act/unsup

1004 fddinet-default                     act/unsup

1005 trnet-default                       act/unsup



VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -          0      0  

2    enet  100002     1500  -      -      -        -    -          0      0  

10   enet  100010     1500  -      -      -        -    -          0      0  

20   enet  100020     1500  -      -      -        -    -          0      0  

30   enet  100030     1500  -      -      -        -    -          0      0  

40   enet  100040     1500  -      -      -        -    -          0      0  

50   enet  100050     1500  -      -      -        -    -          0      0  

60   enet  100060     1500  -      -      -        -    -          0      0  

70   enet  100070     1500  -      -      -        -    -          0      0  

80   enet  100080     1500  -      -      -        -    -          0      0  

100  enet  100100     1500  -      -      -        -    -          0      0   

110  enet  100110     1500  -      -      -        -    -           0      0  

120  enet  100120     1500  -      -      -        -    -          0      0  

150  enet  100150     1500  -      -      -        -    -          0      0  

160  enet  100160     1500  -      -      -        -    -          0      0  

1002 fddi  101002     1500  -      -      -        -    -            0      0  

1003 tr    101003     1500  -      -      -        -    -           0      0  

1004 fdnet 101004     1500  -      -      -        ieee -              0      0  

View Code

 

相关文章