介紹
本文提供Cisco Catalyst 5500與Catalyst 3500XL交換機(jī)之間InterSwitch Link (ISL)和802.1q中繼的配置示例,執(zhí)行命令時(shí)顯示每個(gè)命令的結(jié)果。為了獲得相同的結(jié)果,可在本文所說明的方案中使用Cisco Catalyst 4000和6000(運(yùn)行CatOS)系列交換機(jī)或Catalyst 5000系列中的其他交換 機(jī)以及任何 Catalyst 2900XL、3500XL或2950交換機(jī)。
所使用組件
在本文的示例中,我們?cè)趯?shí)驗(yàn)室環(huán)境中使用以下交換機(jī)和清除(缺省)配置:
-
運(yùn)行Cisco IOS 12.0(5.x)XU的Catalyst 3524XL交換機(jī)
-
運(yùn)行Catalyst OS 5.5(3)軟件的Catalyst 5500交換機(jī)
本文所包含的信息基于特定 實(shí)驗(yàn)室環(huán)境 中的設(shè)備。 在使用任何配置或命令之前,您必須確保由此可能對(duì)網(wǎng)絡(luò)帶來的潛在影響。所有設(shè)備上的配置通過 clear config all 和 write erase 命令來清除,從而確保默認(rèn)配置。
基礎(chǔ)理論
中繼是在兩個(gè)設(shè)備之間點(diǎn)到點(diǎn)鏈路傳輸來自若干 VLAN的業(yè)務(wù)的一種方式。 執(zhí)行以太網(wǎng)中繼的方法有如下兩種:
-
ISL (Cisco 專有 InterSwitch 鏈路協(xié)議)
-
802.1q (電氣電子工程師協(xié)會(huì) (IEEE) 標(biāo)準(zhǔn))
我們將建立一條中繼,通過 Catalyst 3500 和 Catalyst 5500 交換機(jī)之間的單一鏈路來傳輸來自2個(gè)VLAN (VLAN 1 和 VLAN 2) 的業(yè)務(wù)。如何在2個(gè)VLAN 之間選路由不屬于本文討論范圍。
重要提示
對(duì)于 Catalyst 2900XL/3500XL/2950 交換機(jī):
Catalyst 2950 系列交換機(jī)只支持802.1q中繼,而不支持ISL中繼。
Catalyst 2900XL/3500XL 交換機(jī)目前不支持動(dòng)態(tài)中繼協(xié)議 (DTP)。 因此,我們建議在中繼鏈路的 other(另一端) 使用 nonegotiate 選項(xiàng),如同 Catalyst 4000、5000 和 6000 交換機(jī)上的配置一樣。這樣,XL 交換機(jī)端口就不會(huì)接收不熟悉的 DTP 幀。
在 4MB DRAM Catalyst 2900XL 交換機(jī)上,只有配備以下具有中繼功能的模塊時(shí)才支持中繼:
-
WS-X2914-XL-V
-
WS-X2922-XL-V
-
WS-X2924-XL-V
-
WS-X2931-XL
-
WS-X2932-XL
有關(guān)當(dāng)前支持中繼的交換型號(hào),請(qǐng)參閱下表:
交換機(jī)型號(hào) |
ISL中繼所要求的最低版本 |
IEEE802.1q中繼所要求的最低版本 |
中繼(ISL/802.1q )所要求的當(dāng)前版本 |
---|---|---|---|
WS-C2916M-XL (4-Meg Switch) |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
11.2(8.6)SA6 (原始版本) |
WS-C2912-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) 或更高版本 |
WS-C2924-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) 或更高版本 |
WS-C2924C-XL |
11.2(8)SA4 (Enterprise Edition) |
11.2(8)SA5 (企業(yè)版) |
12.0(5)WC(1) 或更高版本 |
WS-C2924M-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) 或更高版本 |
WS-C2912MF-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) 或更高版本 |
WS-C2924M-XL-DC |
12.0(5)XU |
12.0(5)XU |
12.0(5)WC(1) 或更高版本 |
WS-C3508G-XL |
11.2(8)SA4 (Enterprise Edition) |
11.2(8)SA5 (企業(yè)版) |
12.0(5)WC(1) 或更高版本 |
WS-C3512-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) or later |
WS-C3524-XL |
11.2(8)SA4 (企業(yè)版) |
11.2(8)SA5 (原始版本) |
12.0(5)WC(1) 或更高版本 |
WS-C3548-XL |
12.0(5)XP (企業(yè)版) |
12.0(5)XP (企業(yè)版) |
12.0(5)WC(1) 或更高版本 |
WS-C3524-PWR-XL |
12.0(5)XU |
12.0(5)XU |
12.0(5)WC(1) 或更高版本 |
WS-C3524-PWR-XL |
12.0(5)XU |
12.0(5)XU |
12.0(5)WC(1) 或更高版本 |
WS-C2950-12 |
不支持ISL |
12.0(5)WC(1) |
802.1Q 要求12.0(5)WC(1)或更高版本,不支持ISL |
WS-C2950-24 |
不支持ISL |
12.0(5)WC(1) |
802.1Q 要求12.0(5)WC(1)或更高版本,不支持ISL |
WS-C2950C-24 |
不支持ISL |
12.0(5)WC(1) |
802.1Q要求12.0(5)WC(1)或更高版本,不支持ISL |
WS-C2950T-24 |
不支持ISL |
12.0(5)WC(1) |
802.1Q要求12.0(5)WC(1)或更高版本,不支持ISL |
注意:?/B>在上表中,只有WS-C2916M-XL是4MB DRAM交換機(jī)。所列的所有其他交換機(jī)均為8MB DRAM 交換機(jī)。若要確定您的交換機(jī)的DRAM4為MB還是8 MB,請(qǐng)輸入用戶級(jí) show version 命令。 有關(guān)更多信息,請(qǐng)參閱: 使用命令行界面(CLI)升級(jí)Catalyst 2900-XL/3500-XL 交換機(jī)軟件 (CLI)一文的"如何通過命令行界面確定交換機(jī)內(nèi)存容量"部分。
[page]
對(duì)于 Catalyst 4000, 5000, 6000 交換機(jī):
-
Catalyst 4000系列(包括Catalyst 2948G和Catalyst 2980G)只支持802.1q中繼,而不支持ISL中繼。
-
Catalyst 6000系列交換機(jī)上的任何以太網(wǎng)端口支持802.1q或ISL封裝。
-
具有中繼能力的Catalyst 5000端口根據(jù)模塊的不同只支持ISL封裝或ISL和802.1q中的任意一個(gè)。檢查這一項(xiàng)的最佳辦法是使用 show port capabilities 命令;中繼容量是明確規(guī)定的,例如:
cat5509 show port capabilities 3 Model WS-X5234 Port 3/1 Type 10/100BaseTX Speed auto,10,100 Duplex half,full Trunk encap type 802.1Q,ISL !-- 該端口支持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
-
確保整個(gè)中繼鏈路范圍內(nèi)的中繼模式匹配。若鏈路的一端配置為ISL中繼,則鏈路的另一端也應(yīng)配置為ISL;同樣,若鏈路的一端配置為802.1q,則鏈路的另一端也要配置為802.1q。
配置
本節(jié)說明如何配置本文描述的各種特性。
注意:?/B>若要了解有關(guān)本文中所使用命令的更多信息,請(qǐng)使用 Command Lookup 工具。
網(wǎng)絡(luò)圖
本文使用下圖所示的網(wǎng)絡(luò)設(shè)置。
配置
以下配置適用于這些交換機(jī):
-
為交換機(jī)分配的名稱
-
在交換機(jī)上設(shè)置的口令
-
通過快速以太網(wǎng)鏈路連接的交換機(jī)
-
只為了便于管理而向交換機(jī)分配的IP 地址
-
交換機(jī)上設(shè)置的VLAN 中繼協(xié)議 (VTP) 模式
-
交換機(jī)上添加第二個(gè) VLAN (VLAN 2) ;在這些 VLAN 上添加端口
-
在連接工作站的端口上激活Spanning-tree portfast (生成樹 portfast),根據(jù)拓?fù)浣Y(jié)構(gòu),啟用Catalyst 5500 上端口 2/2, 2/3上的Spanning-tree portfast,以及Catalyst 3524XL上端口FastEthernet0/2 和端口FastEthernet0/3 上的Spanning-tree portfast
注意:?/B>下面屏幕內(nèi)容顯示了在3524XL 交換機(jī)上輸入的命令。命令之間的評(píng)語(yǔ)以 blue italics(蘭色斜體字) 添加進(jìn)去的,以解釋特定命令和步驟:
Catalyst 3524-XL |
---|
!--- 設(shè)置特權(quán)模式 !--- 和交換機(jī)的Telnet口令 switch#configure terminal Enter configuration commands, one per line..End with CNTL/Z. switch(config)#hostname 3524xl 3524xl(config)#enable password mysecret 3524xl(config)#line vty 0 4 3524xl(config-line)#login 3524xl(config-line)#password mysecret 3524xl(config-line)#exit 3524xl(config)#no logging console 3524xl(config)#^Z !--- 為了管理,設(shè)置Vlan 1 的IP地址。 3524xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3524xl(config)#int vlan 1 3524xl(config-if)#ip address 10.10.10.2 255.255.255.0 3524xl(config-if)#end !--- 設(shè)置VTP 模式。 !--- 本例中,我們將該模式設(shè)置為透明。 !--- 根據(jù)您的網(wǎng)絡(luò)來設(shè)置相應(yīng)的VTP模式。 !--- VTP的詳細(xì)信息,請(qǐng)參考以下文件: !--- 在Catalyst 2900XL和3500XL交換機(jī)上配置VTP、VLANs和VLAN中繼 。 3524xl#vlan database 3524xl(vlan)#vtp transparent Setting device to VTP TRANSPARENT mode. !--- 正在添加Vlan 2 3524xl(vlan)#vlan 2 VLAN 2 added: Name: VLAN0002 3524xl(vlan)#exit APPLY completed. Exiting.... !--- 激活快速以太網(wǎng)接口 0/1上的中繼. 3524xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3524xl(config)#int fastEthernet 0/1 3524xl(config-if)#switchport mode trunk !--- 輸入isl 或dot1q中繼封裝。 3524xl(config-if)#switchport trunk encapsulation isl 3524xl(config-if)#switchport trunk encapsulation dot1q !--- 在2950交換機(jī)中不能使用上述兩個(gè) switchport 命令。 !--- 2950交換機(jī)只支持802.1q封裝,使用switchport mode trunk !--- 命令激活接口上的中繼之后,該封裝將被自動(dòng)配置。 !---在dot1q封裝中,您需要確保 !--- 本地VLAN與該鏈路匹配。 !--- 對(duì)于3524XL,默認(rèn)情況下其本地VLAN為1。 !--- 根據(jù)網(wǎng)絡(luò)需要,您可以將 !--- 本地VLAN改成其它的VLAN, !--- 不過,重要的是您必須在鏈路的另一端 !--- 相應(yīng)地更改本地VLAN(本例中是cat5509)。 !--- 如果需要的話,您可以通過使用以下命令來更改本地VLAN: !--- 3524xl(config-if)#switchport trunk native vlan <vlan ID> . !--- 支持中繼線上的所有VLAN 3524xl(config-if)#switchport trunk allowed vlan all 3524xl(config-if)#exit !--- 以下這套命令將把FastEthernet 0/2接口 0/2 !--- 分配給vlan 2,并激活接口上的快速端口。 3524xl(config)#int fastEthernet 0/2 3524xl(config-if)#switchport access vlan 2 3524xl(config-if)#spanning-tree portfast 3524xl(config-if)#exit 3524xl(config)#int fastEthernet 0/3 3524xl(config-if)#spanning-tree portfast 3524xl(config-if)#^Z !-- 在關(guān) 如何激活快速端口的詳細(xì)信息, !--- 請(qǐng)參考:使用 Portfast 和其它命令來解決工作站啟動(dòng)連接延遲問題 !--- 請(qǐng)記住保存配置 !--- (您不必在CatOS 交換機(jī)上保存配置)。 3524xl#write memory Building configuration... 3524xl# 3524xl#show running-config Building configuration... Current configuration: ! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname 3524xl ! no logging console enable password mysecret ! ! ! ! ! ip subnet-zero ! ! ! interface FastEthernet0/1 switchport mode trunk ! !--- 如果配置的是802.1q, !--- 那么您將在FastEthernet0/1接口上 !--- 看到以下輸出: !--- interface FastEthernet0/1 !--- switchport trunk encapsulation dot1q !--- switchport mode trunk ! interface FastEthernet0/2 switchport access vlan 2 spanning-tree portfast ! interface FastEthernet0/3 spanning-tree portfast ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16 ! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 ! interface GigabitEthernet0/1 ! interface GigabitEthernet0/2 ! interface VLAN1 ip address 10.10.10.2 255.255.255.0 no ip directed-broadcast no ip route-cache ! ! line con 0 transport input none stopbits 1 line vty 0 4 password mysecret login line vty 5 15 login ! end |
注意:?/B>以下屏幕內(nèi)容顯示了在5500交換機(jī)上輸入的命令。為了說明某些命令和步驟,在命令之間用蘭色斜體字添加了評(píng)語(yǔ)。
Catalyst 5500 |
---|
!--- 設(shè)置交換機(jī)的系統(tǒng)名稱和口令。 Console> (enable) set system name cat5509 System name set. cat5509> (enable) set password Enter old password: Enter new password: Retype new password: Password changed. cat5509> (enable) set enablepass Enter old password: Enter new password: Retype new password: Password changed. !--- 給交換機(jī)分配IP地址。 cat5509> (enable) set int sc0 10.10.10.3/24 Interface sc0 IP address and netmask set. !--- 設(shè)置VTP 模式。 !--- 在本例中, !--- 我們將VTP模式設(shè)置為透明; !--- 根據(jù)您的網(wǎng)絡(luò), !--- 設(shè)置相應(yīng)的VTP模式。 cat5509> (enable) set vtp mode transparent VTP domain modified !--- 有關(guān)VTP的詳細(xì)信息,請(qǐng)參考以下文件: !--- 在Catalyst 4000、 5000交換機(jī)上配置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 警告:?/B>應(yīng)只在與單一主機(jī)相連的端口上激活 Spantree port 3/2 fast start enabled. cat5509> (enable) set spantree portfast 3/3 enable 警告:?/B>只應(yīng)在與單一主機(jī)相連的端口上激活Spantree port fast start Spantree port 3/3 fast start enabled. !--- 如何激活快速端口的詳細(xì)信息,請(qǐng)參考以下文件: !--- 使用 Portfast 和其它命令來解決工作站啟動(dòng)連接延遲問題 !--- 將中繼封裝設(shè)置為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與該鏈路匹配。 !--- 對(duì)于cat5500,默認(rèn)情況下其本地VLAN為1。 !--- 根據(jù)網(wǎng)絡(luò)需要,您可以將 !--- 本地VLAN改成其它的VLAN, !--- 不過,重要的是您必須在鏈路的另一端 !--- 相應(yīng)地更改本地VLAN(本例中是3524xl)。 !--- 如果需要地話,您可以通過使用以下命令來更改本地VLAN: !--- cat5509> (enable) set vlan <vlan ID> <mod/port> !--- 這里 注意:?/B>Catalyst 2900XL/3500XL 交換機(jī)目前不支持動(dòng)態(tài)中繼協(xié)議 (DTP)。 cat5509> (enable) show config This command shows non-default configurations only. Use 'show config all' to show both default and non-default |
[page]
檢驗(yàn)
debug 和show 命令
本節(jié)所提供的信息可用于確認(rèn)您的配置是否能正常運(yùn)行。
Output Interpreter(輸出翻譯器)工具支持某些 show c命令,您可以通過這些工具查看 show 命令輸出的分析信息。
在 Catalyst 2900XL/3500XL/2950 交換機(jī)上:
-
show int {FastEthernet | GigabitEthernet} <module/port> switchport
-
show vlan
-
show vtp status
在 Catalyst 5000 交換機(jī)上:
-
show port capabilities <module/port>
-
show port <module/port>
-
show trunk <module/port>
-
show vtp domain
Sample show 命令輸出
Catalyst 3500XL 交換機(jī)
show int {FastEthernet | GigabitEthernet} <module/port> switchport
此命令用來檢查端口的管理和運(yùn)行狀態(tài),還用來保證中繼兩端的本地VLAN互相匹配。本地VLAN在端口處于802.1q中繼模式時(shí)用于未標(biāo)記業(yè)務(wù)。有關(guān)本地VLAN的更多信息請(qǐng)參閱 在Catalyst 2900XL和3500XL交換機(jī)上配置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>對(duì)于 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
此命令用于驗(yàn)證接口(端口)是否屬于正確的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
此命令用于驗(yàn)證交換機(jī)上的VTP配置。在該例中使用了 transparent mode。 正確的VTP模式取決于網(wǎng)絡(luò)拓?fù)浣Y(jié)構(gòu)。有關(guān)VTP的詳細(xì)信息,請(qǐng)參閱 在Catalyst 2900XL和3500XL交換機(jī)上配置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 交換機(jī)
show port capabilities <module/port>
此命令用于驗(yàn)證端口是否具有中繼功能:
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>
熱詞搜索:
上一篇:使用 RGMP: 基礎(chǔ)內(nèi)容與案例分析
下一篇:端口映射的幾種實(shí)現(xiàn)方法