路由與交換的配置命令_第1頁
路由與交換的配置命令_第2頁
路由與交換的配置命令_第3頁
路由與交換的配置命令_第4頁
路由與交換的配置命令_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、1、switch:用戶模式能查看版本信息2960|-24TTSwitchO2、在用戶模式下輸入enable會進(jìn)特權(quán)模式它能保存、修改、刪除這一系列的配置switchenablLswitch# :特權(quán)模式,下面有一些命令就在此命令下完成:、刪除vlan的文件配置:delete flash:vlan.dat、刪除vlan中的配置文件:erase startup-config、查看vlan配置文件是否被刪除及vlan的是否創(chuàng)建:show vlan、重新啟動交換機(jī):reload、查看當(dāng)前交換機(jī)的配置:show running-config、保存對交換機(jī)所配置的內(nèi)容,即是保存在Nvram:copy ru

2、nning-config startup-config、檢查 Nvram 的內(nèi)容:show startup-config、檢查虛擬接口 vlan的特征:show interface vlan 1、查看接口 IP 的屬性:show ip interface vlan 1、查看cisco的信息:show version、查看交換機(jī)所用快速以太網(wǎng)接口的默認(rèn)屬性:show interface fastethernet 0/18、查看閃存目錄中的內(nèi)容:show flash或dir flash3、在特權(quán)模式下輸入configure ternina后會進(jìn)入全局模式,一切的配置必須在此模式中進(jìn)行配置Switc

3、h#configure terninaHswitchp(config)# :全局模式swin 門h.-門rl-nf i g J:tt:h.口lll-tnalliITIhh. hh -IJii-kl figuITIrLat- lITIw S.IIIlllmll- eli門 1 S.IIIIII hh L n11-rL fig:ttl inm 門 211.11OHIt0 1 門II- n f i g 1 imITI:tt:pLlll址IxnllEli門 ilII門II- 目-(-IJii-kl f i g 1 iTl-E#IIIM iITt -3w&sg+sw_rch(conf_g)#hosmam

4、e+ 冷ssg+ -3wHf3ns國、SM瞟圈【sw_rch(conf 一g)#enab_e password +1 -3wjlttts)4國- sw_rch(conf-g)#enab-e secrer-l-+ 國 4/ 苛冷ssswconsoe 口 !-L nI1-rL f i g J:tt:l inm 門ll-rLlllOHItI|一 hli -門II- n f i g 1 imITI:tt:pLlll址Txrll- Eli門 illl門口 hh _(-IJIi-kl f i g 1 irlITIJ 111二心 in.hh _(nI1-rL fig-11 inm J:ttmHit-HfsB

5、3wn、sHfconso-e 口【sw-rch(conf-g)# -me conso-e 0 -w國(M翠詡邑西腳幽兵國【sw_rch(conf 一 gme)#password + 國 。,膜知-sw_rch(conf-gme)#-ogmS3SS -El 門口m f i g-:ttl irLIIIvty 0 4hlH門口rtf i g- 1 irLIII林 ppllllllmll- e d. lNIlvl4CHEhh. -(n OS fig-1 inm:tt1II- gin.El 門口m fig-1 inIII牯ITIMin , ms3s,,弟-1/1限知sw_rch(conf 一 g)#-m

6、e vty 0 4誓,弟出-膜劃 -w國- sw_rch(conf-gme)#password + 國 。,SIM膜知-sw_rchp(conf-gme)#-ogm6,hh ( c on fig) #nc ip dciiLain-1 o okuphli (c on f i g) # s e rvi c e p as st.tfi r d- enc rypt ion對所有密碼進(jìn)行加密:switch(config)#service password-encryption、不解析錯誤的命令:switch(config)#no ip domain-lookup7、創(chuàng)建vlan( 21001,注vlan

7、 1既不可以創(chuàng)建,也不可以刪除)Ewir. ch (r on fig) ftvl ail ZSwit ch ( c on f i g-vl ail) #vl ail 3Swit ch ( c on f i g-vl ai) # e x it、創(chuàng)建vlan : vlan +要創(chuàng)建vlan的值、給vlan取名:switch(config-vlan)#name +名字(此步可以不要)、把PC與交換機(jī)相連的端口添加到相應(yīng)的vlan中:Swit ch I: c on fig) it int f 0 /1ST.iitcl i: conf ig-i f J #switcliport access vlaii

8、 ZEwir. ch i: c on f i g- i f J jS e x itSwit ch I: c on fig) it int f 0 / 3ST.iitcl i: conf ig-i f ) #switchport access vlaii 3a、Switch(config)#interface + 端口b、Switch(config-if)#switchport access vlan + 木相應(yīng) vlan 的勺值、需要傳遞多個vlan信息就要打中繼口,即trunk5 wit ch (c on fig) if int f 0./ Z5 wit ch ( c on f ig-i f

9、 if swit clip o rt mo de t ri.uika、switch(config)#interface + 交換機(jī)另一端口b、switch(config-if)#switchport mode trunk8、傳統(tǒng)vlan的通信(1 )s router 的配置P.cut e r ( c on fig) # int f 0 / 0P.outer (conf ig-i f)口 shut% L INK- 5 - CHAI-J GED : Int er face Fast Ethe r net 0 / 0 . chaiige d st at% LINE P P.O T 0 - S-UPD

10、 OIiJIJ: L ine p rot oc o 1 on Int er face F ast-Ethe o upRouter (config-if J #ip add 19_ 168_ 1_ 1 255_ -5-5_ ESS_ 0P.cuter ( conf ig-i f) jfexitRoute r(c onfig)nint f 0/1Rout er 1J2 on f ig-i f) jfno shut% L TTIK-S -CHAJJGED : Int er face F ast Ethe rnet 0 /1. chaiiged st at e t o up% LINEPP.UTU-5

11、-UPDOTiHJ: Line protocn 1 on Inter f ace FastEthernet0/1, chaiiged state t o upRouter (conf ig-i f :i itip add 19Z- 16S- Z- 1 Z55- Z55- Z55- 0、為接口配置IP地址(該IP是相應(yīng)vlan的PC網(wǎng)關(guān))、激活端口: no shutdown(2)、switch 的配置Swit ch ( c on fig) fEvl ai ZEwir. ch i; r on f i g-vl ail 】Svl ail 3 Swit ch ( c on f i g-vl ail J

12、 # int f 0 /1 Swit ch ( c on f ig-i f)等三 wit clip o rt Ewir. ch i; r onf ig-i f) S int f 0./ 3 Swit ch ( c on f ig-i f) # 三 Swit ch ( c on fig) fEvl ai ZEwir. ch i; r on f i g-vl ail 】Svl ail 3 Swit ch ( c on f i g-vl ail J # int f 0 /1 Swit ch ( c on f ig-i f)等三 wit clip o rt Ewir. ch i; r onf ig-i

13、 f) S int f 0./ 3 Swit ch ( c on f ig-i f) # 三 wit clip o rt Switch(con f i g-i f)# int f0/Z Swit ch (c on f ig-i f) # 三 wit clip o rt Switch i; r onf ig-i f) #int f 0/4Swit ch ( c on f ig-i f) # 三 wit clip o rtac c: ej三三ac cessaccessac c: ej三三vlaivlaiivlaiivlaii、創(chuàng)建vlan,將PC端口劃入相應(yīng)vlan、將switch與router相

14、連的端口劃入相應(yīng)的vlan、PC的配置:就是給PC配置IP,注PC的默認(rèn)網(wǎng)關(guān)與router的IP相同,網(wǎng)關(guān)P ConfigurationDHCPa StaticIP AddressSubnet MaskDefault GatewayDNS Server 2SS.2S5.2S5.0 192.16S.1.1相同9、單臂路由實現(xiàn)vlan的通信(1)router 配置P.outer ( c nf ig) nt f 0/0P.outer (conf ig-i f) jSno shut% L 工 NK- E - CHANGED : I nt er face F ast-Ethe r net 0 / 0 /

15、 chaj% LINE P P.O T 0-5 -UPD OW: L ine p r ot oc o 1 on Int er face o upP.outer (conf ig-i f) ttexitP.out e r ( c on f i g J # int f 0 / 0 - 1專LINK-S-CHANGED: Interface FastEthernetLi./O_ 1, cl% L INE P P.O T 0 - 5-UPD OTiJlJ z L ine p r ct oc o 1 on Int er face t o upP.out e r i; c on f i g-三uh i f

16、) ft enc a dot ZRouter ( ccnf ig-si_it.i f) flip add 19_ 16:3_ 1_ 1 S_ 25SP.out e r (c on f i g-muh i f) ft e x itP.out e r i; c on fig) # int f 0/0 - Z% L TNK-5 一 CHAN GED: Int er face F astEthe met 0/0 - Z r chaiige d st at e t o up% LINE P P.O TO- S-UPI:10W: L ine p r ot oc ol on Int er face F as

17、t Ethe met 0/0 - Z chaiige d st at e t o upRout er ( c on f i g-三 uh i f J it enc a dot 3Router (conf ig-sut-i f) flip add 192.168_1 255 _ 2S5 _ 55.0Rzuter (cijiif ig-三ubi f J fiexitP.out e r (c on fig)# int f 0/0 - 3% LI NIC-S -CHAI-J GED : Int er face F ast-Ethe met 0/0 - 3 才 chaiige d st at 已 t o

18、 up% L INE P P.O T 0 - S - UPI:1 LiTiJl-I: L ine p r ot oc o 1 on Int er face F ast Ethe r net 0/0 - 3 . chaiige d st at e t o upRzuter (cijiif ig-三ubi f J fienca dot 4P.cuter (cc.nfig-si_it.if J trip add 19Z. 16E:_ 3_ 1 ZS5_ ZSS_ ZS5.0、添加子接口: interface f0/0.1(此處有多少個vlan就添加多少個子接口)、將子接口封裝到相應(yīng)的vlan : e

19、ncapsulation dot +相應(yīng)vlan的值、將子接口配置IP : ip add +ip地址+子網(wǎng)掩碼、激活物理接口: no shutdown(2)、switch 的配置、創(chuàng)建vlan,交PC的端口劃入到相應(yīng)vlan、與router相連的端口打trunk(3)、配置PC的IPonfigurationL2JDHCPq StaticIP Address1IP Address192.16S.1.2Subnet Mask25S.25S.25S.0Subnet Mask25S.25S.25S.0Default Gateway192.16S.1.1Default Gateway192.16S.1.

20、1DNS ServerIPConfigurationDHCPq StaticIP Address192.16S.2.2Subnet Mask255.255.255.0Default Gateway192.16S.2.1DNS Server9、三層交換(1)、配置三層交換Swit ch i: c on fig) fivl aii ZSwit ch i: c on f i g-vl ail) #vl aii 3Swit ch i: c on f i g-vl aii)。int vl ai Swir.ch i:conf ig-i f :i #ip add 19E_ 16S_ 1_ 1 ESS_ EE

21、S_ 2SS_ 0Swit ch i: c on f i g- i f J # int vl ail 3Swit ch i: c on f i g- i f :i # ip add 192_ 168_ 2_ 1 ZSS. ZSS. ZSS. 0Swit ch i: c on f i g- i f) # e k itSwit ch i: c on fig) if ip r out ingSuit ch (c on fig) if e x it、啟用三層交換:(config)#ip routing、創(chuàng)建vlan:(config)# vlan +要創(chuàng)建vlan的值、把相應(yīng)的vlan配置IPa、指定一個 vlan:(config)#interface vlan + vlan相應(yīng)的值c、配置 IP : (config-if)#ip add + ip + 子網(wǎng)掩碼Swit ch i: c on fig) ifvl aii Swit ch i: c on f ig-vl an) fivl aii 3Swit ch i: c on f i g-vl ai) if int f 0 /1Switch i: conf ig-i f) #switchpcrt access vlaii Swit ch i: c on f ig-i f) it int f 0/ ZSwit ch i:

溫馨提示

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

評論

0/150

提交評論