国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

2950交換機簡明配置維護手冊

2019-11-05 01:36:28
字體:
來源:轉載
供稿:網友

  目錄
  說明 3
  產品特性 3
  配置端口 4
  配置一組端口 4
  配置二層端口 6
  配置端口速率及雙工模式 6
  端口描述 7
  監控及維護端口 8
  監控端口和控制器的狀態 8
  刷新、重置端口及計數器 10
  關閉和打開端口 10
  配置VLAN 11
  理解VLAN 11
  可支持的VLAN 12
  配置正常范圍的VLAN 12
  生成、修改以太網VLAN 13
  刪除VLAN 14
  將端口分配給一個VLAN 15
  配置VLAN Trunks 16
  使用STP實現負載均衡 19
  配置Cluster 23
  
  
  說明
  本手冊只包括日常使用的有關命令及特性,其它未涉及的命令及特性請參考英文的具體配置手冊。
  產品特性
  2950是只支持二層的交換機
  支持VLAN
  · 到250 個VLAN
  · 支持VLAN ID從1到4094( IEEE 802.1Q 標準)
  · 支持ISL及IEEE 802.1Q封裝
  安全
  · 支持IOS標準的密碼保護
  · 支持標準及擴展的訪問列表來定義安全策略
  · 支持基于VLAN的訪問列表
  監視
  · 交換機LED指示端口狀態
  · SPAN及遠端SPAN (RSPAN) 可以監視任何端口或VLAN的流量
  · 內置支持四組的RMON監控功能(歷史、統計、告警及事件)
  
  
  
  
  配置端口
  配置一組端口
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  interface range {port-range} 進入組配置狀態
  Step 3  可以使用平時的端口配置命令進行配置
  Step 4  end 退回
  Step 5  show interfaces [interface-id] 驗證配置
  Step 6  copy running-config startup-config 保存
  
  當使用interface range命令時有如下的規則:
  · 有效的組范圍:
  o vlan從1 到4094
  o fastethernet 槽位/{first port} - {last port}, 槽位為0
  o gigabitethernet槽位/{first port} - {last port},槽位為0
  o port-channel port-channel-number - port-channel-number, port-channel號從1到64
  · 端口號之間需要加入空格,如:interface range fastethernet 0/1 – 5 是有效的,而interface range fastethernet 0/1-5 是無效的.
  · interface range 命令只能配置已經存在的interface vlan
  · 所有在同一組的端口必須是相同類別的。
  見以下例子:
  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: Interface 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:36: %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
  
  以下的例子顯示使用句號來配置不同類型端口的組:
  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: Interface 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: %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
  
  配置二層端口
  2950的所有端口缺省的端口都是二層口,假如此端口已經配置成三層端口的話,則需要用switchport來使其成為二層端口。
  配置端口速率及雙工模式
  可以配置快速以太口的速率為10/100Mbps及千兆以太口的速率為10/100/1000-Mbps; 但對于GBIC端口則不能配置速率及雙工模式,有時可以配置nonegotiate,當需要聯接不支持自適應的其它千兆端口時
  命令 目的
  Step 1  configure terminal 進入配置狀態.
  Step 2  interface interface-id 進入端口配置狀態.
  Step 3  speed {10 100 1000 auto nonegotiate} 設置端口速率 注  1000 只工作在千兆口. GBIC模塊只工作在1000 Mbps下. nonegotiate 只能在這些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC.
  Step 4  duplex {auto full half} 設置全雙工或半雙工.
  Step 5  end 退出
  Step 6  show interfaces interface-id 顯示有關配置情況
  Step 7  copy running-config startup-config 保存
  
  
  Switch# configure terminal
  
  Switch(config)# interface fastethernet0/3
  
  Switch(config-if)# speed 10
  
  Switch(config-if)# duplex half
  端口描述
  
  命令 目的
  Step 1  configure terminal 進入配置模式
  Step 2  interface interface-id 進入要加入描述的端口
  Step 3  description string 加入描述 (最多240個字符).
  Step 4  end 退回.
  Step 5  show interfaces interface-id descriptionorshow running-config 驗證.
  Step 6  copy running-config startup-config 保存
  
  Use the no description interface configuration command to delete the description.
  This example shows how to add a description on Fast Ethernet interface 0/4 and to verify the description:
  Switch# config terminal
  
  Enter configuration commands, one per line. End with CNTL/Z.
  Switch(config)# interface fastethernet0/4
  
  Switch(config-if)# description Connects to Marketing
  
  Switch(config-if)# end
  
  Switch# show interfaces fastethernet0/4 description
  
  Interface Status     Protocol Description
  Fa0/4   up       down   Connects to Marketing
  監控及維護端口
  監控端口和控制器的狀態
  主要命令見下表:
  Show Commands for Interfaces Command 目的
  show interfaces [interface-id] 顯示所有端口或某一端口的狀態和配置.
  show interfaces interface-id status [err-disabled] 顯示一系列端口的狀態或錯誤-關閉的狀態
  show interfaces [interface-id] switchport 顯示二層端口的狀態,可以用來決定此口是否為二層或三層口。
  show interfaces [interface-id] description 顯示端口描述
  show running-config interface [interface-id] 顯示當前配置中的端口配置情況
  show version 顯示軟硬件等情況
  
  舉例如下:
  Switch# show interfaces status
  
  
  Port  Name        Status    Vlan    Duplex Speed Type
  Gi0/1           connected  routed   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   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           notconnect  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: 1 (default)
  Trunking VLANs Enabled: ALL
  Pruning VLANs Enabled: 2-1001
  
  Protected: false
  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 configuration : 131 bytes
  !
  interface FastEthernet0/2
   switchport mode access
   switchport protected
   no ip address
   mls qos cos 7
   mls qos cos override
  end
  刷新、重置端口及計數器
  Clear命令 目的
  clear counters [interface-id] 清除端口計數器.
  clear line [number console 0 vty number] 重置異步串口的硬件邏輯
  
  
   Note  clear counters 命令只清除用show interface所顯示的計數,不影響用snmp得到的計數
  
  舉例如下:
  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 (171.69.115.10)
  
  可使用clear line 命令來清除或重置某一端口或串口,在大部分情況下并不需要這樣做:
  Switch# clear interface fastethernet0/5
  
  關閉和打開端口
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  interface {vlan vlan-id} {{fastethernet gigabitethernet} interface-id} {port-channel port-channel-number} 選擇要關閉的端口
  Step 3  shutdown 關閉
  Step 4  end 退出
  Step 5  show running-config 驗證
  
  使用 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(config)# 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
  
  配置VLAN
  理解VLAN
   一個VLAN就是一個交換網,其邏輯上按功能、項目、應用來分而不必考慮用戶的物理位置。任何交換口都可以屬于某一VLAN, IP包、廣播包及組播包均可以發送或廣播給在此VLAN內的最終用戶。每一個VLAN均可看成是一個邏輯網絡,發往另一VLAN的數據包必須由路由器或網橋轉發(如下圖)。由于VLAN被看成是一個邏輯網絡,其具有自己的網橋治理信息庫 (MIB) 并可支持自己的生成樹
  
   VLAN作為邏輯定義的網絡示意圖
  
  
  VLAN經常與IP子網相聯系,同一IP子網屬于同一VLAN。在3550上VLAN之間的數據包可以由VLAN端口進行轉發。
  可支持的VLAN
  Catalyst 3550交換機支持250個 VLAN,可以分別是VTP client, server, 及 transparent modes. VLAN號可以從1到4094. VLAN號1002到1005保留給令牌環及FDDI VLAN. VTP只能學習到普通范圍的VLAN, 即從VLAN到1到1005; VLAN號大于1005屬于擴展VLAN,不存在VLAN數據庫中。 交換機必須配置成VTP透明模式當需要生成VLAN 號從1006到4094.
  本交換機支持基于每一VLAN的生成樹(PVST),最多支持128個生成樹。本交換機支持ISL及IEEE 802.1Q trunk二種封裝。
  配置正常范圍的VLAN
  VLAN號1, 1002到1005是自動生成的不能被去掉。
  VLAN號1到1005的配置被寫到文件vlan.dat 中, 可以用show vlan 命令查看, vlan.dat 文件存放在NVRAM中.
  
   注重  不要手工刪除vlan.dat 文件,可能造成VLAN的不完整。 如要刪除vlan需要用有關的命令來進行
  
  生成、修改以太網VLAN
  
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  vlan vlan-id 輸入一個VLAN號, 然后進入vlan配置狀態,可以輸入一個新的VLAN號或舊的來進行修改。
  Step 3  name vlan-name (可選)輸入一個VLAN名,假如沒有配置VLAN名,缺省的名字是VLAN號前面用0填滿的4位數,如VLAN0004是VLAN4的缺省名字
  Step 4  mtu mtu-size (可選) 改變MTU大小
  Step 5  end 退出
  Step 6  show vlan {name vlan-name id vlan-id} 驗證
  Step 7  copy running-config startup config (可選) 保存配置
  用no vlan name 或 no vlan mtu 退回到缺省的vlan配置狀態
  舉例如下:
  Switch# configure terminal
  
  Switch(config)# vlan 20
  
  Switch(config-vlan)# name test20
  
  Switch(config-vlan)# end
  
  
  
  也可以在enable狀態下,進行VLAN配置:
  命令 目的
  Step 1  vlan database 進入VLAN配置狀態
  Step 2  vlan vlan-id name vlan-name 加入VLAN號及VLAN名
  Step 3  vlan vlan-id mtu mtu-size (可選) 修改MTU大小
  Step 4  exit 更新VLAN數據庫并退出
  Step 5  show vlan {name vlan-name id vlan-id} 驗證配置
  Step 6  copy running-config startup config 保存配置(可選)
  
  舉例如下:
  Switch# vlan database
  
  Switch(vlan)# vlan 20 name test20
  
  Switch(vlan)# exit
  
  APPLY completed.
  Exiting....
  Switch#
  刪除VLAN
  當刪除一個處于VTP服務器的交換機上刪除VLAN時,則此VLAN將在所有相同VTP的交換機上刪除。當在透明模式下刪除時,只在當前交換機上刪除。
   注重  當刪除一個VLAN時,原來屬于此VLAN的端口將處于非激活的狀態,直到將其分配給某一VLAN。
  
  
  
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  no vlan vlan-id 刪除某一VLAN.
  Step 3  end 退出
  Step 4  show vlan brief 驗證
  Step 5  copy running-config startup config 保存
  
  也可用vlan database 進入VLAN配置狀態,用no vlan vlan-id 來刪除。
  將端口分配給一個VLAN
  
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  interface interface-id 進入要分配的端口
  Step 3  switchport mode access 定義二層口
  Step 4  switchport access vlan vlan-id 把端口分配給某一VLAN
  Step 5  end 退出
  Step 6  show running-config interface interface-id 驗證端口的VLAN號
  Step 7  show interfaces interface-id switchport 驗證端口的治理模式和VLAN情況
  Step 8  copy running-config startup-config 保存配置
  
  使用 default interface interface-id 還原到缺省配置狀態。
  舉例如下:
  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-if)# switchport access vlan 2
  
  Switch(config-if)# end
  Switch#
  配置VLAN Trunks
  
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  interface interface-id 進入端口配置狀態
  Step 3 switchport mode {dynamic {auto desirable} trunk} 配置二層trunk模式。· dynamic auto—自動協商是否成為trunk· dynamic desirable—把端口設置為trunk假如對方端口是trunk, desirable, 或自動模式· trunk—設置端口為強制的trunk方式,而不理會對方端口是否為trunk
  Step 4 switchport access vlan vlan-id (可選) 指定一個缺省VLAN, 假如此端口不再是trunk
  Step 5  switchport trunk native vlan vlan-id 指定802.1Q native VLAN號
  Step 6  end 退出
  Step 7  show interfaces interface-id switchport 顯示有關switchport 的配置
  Step 8  show interfaces interface-id trunk 顯示有關trunk的配置
  Step 9  copy running-config startup-config 保存配置
  舉例:
  Switch# configure terminal
  
  Enter configuration commands, one per line. End with CNTL/Z.
  Switch(config)# interface fastethernet0/4
  
  Switch(config-if)# switchport mode trunk
  
  Switch(config-if)# end
  定義trunk答應的VLAN
  缺省情況下trunk答應所有的VLAN通過。可以使用 switchport trunk allowed vlan remove vlan-list 來去掉某一VLAN
  Command Purpose
  Step 1  configure terminal 進入配置狀態
  Step 2  interface interface-id 進入端口配置
  Step 3  switchport mode trunk 配置二層口為trunk
  Step 4  switchport trunk allowed vlan {add all except remove} vlan-list (可選) 配置trunk答應的VLAN. 使用add, all, except, remove關健字
  Step 5  end 退出
  Step 6  show interfaces interface-id switchport 驗證VLAN配置情況.
  Step 7  copy running-config startup-config 保存配置
  
  回到答應所有VLAN通過時, 可用no switchport trunk allowed vlan 端口配置命令.
  舉例如下:
  Switch(config)# interface fastethernet0/1
  
  Switch(config-if)# switchport trunk allowed vlan remove 2
  
  Switch(config-if)# end
  
  配置Native VLAN(802.1q)
  封裝802.1q的trunk端口可以接受帶有標簽和不帶標簽的數據流,交換機向native vlan傳送不帶標簽的數據流,缺省情況下native VLAN是1。
  
  命令 目的
  Step 1  configure terminal 進入配置狀態
  Step 2  interface interface-id 進入配置成802.1qtrunk的端口
  Step 3  switchport trunk native vlan vlan-id 配置native VLAN號
  Step 4  end 退出
  Step 5  show interfaces interface-id switchport 驗證native VLAN配置
  Step 6  copy running-config startup-config 保存配置
  
  使用no switchport trunk native vlan 端口配置命令回到缺省的狀態
  使用STP實現負載均衡
  負載均衡可以使用流量分流到其它平行的trunks上去. 交換機為了避免環路, STP通常是阻斷所有端口交換機之間只留一條鏈路 。使用負載均衡后, 可以把不同VLAN的流量分配到不同的trunk上。
  可以通過配置STP端口權值STP路徑值來實現負載均衡. 假如使用STP端口權值來配置那么二條負載均衡的trunk必須聯同一交換機上。使用路徑值則即可以聯相同的交換機與可以聯不同的交換機。
  使用STP端口權值的負載均衡
  當同一臺交換機的二個口形成環路時, STP端口權值用來決定那個口是enable的,那個口是阻斷的。 可以通過配置端口權值來決定二對trunk各走那些VLAN, 有較高權值的端口(數字較小的)vlan, 將處于轉發狀態,同一個VLAN在另一個trunk有較低的權值(數字較大)則將處在阻斷狀態。 即同一VLAN只在一個trunk上發送接受。
  
  基于端口權值的負載均衡示意圖
  trunk1將發送和接收VLAN8-10的數據,trunk2將發送和接收VLAN3-6的數據
  
  配置如下:
  Command Purpose
  Step 1  configure terminal 進入Switch 1配置狀態
  Step 2  vtp domain domain-name 配置VTP域
  Step 3  vtp server 將Switch 1配置成VTP server.
  Step 4  end 退出
  Step 5  show vtp status 驗證VTP的配置
  Step 6  show vlan 驗證VLAN
  Step 7  configure terminal 進入配置狀態
  Step 8  interface fastethernet 0/1 進入F0/1端口
  Step 9  switchport mode trunk 配置成trunk端口
  Step 10  end 退出
  Step 11  show interfaces fastethernet0/1 switchport 驗證VLAN配置
  Step 12 在switch1上的F0/2上重復7到11步驟
  Step 13 在Switch 2的F0/1,F0/2上重復7到11步驟。
  Step 14  show vlan 當trunk已經起來,在switch2上驗證已經學到相關的vlan配置
  Step 15  configure terminal 在Switch 1上進入配置狀態
  Step 16  interface fastethernet0/1 進入要配置的端口
  Step 17  spanning-tree vlan 8 port-priority 10 將端口權值10賦與VLAN 8.
  Step 18  spanning-tree vlan 9 port-priority 10 將端口權值10賦與VLAN 9.
  Step 19  spanning-tree vlan 10 port-priority 10 將端口權值10賦與VLAN 10.
  Step 20  exit 退回.
  Step 21 interface fastethernet0/2 進入F0/2
  Step 22 spanning-tree vlan 3 port-priority 10 將端口權值10賦與VLAN 3.
  Step 23 spanning-tree vlan 4 port-priority 10 將端口權值10賦與VLAN 4.
  Step 24 spanning-tree vlan 5 port-priority 10 將端口權值10賦與VLAN 5.
  Step 25 spanning-tree vlan 6 port-priority 10 將端口權值10賦與VLAN 10.
  Step 26 end 退出
  Step 27  show running-config 驗證配置
  Step 28 copy running-config startup-config 保存配置
  
  配置STP路徑值的負載均衡
  也可以通過配置配置STP路徑值來實現負載均衡,如下圖所示
  Trunk1走VLAN8-10,Trunk2走VLAN2-4
  
  
  
  命令 目的
  Step 1  configure terminal 進入 Switch 1配置狀態
  Step 2  interface fastethernet 0/1 進入F0/1
  Step 3  switchport mode trunk 配置Trunk,只能是dot1q模式
  Step 4 exit 退回
  Step 5 在F0/2口上重復2-4步驟
  Step 6  end 退出
  Step 7  show running-config 驗證配置
  Step 8  show vlan 驗證switch1已經學到Vlan
  Step 9  configure terminal 進入配置狀態
  Step 10  interface fastethernet 0/1 進入F0/1
  Step 11  spanning-tree vlan 2 cost 30 設置Vlan2生成樹路徑值為30
  Step 12  spanning-tree vlan 3 cost 30 設置Vlan3生成樹路徑值為30
  Step 13  spanning-tree vlan 4 cost 30 設置Vlan4生成樹路徑值為30
  Step 14  end 退出
  Step 15  在switch1的F0/2上重復9-11步驟設置VLAN8,9,10生成樹路徑值為30
  Step 16  exit 退出
  Step 17  show running-config 驗證配置
  Step 18  copy running-config startup-config 保存配置
  配置Cluster
  ZL-10th -Floor-1中的MAC地址為:000a.f404.ad80
  ZL-10th -Floor-2中的MAC地址為:ZL-10th -Floor-3中的MAC地址為:000a.f404.ab80
  ZL-10th -Floor-4中的MAC地址為:000a.f404.ac00


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 灵石县| 阿拉善盟| 潮州市| 石城县| 上犹县| 阳谷县| 黎城县| 九龙坡区| 改则县| 读书| 保康县| 双桥区| 南平市| 平原县| 墨玉县| 昌邑市| 怀集县| 通化市| 威信县| 班戈县| 竹溪县| 五寨县| 桂阳县| 陆河县| 科尔| 丰宁| 寻乌县| 临安市| 上栗县| 都昌县| 廊坊市| 拉萨市| 浪卡子县| 鄯善县| 杭锦后旗| 嵊泗县| 沂水县| 灵台县| 都江堰市| 印江| 淮滨县|