网络通信 频道

配置示例:Catalyst 2900XL/3500XL/2950

cat5509> (enable) set int sc0 10.10.10.3/24
Interface sc0 IP address and netmask set.


!--- 设置VTP 模式。
!--- 在本例中,
!--- 我们将VTP模式设置为透明;
!--- 根据您的网络,
!--- 设置相应的VTP模式。



cat5509> (enable) set vtp mode transparent
VTP domain modified


!--- 有关VTP的详细信息,请参考以下文件:
!---
在Catalyst 4000、 5000交换机上配置VLAN中继
!--- 添加Vlan 2,并给它分配端口。


cat5509> (enable) set vlan 2 3/2
Vlan 2 configuration successful
VLAN 2 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
2     3/2


!--- 在连接到工作站的端口上激活快速端口。


cat5509> (enable) set spantree portfast 3/2 enable
warning 
警告:?/B>应只在与单一主机相连的端口上激活
Spantree port fast start (Spantree端口快速启动)功能。
将集线器、集中器、交换机、网桥等与快速启动端口相连可引起暂时性的生成树环路,
因此要谨慎使用。
Spantree port 3/2 fast start enabled.
 cat5509> (enable) set spantree portfast 3/3 enable
 

warning 警告:?/B>只应在与单一主机相连的端口上激活Spantree port fast start
(Spantree端口快速启动)功能。将集线器、集中器、交换机、
网桥等与快速启动端口相连可引起暂时性的生成树环路,因此要谨慎使用。

Spantree port 3/3 fast start enabled.
 
 
 
 !--- 如何激活快速端口的详细信息,请参考以下文件:
 !--- 使用 Portfast 和其它命令来解决工作站启动连接延迟问题
 
 !--- 将中继封装设置为ISL或 802.1q。
 
 
 cat5509> (enable) set trunk 3/1 nonegotiate isl
 Port(s) 3/1 trunk mode set to nonegotiate.
 Port(s) 3/1 trunk type set to Isl.
 cat5509> (enable)
 
 
 !--- 如果您想要配置802.1q中继,
 !--- 则键入以下命令:
 
 
 cat5509> (enable) set trunk 3/1 nonegotiate dot1q
 
 
 
 !--- 在dot1q中,您需要确保
 !--- 本地VLAN与该链路匹配。
 !--- 对于cat5500,默认情况下其本地VLAN为1。
 !--- 根据网络需要,您可以将
 !--- 本地VLAN改成其它的VLAN,
 !--- 不过,重要的是您必须在链路的另一端
 !--- 相应地更改本地VLAN(本例中是3524xl)。
 !--- 如果需要地话,您可以通过使用以下命令来更改本地VLAN:
 !--- cat5509> (enable) set vlan <vlan ID> <mod/port>
 !--- 这里 是新的本地Vlan , 是中继端口;本例是3/1。
 
 

注意:?/B>Catalyst 2900XL/3500XL 交换机目前不支持动态中继协议 (DTP)。
因此,我们建议在中继链路的 other(另一端) 使用 nonegotiate 选项,
如上面Catalyst 4000、5000 和 6000 交换机上的配置一样。
这样,XL 交换机端口就不会接收不熟悉的 DTP 帧。有关 DTP modes 的详细信息,
请参阅 DTP modes, refer to the DTP Modes sections of
使用802.1q 封装的Catalyst 4000、5000 和 6000 系列交换机间中继的DTP 模式

cat5509> (enable) show config
 This command shows non-default configurations only.
 Use ''show config all'' to show both default and non-default 
configurations. ........ .................. .. begin ! # ***** NON-DEFAULT CONFIGURATION ***** ! ! #time: Sun Nov 26 2000, 18:19:45 ! #version 5.5(3) ! set enablepass $2$FNl3$8MSzcpVMg1H2aWfll13aZ. ! #system set system name cat5509 ! #frame distribution method set port channel all distribution mac both ! #vtp set vtp mode transparent set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 2 name VLAN0002 type ethernet mtu 1500 said 100002 state active set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp ieee set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibm set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state acti ve mode srb aremaxhop 7 stemaxhop 7 backupcrf off ! #ip set interface sc0 1 10.10.10.3/255.255.255.0 10.10.10.255 ! #set boot command set boot config-register 0x2 set boot system flash bootflash:cat5000-sup3.5-5-2.bin set boot system flash bootflash:cat5000-sup3.5-5-3.bin ! #mls set mls nde disable ! # default port status is enable ! ! #module 1 : 4-port 10/100BaseTX Supervisor ! #module 2 : 3-port 1000BaseX Ethernet ! #module 3 : 24-port 10/100BaseTX Ethernet set vlan 2 3/2 set trunk 3/1 nonegotiate isl 1-1005 !--- 如果配置的是dot1q中继, !--- 那么上一行将显示为: !--- set trunk 3/1 nonegotiate dot1q 1-1005 set spantree portfast 3/2-3 enable ! #module 4 empty ! #module 5 empty ! #module 6 : 24-port 10BaseF Ethernet ! #module 7 empty ! #module 8 : 24-port 10/100BaseTX Ethernet ! #module 9 empty end cat5509> (enable)

 

[page]

检验

debug 和show 命令

本节所提供的信息可用于确认您的配置是否能正常运行。

Output Interpreter(输出翻译器)工具支持某些 show c命令,您可以通过这些工具查看 show 命令输出的分析信息。

在 Catalyst 2900XL/3500XL/2950 交换机上:

  • show int {FastEthernet | GigabitEthernet} <module/port> switchport

  • show vlan

  • show vtp status

在 Catalyst 5000 交换机上:

  • show port capabilities <module/port>

  • show port <module/port>

  • show trunk <module/port>

  • show vtp domain

Sample show 命令输出

Catalyst 3500XL 交换机

show int {FastEthernet | GigabitEthernet} <module/port> switchport

此命令用来检查端口的管理和运行状态,还用来保证中继两端的本地VLAN互相匹配。本地VLAN在端口处于802.1q中继模式时用于未标记业务。有关本地VLAN的更多信息请参阅 在Catalyst 2900XL和3500XL交换机上配置VTP、VLAN和VLAN中继

3524xl#show int fastEthernet 0/1 switchport 
 Name: Fa0/1
 Switchport: Enabled
 Administrative mode: trunk
 Operational Mode: trunk
 Administrative Trunking Encapsulation: isl
 Operational Trunking Encapsulation: isl
 Negotiation of Trunking: Disabled
 Access Mode VLAN: 0 ((Inactive))
 Trunking Native Mode VLAN: 1 (default)
 Trunking VLANs Enabled: ALL
 Trunking VLANs Active: 1,2
 Pruning VLANs Enabled: 2-1001
 
 Priority for untagged frames: 0
 Override vlan tag priority: FALSE
 Voice VLAN: none
 Appliance trust: none
 

注意:?/B>对于 802.1q 中继,上述命令的输出变化如下:

3524xl#show int fastEthernet 0/1 switchport 
 Name: Fa0/1
 Switchport: Enabled
 Administrative mode: trunk
 Operational Mode: trunk
 Administrative Trunking Encapsulation: dot1q
 Operational Trunking Encapsulation: dot1q
 Negotiation of Trunking: Disabled
 Access Mode VLAN: 0 ((Inactive))
 Trunking Native Mode VLAN: 1 (default)
 Trunking VLANs Enabled: ALL
 Trunking VLANs Active: 1,2
 Pruning VLANs Enabled: 2-1001
 
 Priority for untagged frames: 0
 Override vlan tag priority: FALSE
 Voice VLAN: none
 
 

show vlan

此命令用于验证接口(端口)是否属于正确的VLAN。在该例中,只有接口Fa0/2属于VLAN 2,而其他接口属于VLAN 1。
3524xl#show vlan
VLAN Name                       Status    Ports
---- ------------------------ --------- -------------------------------
1    default                    active    Fa0/3, Fa0/4, Fa0/5, Fa0/6,
                                          Fa0/7, Fa0/8, Fa0/9, Fa0/10,
                                          Fa0/11, Fa0/12, Fa0/13,Fa0/14,
                                          Fa0/15, Fa0/16, Fa0/17,Fa0/18,
                                          Fa0/19, Fa0/20, Fa0/21,Fa0/22,
                                          Fa0/23, Fa0/24, Gi0/1, Gi0/2
2    VLAN0002                   active    Fa0/2
1002 fddi-default               active   
1003 token-ring-default         active   
1004 fddinet-default            active   
1005 trnet-default              active   

...(output suppressed)

show vtp status

此命令用于验证交换机上的VTP配置。在该例中使用了 transparent mode。 正确的VTP模式取决于网络拓扑结构。有关VTP的详细信息,请参阅 在Catalyst 2900XL和3500XL交换机上配置VTP、VLAN和VLAN中继
3524xl#show vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 254
Number of existing VLANs        : 6
VTP Operating Mode              : Transparent
VTP Domain Name                 :
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x74 0x79 0xD3 0x08 0xC0 0x82 0x68 0x63
Configuration last modified by 10.10.10.2 at 3-1-93 00:05:30

CatOS 交换机

show port capabilities <module/port>

此命令用于验证端口是否具有中继功能:
cat5509 show port capabilities 3/1
Model                    WS-X5234
Port                     3/1
Type                     10/100BaseTX
Speed                    auto,10,100
Duplex                   half,full
Trunk encap type         802.1Q,ISL
Trunk mode               on,off,desirable,auto,nonegotiate
Channel                  3/1-2,3/1-4
Broadcast suppression    percentage(0-100)
Flow control             receive-(off,on),send-(off,on)
Security                 yes
Membership               static,dynamic
Fast start               yes
QOS scheduling           rx-(none),TX(1q4t)
COs rewrite              yes
ToS rewrite              IP-Precedence
Rewrite                  yes
UDLD                     yes
AuxiliaryVlan            1..1000,untagged,dot1p,none
SPAN                     source,destination

show port <module/port>
cat5509> (enable) show port 3/1

Port  Name           Status     Vlan       Level  Duplex Speed Type
----- ----------- ---------- --------   ------ ------ ----- ----------
3/1                connected  trunk     normal a-full a-100 10/100BaseTX

Port  AuxiliaryVlan AuxVlan-Status
----- ------------- --------------
  3/1  none          none         


Port  Security Violation Shutdown-Time Age-Time Max-Addr Trap     IfIndex
----- -------- --------- ------------ -------- -------- -------- -------
  3/1  disabled  shutdown          0        0        1 disabled      12

Port  Num-Addr Secure-Src-Addr   Age-Left Last-Src-Addr     Shutdown/Time-Left
----- -------- ----------- -------- ----------------- ------------------
  3/1         0                 -        -         -        -       -

...(output suppressed)

show trunk <module/port>

此命令用于验证中继状态和配置。
cat5509> (enable) show trunk
* - indicates vtp domain mismatch
Port      Mode         Encapsulation  Status        Native vlan
--------  -----------  -------------  ------------  -----------
3/1      nonegotiate  isl            trunking      1

Port      Vlans allowed on trunk
--------  -----------------------------------------------------------
  3/1      1-1005

Port      Vlans allowed and active in management domain
--------  ----------------------------------------------------------
3/1      1-2

Port      Vlans in spanning tree forwarding state and not pruned
--------  -----------------------------------------------------------
3/1      1-2

注意:?/B>对于802.1q中继,上述命令的输出变化如下:
cat5509> (enable) show trunk
* - indicates vtp domain mismatch
Port      Mode         Encapsulation  Status        Native vlan
--------  -----------  -------------  ------------  -----------
3/1      nonegotiate  dot1q          trunking      1

Port      Vlans allowed on trunk
--------  ---------------------------------------------------------
  3/1      1-1005

Port      Vlans allowed and active in management domain
--------  ----------------------------------------------------------
3/1      1-2

Port      Vlans in spanning tree forwarding state and not pruned
--------  ----------------------------------------------------------
3/1      1-2

show vtp domain
cat5509> (enable) show vtp domain
DomainName                      Domain Index VTP Version Local Mode  Password
----------------------- ------------ ----------- ----------- ----------
                                 1            2           Transparent -

Vlan-count Max-vlan-storage Config Revision Notifications
---------- ---------------- --------------- -------------
6          1023             0               disabled

Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
--------------- -------- -------- -------------------------
10.10.10.3      disabled disabled 2-1000

0
相关文章