Cisco 的骨干配备实例之四—-vlan的筹划及安排(要旨沟通机)

4、vlan的设计及布署

在本节中大家讲解vlan的设计及具体的布置命令。在此例中我们用的是vtp(VLAN
Trunking
Protocol)server的形式,在那种方式中大家要求布置基本调换机的vtp情势为server,各接入沟通机的vtp方式为cilent,那么配置完毕后交接沟通机就会透过trunk口自动从焦点沟通机学习到所有的vlan配置新闻。在连接互换机中只须求丰裕相应的端口即可,那样不难管理与配置。具体的安插命令大家通过两小节来演示:

 

4.1 中央交流机的连锁配置

(那是一台早已陈设好了的调换机,但那并不会潜移默化大家的以身作则效果。所有大家新作的计划会在演示甘休后去掉。)

TEST#sh vlan        #
突显已经局部vlan音讯,并且同时浮现了各端口所属的vlan

图片 1图片 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号段,这几个不必理会。

图片 3图片 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)#?

图片 5图片 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的连锁新闻

图片 7图片 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音信

 

图片 9图片 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中并未别的端口。  

图片 11图片 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                                                  #
退出来证贝拉米下

 

图片 13图片 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

图片 15图片 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的相关音讯。

图片 17图片 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的端口新闻了。

图片 19图片 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接口的端口下联的是接入层(或者是会聚层)的调换机。

 

图片 21图片 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,先出示一下。

图片 23图片 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

 

图片 25图片 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

 

相关文章