




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、3560客戶中文配置手冊 第1章 概述 1-1 1.1 概述 1-1 1.2 初次訪問設(shè)備 1-2 1.2.1 通過Console口訪問設(shè)備 1-2 第2章 命令行方式訪問設(shè)備 2-1 2.1.1 命令行模式 2-1 2.1.2 基本設(shè)置命令 2-1 2.2 通過Console口進(jìn)入命令行接口 2-2 2.3 通過Telnet進(jìn)入命令行接口 2-2 第3章 接口配置 3-1 3.1 概述 3-1 3.2 二層口配置 3-1 3.2.1 配置端口速率及雙工模式 3-1 3.3 配置一組端口 3-2 3.4 配置三層口 3-3 3.5 監(jiān)控及維護(hù)端口 3-5 3.5.1 監(jiān)控端口和控制器的狀態(tài) 3
2、-5 3.5.2 刷新、重置端口及計(jì)數(shù)器 3-7 3.5.3 關(guān)閉和打開端口 3-8 3.6 交換機(jī)端口鏡像配置 3-9 3.6.1 創(chuàng)建一個(gè)本地SPAN會(huì)話 3-10 3.7 以太通道端口組(Ethernet Port Groups) 3-11 第4章 配置VLAN 4-12 4.1 簡介 4-12 4.2 可支持的VLAN 4-12 4.3 配置正常范圍的VLAN 4-12 4.3.1 刪除VLAN 4-14 4.3.2 將端口分配給一個(gè)VLAN 4-15 4.4 配置VLAN Trunks 4-16 4.5 配置VTP DOMAIN 4-18 4.6 配置VLAN接口地址 4-18 第5
3、章 交換機(jī)HSRP配置 5-1 第6章 路由協(xié)議配置 6-3 6.1.1 靜態(tài)路由 6-3 6.1.2 RIP路由 6-3 6.1.3 OSPF路由 6-5 第1章 概述 1.1 概述 3560交換機(jī)是支持二層、三層功能的交換機(jī),共分為EMI,SMI兩個(gè)版本 Enhanced Multilayer Software Image增強(qiáng)多層軟件鏡像軟件 (EMI ? EMI提供了一組更加豐富的企業(yè)級(jí)功能,包括基于硬件的高級(jí)IP單播和多播路由。 ? 支持雙機(jī)熱備(HSRP,OSPF路由功能. Standard Multilayer Software Image標(biāo)準(zhǔn)多層軟件鏡像軟件(SMI ? SMI功
4、能集包括高級(jí)QoS、速率限制、訪問控制列表(ACL),以及基本的靜態(tài)和路由信息協(xié)議(RIP)路由功能 支持VLAN ? 到1005 個(gè)VLAN ? 支持VLAN ID從1到4094( IEEE 802.1Q 標(biāo)準(zhǔn)) ? 支持ISL及IEEE 802.1Q封裝 安全 ? 支持IOS標(biāo)準(zhǔn)的密碼保護(hù) ? 靜態(tài)MAC地址映射 ? 標(biāo)準(zhǔn)及擴(kuò)展的訪問列表支持,對(duì)于路由端口支持入出雙向的訪問列表,對(duì)于二層端口支持入的訪問列表 ? 支持基于VLAN的訪問列表 3層支持(需要多層交換的IOS) ? HSRP ? IP路由協(xié)議 o RIPversions 1 and 2 o OSPF o IGRP及EIGRP o
5、 BGPVersion 4 支持以下SFP模塊: ? 1000BASE-T SFP: 銅線最長100 m ? 1000BASE-SX SFP: 光纖最長1804 feet (550 m ? 1000BASE-LX/LH SFP: 光纖最長32,808 feet (6 miles or 10 km ? 1000BASE-ZX SFP: 光纖最長328,084 feet (62 miles or 100 km 管理 從用戶與設(shè)備交互的特點(diǎn)來分,訪問設(shè)備的方式可以分為命令行方式和Web方式。 l 命令行方 式:包括從Console口登錄進(jìn)行訪問和通過Telnet登錄進(jìn)行訪問; l Web方式:包括通
6、過HTTP進(jìn)行的普通Web訪問。 1.2 初次訪問設(shè)備 1.2.1 通過Console口訪問設(shè)備 用戶接收到除去包裝的新設(shè)備后一般通過Console口第一次登錄設(shè)備并開始對(duì)設(shè)備進(jìn)行配置,過程如下: 第一步:建立本地配置環(huán)境,只需將計(jì)算機(jī)(或終端)的串口通過標(biāo)準(zhǔn)RS-232電纜與此Catalyst 3560設(shè)備的Console口連接 第二步:在計(jì)算機(jī)上運(yùn)行終端仿真程序(如WinXP的超級(jí)終端等),設(shè)置終端通信參數(shù)為9600bps、8位數(shù)據(jù)位、1位停止位、無奇偶校驗(yàn)和無流量控制,如圖1-1至圖1-3所示。 圖1-1 新建連接 圖1-2 連接端口設(shè)置 圖1-3 端口通信參數(shù)設(shè)置 第四步:Cataly
7、st 3560設(shè)備上電自檢,出現(xiàn)命令行提示符,如:Switch。 此時(shí)用戶已經(jīng)進(jìn)入到設(shè)備命令行配置接口的用戶模式,從這里開始就可以參考本手冊其余章節(jié)對(duì)設(shè)備進(jìn)行配置。 第2章 命令行方式訪問設(shè)備 如果用戶通過Console口登錄,或者通過Telne從設(shè)備管理口登錄都將進(jìn)入到設(shè)備的命令行接口,對(duì)系統(tǒng)的配置和交互都通過命令行的方式進(jìn)行。 2.1.1 命令行模式 命令行接口提供的命令行視圖和各視圖的功能特性、進(jìn)入各視圖的命令等的細(xì)則如表2-1所示。 表2-1 命令視圖功能特性列表 模式 功能 提示符 進(jìn)入命令 退出命令 非特權(quán)模式 查看CISCO 設(shè)備的簡單運(yùn)行狀態(tài) Switch 開機(jī)時(shí)自動(dòng)進(jìn)入 特權(quán)
8、模式 配置系統(tǒng)參數(shù),升級(jí)IOS軟件,備份配置文件 Switch# 在非特權(quán)模式下鍵入ENABLE quit返回非特權(quán)模式 全局模式 CISCO交換機(jī)大部分配置都是在這個(gè)模式下進(jìn)行 Switch(config# 在特權(quán)模式下鍵入configure terminal quit返回特權(quán)模式 監(jiān)控模式 升級(jí)IOS系統(tǒng)軟件 Switch: 開機(jī)時(shí)摁住面板上的MODE鍵約5秒鐘 2.1.2 基本設(shè)置命令 基本設(shè)置命令 任務(wù) 命令 全局設(shè)置 config terminal 設(shè)置訪問用戶及密碼 Username username password password 設(shè)置特權(quán)密碼 enable secret p
9、assword 設(shè)置路由器名 Hostname name 設(shè)置靜態(tài)路由 ip route destination subnet-mask next-hop 啟動(dòng)IP路由 ip routing 啟動(dòng)IPX路由 ipx routing 端口設(shè)置 interface type slot/number 設(shè)置IP地址 ip address address subnet-mask 設(shè)置IPX網(wǎng)絡(luò) ipx network network 激活端口 no shutdown 物理線路設(shè)置 line type number 啟動(dòng)登錄進(jìn)程 login local|tacacs server 設(shè)置登錄密碼 Passw
10、ord password 顯示命令 任務(wù) 命令 查看版本及引導(dǎo)信息 show version 查看運(yùn) 行設(shè)置 show running-config 查看開機(jī)設(shè)置 show startup-config 顯示端口信息 show interface type slot/number 顯示路由信息 show ip route 2.2 通過Console口進(jìn)入命令行接口 詳細(xì)內(nèi)容請參見“1.2.1 通過Console口訪問設(shè)備”。 2.3 通過Telnet進(jìn)入命令行接口 Telnet協(xié)議在TCP/IP協(xié)議族中屬于應(yīng)用層協(xié)議,通過網(wǎng)絡(luò)提供遠(yuǎn)程登錄和虛擬終端功能。CATALYST 3560向用戶提供Te
11、lnet服務(wù), 第一步:在計(jì)算機(jī)上運(yùn)行Telnet程序,鍵入CATALYST 3560設(shè)備管理IP地址 Switchenable Switch#conf t Switch(config# interface vlan 1 Switch(config-if#ip address 0 Switch(config-if#no shutdown Switch(config-if#exit Switch(config#line vty 0 4 Switch(configline#login Switch(configline#password cisco 如圖
12、2-1所示。 圖2-1 與CATALYST 3560建立Telnet連接 & 說明: 圖2-1中的IP地址為CATALYST 3560設(shè)備IP地址,即vlan1的接口地址 第3章 接口配置 3.1 概述 Catalyst 3560支持的以太網(wǎng)接口說明請見下表。 表3-1 Catalyst 3560接口說明 項(xiàng)目 說明 接口類型 FE電接口:符合100Base-TX物理層規(guī)范 GE電接口:1000Base-TX物理層規(guī)范 工作速率 FE電 接口可以選擇10Mbit/s、100Mbit/s兩種速率 GE電接口可以選擇10Mbit/s、100Mbit/s、1000Mbit/s三種速率 工作模式 自動(dòng)
13、協(xié)商模式 3.2 二層口配置 3560的所有端口缺省的端口都是二層口,如果此端口已經(jīng)配置成三層端口的話,則需要用switchport來使其成為二層端口。 3.2.1 配置端口速率及雙工模式 1. 可以配置快速以太口的速率為10/100Mbps及千兆以太口的速率為10/100/1000-Mbps; 但對(duì)于SFP端口則不能配置速率及雙工模式,有時(shí)可以配置nonegotiate,當(dāng)需要聯(lián)接不支持自適應(yīng)的其它千兆端口時(shí) 表3-2 管理口配置 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài). Step 2 interface interface-id 進(jìn)入端口配置狀態(tài). S
14、tep 3 speed 10 | 100 | 1000 | auto | nonegotiate 設(shè)置端口速率 注 1000 只工作在千兆口. GBIC模塊只工作在1000 Mbps下. nonegotiate 只能在這些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC. Step 4 duplex auto | full | half 設(shè)置全雙工或半雙工. Step 5 end 退出 Step 6 show interfaces interface-id 顯示有關(guān)配置情況 Step 7 copy running-config startup-config 保存 Sw
15、itch# configure terminal Switch(config# interface fastethernet0/3 Switch(config-if# speed 10 Switch(config-if# duplex half 3.3 配置一組端口 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 interface range port-range 進(jìn)入組配置狀態(tài) Step 3 可以 使用平時(shí)的端口配置命令進(jìn)行配置 Step 4 end 退回 Step 5 show interfaces interface-id 驗(yàn)證配置 Step
16、 6 copy running-config startup-config 保存 見以下例子: Switch# configure terminal Switch(config# interface range fastethernet0/1 - 5 Switch(config-if-range# no shutdown Switch(config-if-range# *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: I
17、nterface FastEthernet0/2, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up *Oct 6 08:24:3
18、6: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05, changed state to up *Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up *Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up 以下的例子顯示
19、使用句號(hào)來配置不同類型端口的組: Switch# configure terminal Switch(config# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range# no shutdown Switch(config-if-range# *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interfac
20、e FastEthernet0/2, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up *Oct 6 08:29:29
21、: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3, changed state to up 3.4
22、 配置三層口 Catalyst 3560支持三種類型的三層端口: ? SVIs: 即interface vlan Note 當(dāng)生成一個(gè)interface Vlan時(shí),只有當(dāng)把某一物理端口分配給它時(shí)才能被激活 ? 三層以太網(wǎng)通道口(EtherChannel): :以太通道由被路由端口組成。以太通道端口接口在“配置以太通道”中被描述。 ? .路由口:路由口是指某一物理端口在端口配置狀態(tài)下用no switchport命令生成的端口 所有的三層都需要IP地址以實(shí)現(xiàn)路由交換 配置步驟如下: 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 interface f
23、astethernet | gigabitethernet interface-id | vlan vlan-id | port-channel port-channel-number 進(jìn)入端口配置狀態(tài) Step 3 no switchport 把物理端口變成三層 口 Step 4 ip address ip_address subnet_mask 配置IP地址和掩碼 Step 5 no shutdown 激活端口 Step 6 End 退出 Step 7 show interfaces interface-idshow ip interface interface-idshow runnin
24、g-config interface interface-id 驗(yàn)證配置 Step 8 copy running-config startup-config 保存配置 配置舉例如下: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config# interface gigabitethernet0/2 Switch(config-if# no switchport Switch(config-if# ip address 1 2
25、 Switch(config-if# no shutdown Switch(config-if# end 3.5 監(jiān)控及維護(hù)端口 3.5.1 監(jiān)控端口和控制器的狀態(tài) 主要命令見下表: Show Commands for Interfaces Command 目的 show interfaces interface-id 顯示所有端口或某一端口的狀態(tài)和配置. show interfaces interface-id status err-disabled 顯示一系列端口的狀態(tài)或錯(cuò)誤關(guān)閉的狀態(tài) show interfaces interface-id switchport
26、顯示二層端口的狀態(tài),可以用來決定此口是否為二層或三層口。 show interfaces interface-id description 顯示端口描述 show ip interface interface-id 顯示所有或某一端口的IP可用性狀態(tài) show running-config interface interface-id 顯示當(dāng)前配置中的端口配置情況 show version 顯示軟硬件等情況 舉例如下: Switch# show interfaces status Port Name Status Vlan Duplex Speed Type Gi0/1 connected r
27、outed a-full a-100 10/100/1000Base TX Gi0/2 wce server 20.20.2 disabled routed auto auto 10/100/1000Base TX Gi0/3 ip wccp web-cache notconnect routed auto auto 10/100/1000Base TX Gi0/4 notconnect routed auto auto 10/100/1000Base TX Gi0/5 notconnect routed auto auto 10/100/1000Base TX Gi0/6 disabled
28、routed auto auto 10/100/1000Base TX Gi0/7 disabled routed auto auto 10/100/1000Base TX Gi0/8 disabled routed auto 100 10/100/1000Base TX Gi0/9 notconnect routed auto auto 10/100/1000Base TX Gi0/10 notconnect routed auto auto 10/100/1000Base TX Gi0/11 disabled routed auto auto unknown Gi0/12 notconne
29、ct routed auto auto unknown Switch# show interfaces fastethernet 0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: static access Operational Mode: down Administrative Trunking Encapsulation: dot1q Negotiation of Trunking: Off Access Mode VLAN: 1 (default Trunking Native Mode VLAN:
30、1 (default Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Protected: fal se Unknown unicast blocked: disabled Unknown multicast blocked: disabled Voice VLAN: dot1p (Inactive Appliance trust: 5 Switch# show running-config interface fastethernet0/2 Building configuration. Current configurat
31、ion : 131 bytes ! interface FastEthernet0/2 switchport mode access switchport protected no ip address mls qos cos 7 mls qos cos override end 3.5.2 刷新、重置端口及計(jì)數(shù)器 Clear命令 目的 clear counters interface-id 清除端口計(jì)數(shù)器. clear interface interface-id 重置某一端口的硬件邏輯 clear line number | console 0 | vty number 重置異步串口的硬件
32、邏輯 Note clear counters 命令只清除用show interface所顯示的計(jì)數(shù),不影響用snmp得到的計(jì)數(shù) 舉例如下: Switch# clear counters fastethernet0/5 Clear show interface counters on this interface confirm y Switch# *Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5 by vty1 (0 可使用clear interface 或 c
33、lear line 命令來清除或重置某一端口或串口,在大部分情況下并不需要這樣做: Switch# clear interface fastethernet0/5 3.5.3 關(guān)閉和打開端口 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 interface vlan vlan-id | fastethernet | gigabitethernet interface-id | port-channel port-channel-number 選擇要關(guān)閉的端口 Step 3 Shutdown 關(guān)閉 Step 4 End 退出 Step 5 show
34、running-config 驗(yàn)證 使用 no shutdown 命令重新打開端口. 舉例如下: Switch# configure terminal Switch(config# interface fastethernet0/5 Switch(config-if# shutdown Switch(config-if# *Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet0/5, changed state to a administratively down Switch# configure terminal Switch(c
35、onfig# interface fastethernet0/5 Switch(config-if# no shutdown Switch(config-if# *Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up 3.6 交換機(jī)端口鏡像配置 端口鏡像的數(shù)據(jù)流程 基于端口的鏡像是把被鏡像端口的進(jìn)出數(shù)據(jù)報(bào)文完全拷貝一份到鏡像端口,這樣來進(jìn)行流量觀測或者故障定位。 Figure 27-1 Example of Local SPAN Configuration on a Single Swit
36、ch 3.6.1 創(chuàng)建一個(gè)本地SPAN會(huì)話 Beginning in privileged EXEC mode, follow these steps to create a SPAN session and specify the source (monitored ports or VLANs and the destination (monitoring ports: Command Purpose Step 1 configure terminal Enter global configuration mode. Step 2 no monitor session session_nu
37、mber | all | local | remote Remove any existing SPAN configuration for the session. For session_number, the range is 1 to 66. Specify all to remove all SPAN sessions, local to remove all local sessions, or re mote to remove all remote SPAN sessions. Step 3 monitor session session_number source inter
38、face interface-id | vlan vlan-id , | - both | rx | tx Specify the SPAN session and the source port (monitored port. For session_number, the range is 1 to 66. For interface-id, specify the source port or source VLAN to monitor. ? For source interface-id, specify the source port to monitor. Valid inte
39、rfaces include physical interfaces and port-channel logical interfaces (port-channel port-channel-number. Valid port-channel numbers are 1 to 48. ? For vlan-id, specify the source VLAN to monitor. The range is 1 to 4094 (excluding the RSPAN VLAN. Note A single session can include multiple sources (p
40、orts or VLANs, defined in a series of commands, but you cannot combine source ports and source VLANs in one session. (Optional , | - Specify a series or range of interfaces. Enter a space before and after the comma; enter a space before and after the hyphen. (Optional Specify the direction of traffi
41、c to monitor. If you do not specify a traffic direction, the SPAN monitors both sent and received traffic. ? bothMonitor both received and sent traffic. This is the default. ? rxMonitor received traffic. ? txMonitor sent traffic. Note You can use the monitor session session_number source command mul
42、tiple times to configure multiple source ports. Step 4 monitor session session_number destination interface interface-id , | - encapsulation replicate Specify the SPAN session and the destination port (monitoring port. For session_number, specify the session number entered in step 3. Note For local
43、SPAN, you must use the same session number for the source and destination interfaces. For interface-id, specify the destination port. The destination interface must be a physical port; it cannot be an EtherChannel, and it cannot be a VLAN. (Optional , | - Specify a series or range of interfaces. Ent
44、er a space before and after the comma; enter a space before and after the hyphen. (Optional Enter encapsulation replicate to specify that the destination interface replicates the source interface encapsulation method. If not selected, the default is to send packets in native form (untagged. Note You
45、 can use monitor session session_number destination command multiple times to configure multiple destination ports. Step 5 end Return to privileged EXEC mode. Step 6 show monitor session session_number show running-config Verify the configuration. Step 7 copy running-config startup-config (Optional
46、Save the configuration in the configuration file. 舉例:通過交換機(jī)的第2號(hào)口監(jiān)控第1號(hào)口的流量 Switch(config# monitor session 1 source interface gigabitethernet0/1 Switch(config# monitor session 1 destination interface gigabitethernet0/3 Switch(config# end 刪除一個(gè)span會(huì)話: Switch(config# no monitor session 1 source interface
47、gig abitethernet0/1 Switch(config# end 3.7 以太通道端口組(Ethernet Port Groups) 以太通道端口組提供把多個(gè)交換機(jī)端口像一個(gè)交換端口對(duì)待。這些端口組為交換機(jī)之間或交換機(jī)和服務(wù)器之間提供一條單獨(dú)的高帶寬連接的邏輯端口。以太通道在一個(gè)通道中提供穿越鏈路的負(fù)載平衡。如果以太通道中的一個(gè)鏈路失效,流量會(huì)自動(dòng)從失效鏈路轉(zhuǎn)移到被用鏈路。你可以把多干道端口加到一個(gè)邏輯的干道端口;把多訪問端口加到一個(gè)邏輯訪問端口;或者多隧道端口加到一個(gè)邏輯的隧道接口。絕大多數(shù)的協(xié)議能夠在單獨(dú)或是集合的接口上運(yùn)行,并且不會(huì)意識(shí)到在端口組中的物理端口。除了DTP、CD
48、P和PAgP,這些協(xié)議只能在物理接口上運(yùn)行。 當(dāng)你配置一個(gè)以太通道,你創(chuàng)建一個(gè)端口通道邏輯接口,并且指派一個(gè)接口給以太通道。對(duì)于三層接口,你人工創(chuàng)建該邏輯接口: Figure 33-1 Typical EtherChannel Configuration 舉例:把交換機(jī)A,B的1,2號(hào)口添加到同一個(gè)組5里面 SwitchA# configure terminal SwitchA (config# interface range gigabitethernet0/1 -2 SwitchA (config-if-range# switchport mode access SwitchA (conf
49、ig-if-range# switchport access vlan 10 SwitchA (config-if-range# channel-group 5 mode ON Switch(config-if-range# end SwitchB# configure terminal SwitchB(config# interface range gigabitethernet0/1 -2 SwitchB(config-if-range# switchport mode access SwitchB(config-if-range# switchport access vlan 10 Sw
50、itchB(config-if-range# channel-group 5 mode ON SwitchB(config-if-range# end 第4章 配置VLAN 4.1 簡介 VLAN(Virtual Local Area Network),是一種通過將局域網(wǎng)內(nèi)的設(shè)備邏輯地而不是物理地劃分成一個(gè)個(gè)網(wǎng)段從而實(shí)現(xiàn)虛擬工作組的技術(shù)。IEEE于1999年頒布了用以標(biāo)準(zhǔn)化VLAN實(shí)現(xiàn)方案的IEEE 802.1Q協(xié)議標(biāo)準(zhǔn)草案。 VLAN技術(shù)允許網(wǎng)絡(luò)管理者將一個(gè)物理的LAN邏輯地劃分成不同的廣播域(或稱虛擬LAN,即VLAN),每一個(gè)VLAN都包含一組有著相同需求的計(jì)算機(jī),由于VLAN是邏輯地而
51、不是物理地劃分,所以同一個(gè)VLAN內(nèi)的各個(gè)計(jì)算機(jī)無須被放置在同一個(gè)物理空間里,即這些計(jì)算機(jī)不一定屬于同一個(gè)物理LAN網(wǎng)段。 VLAN的優(yōu)勢在于VLAN內(nèi)部的廣播和單播流量不會(huì)被轉(zhuǎn)發(fā)到其它VLAN中,從而有助于控制網(wǎng)絡(luò)流量、減少設(shè)備投資、簡化網(wǎng)絡(luò)管理、提高網(wǎng)絡(luò)安全性。 4.2 可支持的VLAN Catalyst 3560交換機(jī)支持1005個(gè) VLAN,可以分別是VTPclient, server, 及 transparent modes. VLAN號(hào)可以從1到4094. VLAN號(hào)1002到1005保留給令牌環(huán)及FDDI VLAN. VTP只能學(xué)習(xí)到普通范圍的VLAN, 即從VLAN到1到100
52、5; VLAN號(hào)大于1005屬于擴(kuò)展VLAN,不存在VLAN數(shù)據(jù)庫中。 交換機(jī)必須配置成VTP透明模式當(dāng)需要生成VLAN 號(hào)從1006到4094. 本交換機(jī)支持基于每一VLAN的生成樹(PVST,最多支 持128個(gè)生成樹。本交換機(jī)支持ISL及IEEE 802.1Q trunk二種封裝。 4.3 配置正常范圍的VLAN VLAN號(hào)1, 1002到1005是自動(dòng)生成的不能被去掉。 VLAN號(hào)1到1005的配置被寫到文件vlan.dat 中, 可以用show vlan 命令查看, vlan.dat 文件存放在NVRAM中. 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài)
53、 Step 2 vlan vlan-id 輸入一個(gè)VLAN號(hào), 然后進(jìn)入vlan配置狀態(tài),可以輸入一個(gè)新的VLAN號(hào)或舊的來進(jìn)行修改。 Step 3 name vlan-name (可選輸入一個(gè)VLAN名,如果沒有配置VLAN名,缺省的名字是VLAN號(hào)前面用0填滿的4位數(shù),如VLAN0004是VLAN4的缺省名字 Step 4 mtu mtu-size (可選 改變MTU大小 Step 5 end 退出 Step 6 show vlan name vlan-name | id vlan-id 驗(yàn)證 Step 7 copy running-config startup config (可選 保存
54、配置 用no vlan name 或 no vlan mtu 退回到缺省的vlan配置狀態(tài) 舉例如下: Switch# configure terminal Switch(config# vlan 20 Switch(config-vlan# name test20 Switch(config-vlan# end 也可以在VLAN狀態(tài)下,進(jìn)行VLAN配置: 命令 目的 Step 1 vlan database 進(jìn)入VLAN配置狀態(tài) Step 2 vlan vlan-id name vlan-name 加入VLAN號(hào)及VLAN名 Step 3 vlan vlan-id mtu mtu-size
55、(可選 修改MTU大小 Step 4 exit 更新VLAN數(shù)據(jù)庫并退出 Step 5 show vlan name vlan-name | id vlan-id 驗(yàn)證配置 Step 6 copy running-config startup config 保存配置(可選) 舉例如下: Switch# vlan database Switch(vlan# vlan 20 name test20 Switch(vlan# exit APPLY completed. Exiting. Switch# 4.3.1 刪除VLAN 當(dāng)刪除一個(gè)處于VTP服務(wù)器的交換機(jī)上刪除VLAN時(shí),則此VLAN將在所有
56、相同VTP的交換機(jī)上刪除。當(dāng)在透明模式下刪除時(shí),只在當(dāng)前交換機(jī)上刪除。 注意 當(dāng)刪除一個(gè)VLAN時(shí),原來屬于此VLAN的端口將處于非激活的狀態(tài),直到將其分配給某一VLAN。 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 no vlan vlan-id 刪除某一VLAN. Step 3 end 退出 Step 4 show vlan brief 驗(yàn)證 Step 5 copy running-config startup config 保存 也可用vlan database 進(jìn)入VLAN配置狀態(tài),用no vlan vlan-id 來刪除。 4.3.2
57、將端口分配給一個(gè)VLAN 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 interface interface-id 進(jìn)入要分配的端口 Step 3 switchport mode access 定義二層口 Step 4 switchport access vlan vlan-id 把端口分配給某一VLAN Step 5 end 退出 Step 6 show running-config interface in terface-id 驗(yàn)證端口的VLAN號(hào) Step 7 show interfaces interface-id switchport
58、 驗(yàn)證端口的管理模式和VLAN情況 Step 8 copy running-config startup-config 保存配置 使用 default interface interface-id 還原到缺省配置狀態(tài)。 舉例如下: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config# interface fastethernet0/1 Switch(config-if# switchport mode access Switch(config-
59、if# switchport access vlan 2 Switch(config-if# end Switch# 4.4 配置VLAN Trunks 以太網(wǎng)端口有二種鏈路類型:Access和Trunk。Access類型的端口只能屬于1個(gè)VLAN,一般用于連接計(jì)算機(jī)的端口;Trunk類型的端口可以屬于多個(gè)VLAN,可以接收和發(fā)送多個(gè)VLAN的報(bào)文,一般用于交換機(jī)之間連接的端口;這里的trunk并不是端口干路的概念,即端口匯聚或者鏈路聚合,而是允許vlan透傳的一個(gè)概念。 命令 目的 Step 1 configure terminal 進(jìn)入配置狀態(tài) Step 2 interface interface-id 進(jìn)入端口配置狀態(tài) Step 3 switchport trunk encapsulation isl | dot1q | negotiate 配置trunk封裝ISL 或 802.1Q 或自動(dòng)協(xié)商 Step 4 switchport mode dynamic auto | desirable | trunk 配置二層trunk模式。? dynamic a
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年02月度山東營河口區(qū)事業(yè)單位公開招聘工作人員33名筆試歷年典型考題(歷年真題考點(diǎn))解題思路附帶答案詳解
- 課題開題報(bào)告:大中小學(xué)思政課一體化的內(nèi)涵式建設(shè)研究
- 課題開題報(bào)告:大學(xué)生就業(yè)服務(wù)數(shù)字化、智能化研究
- 課題開題報(bào)告:瀕危曲種保護(hù)與傳承研究
- 各類地方經(jīng)濟(jì)促采接送合同
- 仿制藥供應(yīng)鏈管理企業(yè)制定與實(shí)施新質(zhì)生產(chǎn)力戰(zhàn)略研究報(bào)告
- 化學(xué)纖維短纖布企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級(jí)戰(zhàn)略研究報(bào)告
- 家居維修中介合同
- 定制家具項(xiàng)目合作協(xié)議
- 布制拖鞋企業(yè)ESG實(shí)踐與創(chuàng)新戰(zhàn)略研究報(bào)告
- 英語課堂教學(xué)技能訓(xùn)練(英語師范專業(yè))全套教學(xué)課件
- 2023年第九屆中國國際互聯(lián)網(wǎng)+大學(xué)生創(chuàng)新創(chuàng)業(yè)大賽解讀
- 直播電商可行性分析
- 建筑工程施工安全管理網(wǎng)絡(luò)圖
- 人教版四年級(jí)數(shù)學(xué)下冊教材分析精講課件
- 《龍族設(shè)定全解析》
- 產(chǎn)品手繪設(shè)計(jì)表現(xiàn)技法PPT完整全套教學(xué)課件
- GA/T 1988-2022移動(dòng)警務(wù)即時(shí)通信系統(tǒng)功能及互聯(lián)互通技術(shù)要求
- 農(nóng)業(yè)政策學(xué)PPT完整全套教學(xué)課件
- 國家電網(wǎng)招聘之其他工學(xué)類復(fù)習(xí)資料大全
- 天山天池景區(qū)介紹-天山天池景點(diǎn)PPT(經(jīng)典版)
評(píng)論
0/150
提交評(píng)論