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

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

配置cisco2950交換機的端口

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

配置一組端口

 

命令

目的

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命令時有如下的規則:

  • 有效的組范圍:
    • vlan1 到4094
    • fastethernet 槽位/{first port} - {last port}, 槽位為0
    • gigabitethernet槽位/{first port} - {last port},槽位為0
    • 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)#
以下的例子顯示使用句號來配置不同類型端口的組:
Switch# configure terminal
Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 
Switch(config-if-range)# no shutdown 
Switch(config-if-range)#

配置二層端口

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 description

or

show 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

Switch# show interfaces fastethernet 0/1 switchport
Switch# show running-config interface fastethernet0/2

刷新、重置端口及計數器

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)#
Switch# configure terminal
Switch(config)# interface fastethernet0/5 
Switch(config-if)# no shutdown 
Switch(config-if)# 
(完)


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 乐山市| 天门市| 资中县| 永顺县| 芦山县| 耿马| 疏勒县| 宁河县| 眉山市| 凤庆县| 读书| 牙克石市| 阳谷县| 新沂市| 马公市| 建水县| 静安区| 城市| 瑞安市| 盐山县| 县级市| 驻马店市| 温州市| 砚山县| 赤水市| 无锡市| 金门县| 巴塘县| 通渭县| 阜康市| 北流市| 廉江市| 武强县| 海南省| 德庆县| 正安县| 萍乡市| 襄樊市| 呼伦贝尔市| 米易县| 延吉市|