思科基本配置命令_第1頁(yè)
思科基本配置命令_第2頁(yè)
思科基本配置命令_第3頁(yè)
思科基本配置命令_第4頁(yè)
思科基本配置命令_第5頁(yè)
已閱讀5頁(yè),還剩46頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、思科交換機(jī)基本配置實(shí)例講解 1 1、基本概念介紹、基本概念介紹 .2 2、密碼、登陸等基本配置、密碼、登陸等基本配置 .2 3、CISCO 設(shè)備端口配置詳解設(shè)備端口配置詳解.8 4、VLAN 的規(guī)劃及配置的規(guī)劃及配置.13 4.1 核心交換機(jī)的相關(guān)配置核心交換機(jī)的相關(guān)配置.13 4.2 接入交換機(jī)的相關(guān)配置接入交換機(jī)的相關(guān)配置.25 5、配置交換機(jī)的路由功能、配置交換機(jī)的路由功能 .30 6、配置交換機(jī)的、配置交換機(jī)的 DHCP 功能功能.31 7、常用排錯(cuò)命令、常用排錯(cuò)命令 .32 思科交換機(jī)基本配置實(shí)例講解 1 1、基本概念介紹 思科交換機(jī)基本配置實(shí)例講解思科交換機(jī)基本配置實(shí)例講解 思科交

2、換機(jī)基本配置實(shí)例講解 2 目目 錄錄 IOS:互聯(lián)網(wǎng)操作系統(tǒng),也就是交換機(jī)和路由器中用的操作系統(tǒng) VLAN:虛擬 lan VTP:VLAN TRUNK PROTOCOL DHCP:動(dòng)態(tài)主機(jī)配置協(xié)議 ACL:訪問控制列表 三層交換機(jī):具有三層路由轉(zhuǎn)發(fā)能力的交換機(jī) 本教程中“#”后的藍(lán)色文字為注釋內(nèi)容。 2、密碼、登陸等基本配置、密碼、登陸等基本配置 本節(jié)介紹的內(nèi)容為 cisco 路由器或者交換機(jī)的基本配置,在目前版本的 cisco 交換機(jī)或 路由器上的這些命令是通用的。本教程用的是 cisco 的模擬器做的介紹,一些具體的端口 顯示或許與你們實(shí)際的設(shè)備不符,但這并不影響基本配置命令的執(zhí)行。 Ci

3、sco 3640 (R4700) processor (revision 0 xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2 2 Ethernet interfaces 8 Serial interfaces DRAM configuration is 64 bits wi # 選擇 no 以后,提示你按回車鍵開始,此處我們需要按回車鍵 *Mar 1 00:43:56.591: %IP-5-WEBINST_KI

4、LL: Terminating DNS process *Mar 1 00:43:58.379: %SYS-5-RESTART: System restarted - Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.3(14)T7, RELEASE SOFTWARE (fc2) Technical Support: http:/ Copyright (c) 1986-2006 by Cisco Systems, Inc. Compiled Wed 22-Mar-06 21:46 by pwade *Mar 1 00:

5、43:58.411: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing a cold start 思科交換機(jī)基本配置實(shí)例講解 3 Router # 等顯示穩(wěn)定后,出現(xiàn)最初的提示符,注 de with parity enabled. 125K bytes of NVRAM. 8192K bytes of processor board System flash (Read/Write) - System Configuration Dialog - Would you like to enter the initial conf

6、iguration dialog? yes/no: n # 此處我們選擇 no,不進(jìn)入他的初始化配置向?qū)?Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykuf

7、gjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrq

8、rqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjh

9、gargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykuf

10、gjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/. Qwewqrqrqwrqwrwqtryku

11、fgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras 思科交換機(jī)基本配置實(shí)例講解 4 Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;lik

12、jhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Press RETURN to get started! 意提示符是“”,目前所處的狀態(tài)稱為用戶模式。 Router 用戶模式 Router Routeren # 如果在當(dāng)前狀態(tài)下沒有重復(fù)的命令,我們可以用“TAB”鍵來(lái)補(bǔ)齊這條命令,主要目的 是為了便于閱讀 Routerenable 進(jìn)入特權(quán)模式 # 從用戶模式(user mode)進(jìn)入到特權(quán)模式(exec mode),注意提示符的變化,提示符變?yōu)椤?” Router#conf t Router#configure terminal

13、進(jìn)入全局模式 (說(shuō)明:#在特權(quán)模式下輸入 configure terminal 進(jìn)入全局配置模式(global configuration mode), 在這之下輸入的命令叫做全局命令,一旦輸入,將對(duì)整個(gè) router 產(chǎn)生即時(shí)影響。如下,注意提 示符的變化:) Router(config)#exit# 請(qǐng)注意提示符發(fā)生了改變,當(dāng)前的模式據(jù)叫做全局配置模式。 Router#conf *Mar 1 00:44:26.491: %SYS-5-CONFIG_I: Configured from console by console t # 在輸入命 令的過程中,IOS 會(huì)出現(xiàn)一些即時(shí)提示。Qwewq

14、rqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;lik

15、jhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtrykufgjdf;g/.,;likjhgargras Qwewqrqrqwrqwrwqtryk

16、ufgjdf;g/.,;likjhgargras Enter configuration commands, one per line. End with CNTL/Z. Router(config)#exit# 退出當(dāng)前的全局配置模式的命令是 exit Router#conf t# 重新進(jìn)入到全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)# *Mar 1 00:44:35.591: %SYS-5-CONFIG_I: Configured from console by con

17、solehos # 這行是路由器(交換機(jī))出現(xiàn)的一些即時(shí)提示。 Router(config)# hostname test 思科交換機(jī)基本配置實(shí)例講解 5 # 這條命令用來(lái)更改當(dāng)前設(shè)備的名字(名字中可包含設(shè)備的樓層、用途等信息) ,主要是為 了將來(lái)便于區(qū)分設(shè)備。 test(config)# # 回車后我們就會(huì)發(fā)現(xiàn),但前的設(shè)備的名字已經(jīng)發(fā)生了改變,變成了 test 了。 test(config)# enable pass # 這條命令用來(lái)配置設(shè)備的登陸密碼,用 tab 鍵補(bǔ)齊后,再下一行顯示完整命令。 test(config)#enable password cisco # 我們輸入這臺(tái)設(shè)備的登

18、陸密碼為 cisco test(config)#end# 我們退回到全局配置模式,校驗(yàn)一下剛才輸入的密 碼 test#sh r # 此命令的完整寫法是 show running-start,此處的 sh r 用的是省略的寫法,因無(wú)其他重復(fù) 的命令所以可以被執(zhí)行。 Building configuration. Current configuration : 1559 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service passwor

19、d-encryption ! hostname test# 注意此處顯示的是我們配置的設(shè)備的名字 ! boot-start-marker boot-end-marker ! enable password cisco # 此處顯示的是剛才我們配置的 enable 密碼,注意此時(shí)是用明文顯示的,有點(diǎn)不安全。 ! no aaa new-model ! resource policy ! memory-size iomem 5 ip subnet-zero ! # 到這一行其實(shí)并未全部顯示完配置的內(nèi)容,我們可以按鍵盤上的任意鍵來(lái)終止繼續(xù)顯示。 在顯示的過程中通過按回車鍵可以逐行顯示,按空格鍵可以一頁(yè)

20、一頁(yè)的顯示。這些操作可 在實(shí)際的設(shè)備中體會(huì)。 test#conf t# 重新進(jìn)入到全局配置模式 test(config)#service pass 思科交換機(jī)基本配置實(shí)例講解 6 test(config)#service password-encryption # 利用這條命令給密碼加密顯示。 test(config)#end test#sh r# 退出到全局配置模式后,驗(yàn)證剛才的配置。 Building configuration. Current configuration : 1565 bytes ! version 12.3 service timestamps debug datet

21、ime msec service timestamps log datetime msec service password-encryption ! hostname test ! boot-start-marker boot-end-marker ! enable password 7 070C285F4D06cisco # 注意此處剛才明文顯示的密碼已經(jīng)變成加密顯示了,這樣從一定程度上保證了密碼的安 全。 ! no aaa new-model ! resource policy ! memory-size iomem 5 ip subnet-zero ! # 驗(yàn)證完畢后按任何一個(gè)鍵中斷顯

22、示,下面的內(nèi)容說(shuō)明終端登陸密碼的配置。 test#conf t Enter configuration commands, one per line. End with CNTL/Z. test(config)#no service password-encryption # 可利用這條命令(前面加 no)來(lái)去掉密碼加密功能,cisco 的所有命令都可以通過這種 方式來(lái)禁止。 test(config)#line con test(config)#line console 0# 利用這條命令來(lái)配置用超級(jí)終端登陸時(shí)的一些參數(shù)。 test(config-line)#pass test(config-

23、line)#password cisco# 添加密碼,此處我們配置的密碼為 cisco test(config-line)#loggi test(config-line)#logging ? # 在任何情況下如果你忘記了命令的相關(guān)參數(shù)可以用?來(lái)獲得提示和幫助 synchronous Synchronized message output 思科交換機(jī)基本配置實(shí)例講解 7 test(config-line)#logging sy test(config-line)#logging synchronous # 在我們進(jìn)行配置時(shí),IOS 會(huì)產(chǎn)生一些即時(shí)的提示信息,而這些信息會(huì)沖亂我們的光標(biāo)顯 示,用這

24、條命令可以將光標(biāo)規(guī)矩在下一行,即使出現(xiàn)了一些即時(shí)的提示。 test(config-line)#exit# 退出當(dāng)前 console 口的參數(shù)配置 test(config)#line vt?# telnet 登陸時(shí)相關(guān)參數(shù)的配置,此處用了?來(lái)尋求提示。 First Line number aux Auxiliary line console Primary terminal line tty Terminal controller vty Virtual terminal x/y Slot/Port for Modems test(config)#line vty 0 4 # 我們配置虛擬終端的

25、 0 到 4,也就是同時(shí)允許 5 個(gè)用戶可以 telnet 到這臺(tái)設(shè)備上來(lái)。 test(config-line)#pass test(config-line)#password cisco # 我們配置 telnet 時(shí)的密碼為 cisco,如果此處我們不設(shè)置密碼,那么用 telnet 來(lái)登陸的時(shí) 候并不會(huì)以空密碼登陸,而是會(huì)給你提示說(shuō):相關(guān)密碼沒有設(shè)置,禁止登陸。所以我們?yōu)?了能遠(yuǎn)程 telnet 到這臺(tái)設(shè)備,此處的密碼一定要設(shè)置好。 test(config-line)#login# 這條命令是允許通過 telnet 來(lái)登錄 test(config-line)#exit# 退出當(dāng)前配置模式到

26、全局配置模式。 test(config)# test(config)# test#conf s # 我們?cè)谧雠渲玫臅r(shí)候,會(huì)出現(xiàn)輸入錯(cuò)誤的情況,在這種情況下 ios 會(huì)以為你輸入的是一 個(gè)域名 Translating s.domain server (55) # 那么 ios 會(huì)做長(zhǎng)時(shí)間的搜尋,試圖找到這個(gè)域名對(duì)應(yīng)的 ip 地址. Translating s.domain server (55) # 這段時(shí)間是比較長(zhǎng)的,那么我們?nèi)绾谓盟倪@個(gè)功能呢? % Unknown command or computer name, or unable

27、to find computer address test#conf t Enter configuration commands, one per line. End with CNTL/Z. test(config)#no ip domain-lookup # 在全局配置模式下,將 ip 域名的搜尋功能關(guān)閉就可以了。 test(config)#end test#conf *Mar 1 01:40:46.895: %SYS-5-CONFIG_I: Configured from console by console test#conf x# 將上述功能關(guān)閉以后,再有輸入錯(cuò)誤的情況會(huì)直接提示你

28、輸入錯(cuò)誤。 思科交換機(jī)基本配置實(shí)例講解 8 % Invalid input detected at marker. test# test(config)#ip domain-name 8 # 如果有必要將設(shè)備配置上 DNS 功能的話就用這條命令。 # 基本配置完畢后我們驗(yàn)證一下所有的配置# test#sh run Building configuration. Current configuration : 1693 bytes ! version 12.3 service timestamps debug datetime msec service timestam

29、ps log datetime msec service password-encryption# 密碼加密顯示功能打開 ! hostname test ! boot-start-marker boot-end-marker ! enable password 7 070C285F4D06# 密碼被加密顯示了 ! no aaa new-model ! resource policy ! memory-size iomem 5 ip subnet-zero ! ! ip cef no ip domain lookup# 關(guān)閉了域名查找功能 no ip dhcp use vrf connected

30、 ! ! no ip ips deny-action ips-interface ! no ftp-server write-enable ! no crypto isakmp ccm ! 思科交換機(jī)基本配置實(shí)例講解 9 (略) ip http server no ip http secure-server ip classless ! control-plane ! line con 0 exec-timeout 0 0 password 7 094F471A1A0A# 用超級(jí)終端登陸的密碼,也同樣被加密顯示 logging synchronous line aux 0 line vty 0

31、 4 password 7 00071A150754# 用 telnet 登陸的密碼,也同樣被加密顯示 login ! ! end test# 3、cisco 設(shè)備端口配置詳解設(shè)備端口配置詳解 User Access Verification # 從 dos 提示符下運(yùn)行 telnet ip 地址,就會(huì)連接到相應(yīng)的交換機(jī)或者路由器 Password:# 輸入配置號(hào)的 telnet 密碼,也就是上節(jié)提到的 vtp 中的密碼 testen # 進(jìn)入特權(quán)模式 Password: # 輸入特權(quán)模式密碼,也就是上節(jié)提到的 enable 密碼。注意這些密 碼在輸入的時(shí)候屏幕是不顯示的。 test# tes

32、t# test#sh ip int brief# 查看當(dāng)前所有端口狀態(tài),包括 vlan 和實(shí)際的物理接口狀態(tài) Interface IP-Address OK? Method Status Protocol 協(xié) 議# 這行列示的各種狀態(tài)的名稱 FastEthernet1 unassigned 未分配 YES NVRAM down down Vlan1 54 YES NVRAM up up # vlan1 的狀態(tài)是 active 思科交換機(jī)基本配置實(shí)例講解 10 Vlan2 YES NVRAM up up Vlan10 54

33、 YES NVRAM up up Vlan20 54 YES NVRAM up up Vlan30 54 YES NVRAM up up Vlan40 54 YES NVRAM up up Vlan50 54 YES NVRAM up up Vlan60 54 YES NVRAM up up Vlan70 54 YES NVRAM up up Vlan80 54 YES NVRAM up up Vlan100 19

34、54 YES NVRAM up up Vlan110 54 YES NVRAM up up Vlan120 54 YES NVRAM up up Vlan150 54 YES NVRAM up up Vlan160 54 YES NVRAM up up GigabitEthernet1/1 unassigned YES unset up up # 物理接口 gi1/1 也是 active 狀態(tài) GigabitEthernet1/2 unassigned YES unse

35、t down down GigabitEthernet1/3 unassigned YES unset down down GigabitEthernet1/4 unassigned YES unset down down GigabitEthernet1/5 unassigned YES unset down down GigabitEthernet1/6 unassigned YES unset down down GigabitEthernet1/7 unassigned YES unset down down GigabitEthernet1/8 unassigned YES unse

36、t down down GigabitEthernet1/9 unassigned YES unset down down # 說(shuō)明:通過上述命令即可以查看當(dāng)前設(shè)備所有狀態(tài)的情況也可以查看端口的表示方式。 在此例中我們登陸的是一臺(tái) cisco4503 的三層交換機(jī);其中 GigabitEthernet1/1,表示的是這 臺(tái)交換機(jī)上的第 1 塊業(yè)務(wù)板的第 1 個(gè)端口,并且此端口是個(gè)千兆端口;而 GigabitEthernet3/19 表示的是這臺(tái)交換機(jī)上的第 3 塊業(yè)務(wù)版的第 19 個(gè)端口,并且此端口也 是一個(gè)千兆端口,其他的端口以此類推。千兆端口的名稱為:GigabitEthernet,百兆端

37、口的 名稱為:FastEthernet。 test# conf t # 進(jìn)入到全局配置模式。要想對(duì)端口、vlan、路由等操作一定要到全局配置模式中來(lái)。 Enter configuration commands, one per line. End with CNTL/Z. test(config)#inter test(config)#interface gi1/2進(jìn)入 Gi1/2 端口 # 通過此命令可進(jìn)去端口配置模式,此處我們進(jìn)入的是 GigabitEthernet1/2 口,gi1/2 為簡(jiǎn)寫。 test(config-if)#? #回車后進(jìn)入到端口配置模式,注意提示符的變化,輸入?尋求

38、在這個(gè)模式著那個(gè)的幫助。 Interface configuration commands: 思科交換機(jī)基本配置實(shí)例講解 11 access-group Access group configuration arp Set arp type (arpa, probe, snap) or timeout auto Configure Automation backup Modify backup parameters bandwidth Set bandwidth informational parameter bgp-policy Apply policy propogated by bgp

39、community string carrier-delay Specify delay for interface transitions cdp CDP interface subcommands channel-group Etherchannel/port bundling configuration channel-protocol Select the channel protocol (LACP, PAgP) dampening Enable event dampening default Set a command to its defaults delay Specify i

40、nterface throughput delay description Interface specific description dot1x Interface Config Commands for 802.1x duplex Configure duplex operation. exit Exit from interface configuration mode flow-sampler Attach flow sampler to the interface flowcontrol Configure flow operation. help Description of t

41、he interactive help system ip Interface Internet Protocol config commands isis IS-IS commands iso-igrp ISO-IGRP interface subcommands keepalive Enable keepalive l2protocol-tunnel Tunnel Layer2 protocols lacp LACP interface subcommands load-interval Specify interval for load calculation for an interf

42、ace logging Configure logging for interface loopback Configure internal loopback on an interface mac MAC interface commands macro Command macro max-reserved-bandwidth Maximum Reservable Bandwidth on an Interface mtu Set the interface Maximum Transmission Unit (MTU) no Negate a command or set its def

43、aults pagp PAgP interface subcommands power Power configuration qos QoS configuration rmon Configure Remote Monitoring on an interface service-policy Configure QoS Service Policy shutdown Shutdown the selected interface snmp Modify SNMP interface parameters spanning-tree Spanning Tree Subsystem spee

44、d Configure speed operation. storm-control storm configuration 思科交換機(jī)基本配置實(shí)例講解 12 switchport Set switching mode characteristics timeout Define timeout values for this interface transmit-interface Assign a transmit interface to a receive-only interface tx-queue Configure interface transmit queue udld C

45、onfigure UDLD enabled or disabled and ignore global UDLD setting vlan-range config vlan test(config-if)#spe test(config-if)#speed ? # 我們可指定這個(gè)端口的速度,比如這個(gè)端口接的是一個(gè)百兆的收發(fā)器,我們就可以強(qiáng)制 將此端口設(shè)置成 100M 10 Force 10 Mbps operation# 強(qiáng)制此端口為 10M 100 Force 100 Mbps operation# 強(qiáng)制此端口為 100M 1000 Force 1000 Mbps operation# 強(qiáng)

46、制此端口為 1000M auto Enable AUTO speed configuration# 允許速度自動(dòng)協(xié)商 test(config-if)#speed 100 # 通過此命令就可將此端口強(qiáng)制設(shè)成 100M,默認(rèn)的狀態(tài)下是 auto。 test(config-if)#dup test(config-if)#duplex ? # 用此命令可配置此端口的雙工模式,有 3 個(gè)選項(xiàng)供選擇。 auto Enable AUTO duplex configuration# 自動(dòng)配置此端口的雙工模式 full Force full duplex operation# 強(qiáng)制此端口為全雙工模式 half

47、Force half-duplex operation# 強(qiáng)制此端口為半雙工模式 test(config-if)#duplex auto test(config-if)#end# 用 end 命令可直接退回到特權(quán)模式,用 exit 是一層一層的退出。 test#ter test#terminal moni test#terminal monitor # 打開終端監(jiān)控。當(dāng)用 telnet 登陸的時(shí)候默認(rèn)是不顯示各端口的實(shí)時(shí)變化情況的,打開這 個(gè)功能就能實(shí)時(shí)的看到這臺(tái)交換機(jī)上哪個(gè)端口 up,哪個(gè)端口 down,這對(duì)于排錯(cuò)的時(shí)候是 很有幫助的。 test#conf t Enter configura

48、tion commands, one per line. End with CNTL/Z. test(config)#int gi1/2# 重新回到端口配置模式 test(config-if)#shut# 此命令可手工關(guān)閉此端口 test(config-if)#no shut# 此命令為打開此端口 test(config-if)#switchport access vlan ? # 這條命令可配置此端口屬于哪個(gè) vlan,當(dāng)然此 vlan 要事先建好。 VLAN ID of the VLAN when this port is in access mode dynamic When in ac

49、cess mode, this interfaces VLAN is controlled by VMPS 思科交換機(jī)基本配置實(shí)例講解 13 test(config-if)#switchport access vlan 100 # 我們配置此端口屬于 vlan100,如果此端口事先屬于其他 vlan 那么,會(huì)從其他 vlan 退出 test(config-if)#exit test(config)#int rang# 亦可成批的配置端口,利用這個(gè)命令 test(config)#int range gi 1/1 - 5 # 表示同時(shí)對(duì) gi1/1 到 gi1/5 這 5 個(gè)端口進(jìn)行操作,注意命令

50、“1 - 5” ,之間有空格。 test(config-if-range)#switchport access vlan 100# 可同時(shí)配置這 5 個(gè)端口屬于 vlan100 test(config-if-range)#shutdown# 可同時(shí)關(guān)閉這 5 個(gè)端口 test(config-if-range)#no shutdown# 可同時(shí)啟用這 5 個(gè)端口 test(config-if-range)#exit test(config-if)#end test# test#sh int gi1/2# 在特權(quán)模式中,可查看單個(gè)端口的狀 態(tài) GigabitEthernet1/2 is down,

51、 line protocol is down (notconnect) # 這行說(shuō)明此端口當(dāng)前的狀態(tài)是 down 的 Hardware is Gigabit Ethernet Port, address is 001a.6db4.a3c1 (bia 001a.6db4.a3c1) # 此端口的 MAC 地址 MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set

52、(10 sec) Auto-duplex, Auto-speed, link type is auto, media type is 10/100/1000-TX # 此端口的模式為 10/100/1000-TX input flow-control is off, output flow-control is off ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of show interface counters never Input

53、 queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts (0 multicast) 0 runts, 0 g

54、iants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 0 packets output, 0 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failur

55、es, 0 output buffers swapped out 思科交換機(jī)基本配置實(shí)例講解 14 test#sh int gi1/1 GigabitEthernet1/1 is up, line protocol is up (connected) # 這行表明此端口是 up 的,并且連有網(wǎng)線。 Hardware is Gigabit Ethernet Port, address is 001a.6db4.a3c0 (bia 001a.6db4.a3c0) MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, reliability 255/255, t

56、xload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX input flow-control is off, output flow-control is off ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never La

57、st clearing of show interface counters never Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 5 minute input rate 1293000 bits/sec, 426 packets/sec 5 minute output rate 2410000 bits/sec, 528 packets/sec 273591244 packets in

58、put, 142285545179 bytes, 0 no buffer Received 0 broadcasts (0 multicast) 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored # 沒有輸入錯(cuò)誤,表明鏈路狀態(tài)良 好 0 input packets with dribble condition detected 335026620 packets output, 223732323465 bytes, 0 underruns# 輸出數(shù)據(jù)包統(tǒng)計(jì) 0 output

59、errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out test# test# test# test#wr# 保存剛才的配置結(jié)果 4、vlan 的規(guī)劃及配置的規(guī)劃及配置 在本節(jié)中我們講解 vlan 的規(guī)劃及具體的配置命令。在此例中我們用的是 vtp(VLAN Trunking Protocol)server 的模式,在這種模

60、式中我們需要配置核心交換機(jī)的 vtp 模式為 server,各接入交換機(jī)的 vtp 模式為 cilent,那么配置完成后接入交換機(jī)就會(huì)通過 trunk 口自 思科交換機(jī)基本配置實(shí)例講解 15 動(dòng)從核心交換機(jī)學(xué)習(xí)到所有的 vlan 配置信息。在接入交換機(jī)中只需要添加相應(yīng)的端口即可, 這樣易于管理與部署。具體的配置命令我們通過兩小節(jié)來(lái)演示: 4.1 核心交換機(jī)的相關(guān)配置核心交換機(jī)的相關(guān)配置 (這是一臺(tái)已經(jīng)配置好了的交換機(jī),但這并不會(huì)影響我們的演示效果。所有我們新作的配 置會(huì)在演示結(jié)束后清除。 ) TEST#sh vlan# 顯示已經(jīng)有的 vlan 信息,并且同時(shí)顯示了各端口所屬的 vlan VLA

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論