【正文】
input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 89604 packets input, 8480109 bytes, 0 no buffer Received 81848 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 60665 packets output, 6029820 bytes, 0 underruns 0 output errors, 0 collisions, 16 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out 這是一個(gè)來(lái)自于一個(gè)接口的show ip interfaces特權(quán)命令的例子:Switch show ip interface gigabitethernet0/2GigabitEthernet0/2 is up, line protocol is up Internet address is Broadcast address is Address determined by setup mand MTU is 1500 bytes Helper address is not set Directed broadcast forwarding is disabled Multicast reserved groups joined: Outgoing access list is not set Inbound access list is not set Proxy ARP is enabled Local Proxy ARP is disabled Security level is default Split horizon is enabled ICMP redirects are always sent ICMP unreachables are always sent ICMP mask replies are never sent IP fast switching is enabled IP fast switching on the same interface is disabled IP Flow switching is disabled IP CEF switching is enabled IP CEF Fast switching turbo vector IP multicast fast 。87654321另外,當(dāng)你使用這條命令把接口放入三層模式,你正在刪除該端口的所有第二層特性。注意:如果該物理接口在二層模式(缺?。?,你必須用no switchport接口配置命令把接口放入三層模式。所有三層接口要求一個(gè)IP地址來(lái)路由流量。你可以配置的被路由和SVI接口在軟件上是沒(méi)有限制的;然而,因?yàn)橛布南拗?,這個(gè)數(shù)目和被配置的其他接口特征數(shù)目之間的相互關(guān)系會(huì)影響CPU的利用。l 被路由端口:被路由端口是被用接口配置命令no switchport配置為三層的物理端口。l 三層以太通道端口:以太通道由被路由端口組成。當(dāng)你在interface vlan全局配置命令后輸入一個(gè)Vlan ID時(shí),SVIs被創(chuàng)建。 show runningconfig確認(rèn)你的條目重啟該接口用命令:(interface) no shutdown這個(gè)列子展示怎樣關(guān)閉千兆以太接口0/5:Switch configure terminalSwitch(config) interface gigabitethernet0/5 Switch(configif) shutdown Switch(configif)*Sep 30 08:33:47: %LINK5CHANGED: Interface GigabitEthernet0/5, changed state to a administratively down這個(gè)例子展示怎樣重啟千兆以太接口0/5:Switch configure terminalSwitch(config) interface gigabitethernet0/5 Switch(configif) no shutdown Switch(configif)*Sep 30 08:36:00: %LINK3UPDOWN: Interface GiogabitEthernet0/5, changed state to up為了確認(rèn)一個(gè)接口是禁用的,輸入命令:(interface) show interface在千兆以太接口0/1上,一個(gè)禁用的接口在show interface命令中被顯示為administratively down。 end返回特權(quán)模式 Step shutdown關(guān)閉一個(gè)接口Step interface {vlan vlanid} | {{fastethernet | gigabitethernet} interfaceid} | {portchannel portchannelnumber}選擇一個(gè)需被配置的端口Step configure terminal進(jìn)入全局配置模式Step從特權(quán)模式開(kāi)始,以下這些步驟關(guān)閉一個(gè)接口:Command Purpose Step通過(guò)動(dòng)態(tài)路由協(xié)議給信息被發(fā)給其他的網(wǎng)絡(luò)服務(wù)服務(wù)設(shè)備。這個(gè)例子展示怎樣清除和重置千兆口0/5:Switch clear counters gigabitethernet0/5 Clear show interface counters on this interface [confirm] y Switch*Sep 30 08:42:55: %CLEAR5COUNTERS: Clear counter on interface GigabitEthernet0/5by vty1 ()清除和重置一個(gè)接口或一個(gè)串行線路,用命令:(interface) clear interface(interface) clear line在絕大多數(shù)環(huán)境中,你不必清除一個(gè)接口或串行線路的硬件邏輯電路。表93:接口清除命令Command Purpose clear counters [interfaceid]清除接口計(jì)數(shù)器clear interface interfaceid重置接口的硬件邏輯電路clear line [number | console 0 | vty number]在一個(gè)異步串行線路上重置接口邏輯電路為了清除用show interfaces特權(quán)模式命令顯示的接口計(jì)數(shù),使用特權(quán)命令:(exec) clear counters從接口清除所有當(dāng)前接口計(jì)數(shù),除非可選變量被指派來(lái)清除一個(gè)定接口類型,該特定接口來(lái)自于一個(gè)特定接口號(hào)的唯一接口號(hào)。表92: 接口的show命令Command Purpose show interfaces [interfaceid]顯示所有接口或指定接口的狀態(tài)和配置情況show interfaces interfaceid status [errdisabled]顯示接口狀態(tài)或一個(gè)在錯(cuò)誤禁用狀態(tài)的接口列表 show interfaces [interfaceid] switchport顯示交換端口(非路由端口)的管理和運(yùn)行狀態(tài) 你可以用這個(gè)命令派段一個(gè)端口實(shí)路由還是交換模式show interfaces [interfaceid] description顯示在一個(gè)接口上或所有接口上配置的描述信息和端口狀態(tài)show runningconfig顯示內(nèi)存理的運(yùn)行配置文件 show version顯示配置文件的硬件配置, 軟件版本, 名稱 和源 ,以及引導(dǎo)映像(boot images)。表92列出了一些接口監(jiān)控命令。6543 interface interfaceid進(jìn)入接口配置模式,該接口是你想添加一段描述的接口。 configure terminal進(jìn)入全局配置模式 Step該描述用以下的命令來(lái)顯示:(exec) show configuration(exec) show runningconfig(exec) show interface從特權(quán)模式開(kāi)始,以下步驟為給一個(gè)接口添加一段描述:Command Purpose Step7654321注意:更多的關(guān)于命令配置的詳情以及接口配置模式中的flowcontol命令給本地和遠(yuǎn)程的端口所帶來(lái)的結(jié)果,在Catalyst 3550 Multilayer Switch Command Reference。l receive off 和 send off:流控制不任何一個(gè)方向上執(zhí)行。l receive off 和 send on:如果遠(yuǎn)程設(shè)備支持流控制,該端口就發(fā)送暫停幀;但是該端口不支持來(lái)自于遠(yuǎn)程設(shè)備的暫停幀。這些規(guī)則應(yīng)用于設(shè)備上的流控制:l receive on (or desired) 和 send on:流控制運(yùn)行在兩個(gè)方向;本地和遠(yuǎn)程設(shè)備都能夠發(fā)送暫停幀來(lái)顯示鏈路擁塞。注意:在Catalyst3550交換機(jī)上,GBT端口能夠接收和發(fā)送暫停幀;快速以太端口只能夠接收暫停幀。用命令設(shè)置接口的發(fā)送或接收暫停幀為on,off或desired。對(duì)稱設(shè)計(jì)適合于點(diǎn)到點(diǎn)的鏈路,而不對(duì)稱設(shè)計(jì)適合于輻射型節(jié)點(diǎn)連接。在一個(gè)接口上配置流控制之前,用命令禁用交換機(jī)上的QoS。當(dāng)本地設(shè)備在他本地檢測(cè)到了任何擁塞,他能夠發(fā)送一個(gè)暫停幀通知鏈路伙伴或者遠(yuǎn)程設(shè)備已發(fā)生擁塞。為了返回所有的接口缺省設(shè)置,使用命令(interface) default interface interfaceid這個(gè)例子顯示了在fastethernet interface 0/3口上怎樣設(shè)定接口速度為10Mbps和半雙工模式,并確認(rèn)這個(gè)配置:Switch configure terminalSwitch(config) interface fastethernet0/3Switch(configif) speed 10Switch(configif) duplex halfSwitch(configif) endSwitch show interfaces fastethernet0/3FastEthernet0/3 is up, line protocol is down Hardware is Fast Ethernet, address is (bia ) MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Halfduplex, 10Mb/s output truncated流控制在直連的以太端口上啟用,在擁塞期間允許另一端擁塞的節(jié)點(diǎn)暫停鏈路運(yùn)作來(lái)控制流量速率。7654 speed {10 | 100 | 1000 | auto | nonegotiate}為接口輸入適當(dāng)?shù)慕涌趨?shù), 或者輸入 auto 或 nonegotiate. 注意 interface interfaceid進(jìn)入接口配置模式,并確認(rèn)物理接口Step configure terminal進(jìn)入全局配置模式Step從特權(quán)模式開(kāi)始,以下的步驟為物理接口設(shè)定速度和雙工模式:命令 目的Step當(dāng)包同時(shí)在兩個(gè)方向上流動(dòng)時(shí),10Mbps接口的有效以太帶寬會(huì)翻一倍到20Mbps,快速以太接口會(huì)到200Mbps,而GBT接口會(huì)到2Gbps。通常,10Mbps端口運(yùn)行在半雙工模式,這就意味著該站點(diǎn)要么接收要么發(fā)送。你可以配置在任何沒(méi)有設(shè)置自動(dòng)協(xié)商的快速或千兆接口上配置雙工模式;你無(wú)法在GBIC上配置雙工模式。小心:改變接口速度和雙工模式的配置,在重配置期間可能會(huì)關(guān)閉并重啟該接口。 請(qǐng)看“ 配置受保護(hù)端口”部分端口安全禁用 請(qǐng)看“缺省端口安全配置”部分速端口禁用配置接口速度和雙工模式這個(gè)部分描述怎樣配置接口速度和雙工模式:l 配置方針l 設(shè)置接口速度和雙工參數(shù)配置方針當(dāng)配置一個(gè)接口速度和雙工模式時(shí),注意這些方針:l 如果線路兩端支持自動(dòng)協(xié)商,我們強(qiáng)烈建議使用缺省自動(dòng)協(xié)商設(shè)置。 請(qǐng)看 “缺省風(fēng)暴控制配置”。以太通道 (端口聚合協(xié)議PAgP)在所有端口上沒(méi)有啟用。允許的 VLAN 范圍VLANs 1 4094. 缺省 VLAN (給訪問(wèn)端口)VLAN