



下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Cisco路由器交換機(jī)配置命令詳解1.交換機(jī)支持的命令:
交換機(jī)基本狀態(tài):
switch:
;ROM狀態(tài),路由器是rommon〉
hostname〉
;用戶模式hostname#
;特權(quán)模式
hostname(config)#
;全局配置模式hostname(config-if)#
;接口狀態(tài)
交換機(jī)口令設(shè)置:
switch〉enable
;進(jìn)入特權(quán)模式switch#configterminal
;進(jìn)入全局配置模式
switch(config)#hostname〈hostname〉
;設(shè)置交換機(jī)的主機(jī)名
switch(config)#enablesecretxxx
;設(shè)置特權(quán)加密口令
switch(config)#enablepasswordxxa
;設(shè)置特權(quán)非密口令
switch(config)#lineconsole0
;進(jìn)入控制臺(tái)口
switch(config-line)#linevty04
;進(jìn)入虛擬終端
switch(config-line)#login
;允許登錄
switch(config-line)#passwordxx
;設(shè)置登錄口令xxswitch#exit
;返回命令
交換機(jī)VLAN設(shè)置:
switch#vlandatabase
;進(jìn)入VLAN設(shè)置
switch(vlan)#vlan2
;建VLAN2
switch(vlan)#novlan2
;刪vlan2
switch(config)#intf0/1
;進(jìn)入端口1
switch(config-if)#switchportaccessvlan2
;當(dāng)前端口加入vlan2
switch(config-if)#switchportmodetrunk
;設(shè)置為干線
switch(config-if)#switchporttrunkallowedvlan1,2;設(shè)置允許的vlan
switch(config-if)#switchporttrunkencapdot1q
;設(shè)置vlan中繼
switch(config)#vtpdomain〈name〉
;設(shè)置發(fā)vtp域名
switch(config)#vtppassword〈word〉
;設(shè)置發(fā)vtp密碼
switch(config)#vtpmodeserver
;設(shè)置發(fā)vtp模式
switch(config)#vtpmodeclient
;設(shè)置發(fā)vtp模式
交換機(jī)設(shè)置IP地址:
switch(config)#interfacevlan1
;進(jìn)入vlan1
switch(config-if)#ipaddress〈IP〉〈mask〉
;設(shè)置IP地址
switch(config)#ipdefault-gateway〈IP〉
;設(shè)置默認(rèn)網(wǎng)關(guān)
switch#dirflash:
;查看閃存
交換機(jī)顯示命令:
switch#write
;保存配置信息
switch#showvtp
;查看vtp配置信息
switch#showrun
;查看當(dāng)前配置信息
switch#showvlan
;查看vlan配置信息
switch#showinterface
;查看端口信息
switch#showintf0/0
;查看指定端口信息
2.路由器支持的命令:
路由器顯示命令:router#showrun
;顯示配置信息
router#showinterface
;顯示接口信息router#showiproute
;顯示路由信息
router#showcdpnei
;顯示鄰居信息router#reload
;重新起動(dòng)
路由器口令設(shè)置:
router〉enable
;進(jìn)入特權(quán)模式
router#configterminal
;進(jìn)入全局配置模式
router(config)#hostname〈hostname〉
;設(shè)置交換機(jī)的主機(jī)名
router(config)#enablesecretxxx
;設(shè)置特權(quán)加密口令
router(config)#enablepasswordxxb
;設(shè)置特權(quán)非密口令
router(config)#lineconsole0
;進(jìn)入控制臺(tái)口
router(config-line)#linevty04
;進(jìn)入虛擬終端
router(config-line)#login
;要求口令驗(yàn)證
router(config-line)#passwordxx
;設(shè)置登錄口令xx
router(config)#(Ctrl+z)
;返回特權(quán)模式
router#exit
;返回命令
路由器配置:
router(config)#ints0/0
;進(jìn)入Serail接口
router(config-if)#noshutdown
;激活當(dāng)前接口
router(config-if)#clockrate64000
;設(shè)置同步時(shí)鐘
router(config-if)#ipaddress〈ip〉〈netmask〉
;設(shè)置IP地址
router(config-if)#ipaddress〈ip〉〈netmask〉second
;設(shè)置第二個(gè)IP
router(config-if)#intf0/0.1
;進(jìn)入子接口
router(config-subif.1)#ipaddress〈ip〉〈netmask〉
;設(shè)置子接口IP
router(config-subif.1)#encapsulationdot1q〈n〉
;綁定vlan中繼協(xié)議
router(config)#config-register0x2142
;跳過配置文件
router(config)#config-register0x2102
;正常使用配置文件
router#reload
;重新引導(dǎo)
路由器文件操作:
router#copyrunning-configstartup-config
;保存配置
router#copyrunning-configtftp
;保存配置到tftp
router#copystartup-configtftp
;開機(jī)配置存到tftp
router#copytftpflash:
;下傳文件到flash
router#copytftpstartup-config
;下載配置文件
ROM狀態(tài):
Ctrl+Break
;進(jìn)入ROM監(jiān)控狀態(tài)
rommon〉confreg0x2142
;跳過配置文件
rommon〉confreg0x2102
;恢復(fù)配置文件
rommon〉reset
;重新引導(dǎo)
rommon〉copyxmodem:〈sname〉flash:〈dname〉
;從console傳輸文件
rommon〉IP_ADDRESS=
;設(shè)置路由器IP
rommon〉IP_SUBNET_MASK=
;設(shè)置路由器掩碼
rommon〉TFTP_SERVER=
;指定TFTP服務(wù)器IP
rommon〉TFTP_FILE=c2600.bin
;指定下載的文件
rommon〉tftpdnld
;從tftp下載
rommon〉dirflash:
;查看閃存內(nèi)容rommon〉boot
;引導(dǎo)IOS
靜態(tài)路由:
iproute〈ip-address〉〈subnet-mask〉〈gateway〉
;命令格式
router(config)#iproute
;靜態(tài)路由舉例
router(config)#iproute
;默認(rèn)路由舉例
動(dòng)態(tài)路由:
router(config)#iprouting
;啟動(dòng)路由轉(zhuǎn)發(fā)
router(config)#routerrip
;啟動(dòng)RIP路由協(xié)議。
router(config-router)#network〈netid〉
;設(shè)置發(fā)布路由
router(config-router)#negihbor〈ip〉
;點(diǎn)對(duì)點(diǎn)幀中繼用。
幀中繼命令:
router(config)#frame-relayswitching
;使能幀中繼交換
router(config-s0)#encapsulationframe-relay
;使能幀中繼
router(config-s0)#fram-relaylmi-typecisco
;設(shè)置管理類型
router(config-s0)#frame-relayintf-typeDCE
;設(shè)置為DCE
router(config-s0)#frame-relaydlci16
;
router(config-s0)#frame-relaylocal-dlci20
;設(shè)置虛電路號(hào)
router(config-s0)#frame-relayinterface-dlci16
;
router(config)#log-adjacency-changes
;記錄鄰接變化
router(config)#ints0/0.1point-to-point
;設(shè)置子接口點(diǎn)對(duì)點(diǎn)
router#showframepvc
;顯示永久虛電路
router#showframemap
;顯示映射
基本訪問控制列表:
router(config)#access-list〈number〉permit|deny〈sourceip〉〈wild|any〉
router(config)#interface〈interface〉
;default:denyany
router(config-if)#ipaccess-group〈number〉in|out
;default:out
例1:router(config)#access-list4permit
router(config)#access-list4deny55
router(config)#access-list4permit55
router(config)#access-list4deny55
router(config)#access-list4permitany
router(config)#intf0/0
router(config-if)#ipaccess-group4in
擴(kuò)展訪問控制列表:
access-list〈number〉permit|denyicmp〈SourceIPwild〉〈destinationIP
wild〉[type]
access-list〈number〉permit|denytcp〈SourceIPwild〉〈destinationIPwild〉[port]
router(config)#access-list101denyicmpanyecho
router(config)#access-list101permitipanyany
router(config)#ints0/0
router(config-if)#ipaccess-group101in
router(config)#access-list102denytcpanyeq80
router(config)#access-list102permitipanyany
router(config)#interfaces0/1
router(config-if)#ipaccess-group102out
刪除訪問控制例表:
router(config)#noaccess-list102router(config-if)#noipaccess-group101in
路由器的nat配置
Router(config-if)#ipnatinside
;當(dāng)前接口指定為內(nèi)部接口
Router(config-if)#ipnatoutside
;當(dāng)前接口指定為外部接口
Router(config)#ipnatinsidesourcestatic[p]〈私有IP〉〈公網(wǎng)IP〉[port]
Router(config)#ipnatinsidesourcestatic
Router(config)#ipnatinsidesourcestatictcp8080
Router(config)#ipnatpoolp10
Router(config)#ipnatinsidesourcelist1poolp1
Router(config)#ipnatinsidedestinationlist2poolp2
Router(config)#ipnatinsidesourcelist2interfaces0/0overload
Router(config)#ipnatpoolp2typerotary
Router#showipnattranslation
rotary參數(shù)是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。
overload參數(shù)用于PAT將內(nèi)部IP映射到一個(gè)公網(wǎng)IP不同的端口上。
外部網(wǎng)關(guān)協(xié)議配置
routerA(config)#routerbgp100
routerA(config-router)#network
routerA(config-router)#neighborremote-as200
配置PPP驗(yàn)證:
RouterA(config)#username〈RouterB〉password〈word〉
RouterA(config)#ints0RouterA(config-if)#pppauthentication{chap|pap}
3.PIX防火墻命令
Pix525(config)#nameifethernet0outsidesecurity0
;命名接口和級(jí)別
Pix525(config)#interfaceethernet0auto
;設(shè)置接口方式
Pix525(config)#interfaceethernet1100full
;設(shè)置接口方式
Pix525(conf
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)師聘用免責(zé)協(xié)議書
- 合伙投資飯店協(xié)議書
- 后置埋件承包協(xié)議書
- 廠房維修維護(hù)協(xié)議書
- 廈門加裝電梯協(xié)議書
- 場(chǎng)地冷庫(kù)出租協(xié)議書
- 土地有償贈(zèng)予協(xié)議書
- 原始賬戶轉(zhuǎn)讓協(xié)議書
- 在營(yíng)店鋪轉(zhuǎn)讓協(xié)議書
- 土地分配合同協(xié)議書
- 國(guó)家開放大學(xué)《Python語言基礎(chǔ)》實(shí)驗(yàn)2:基本數(shù)據(jù)類型和表達(dá)式計(jì)算參考答案
- 員工關(guān)系管理專項(xiàng)職業(yè)能力考核規(guī)范cxy
- 2024統(tǒng)編本語文二年級(jí)下冊(cè)第四、第五單元測(cè)試題及答案(各一套)
- 美術(shù)學(xué)校工藝美術(shù)專業(yè)傳承和創(chuàng)新研究
- 多目標(biāo)粒子群優(yōu)化算法的改進(jìn)及應(yīng)用研究
- 兩家公司合作可行性方案
- 項(xiàng)目管理培訓(xùn)課程
- 數(shù)據(jù)庫(kù)性能優(yōu)化策略
- 糖尿病性周圍神經(jīng)病的護(hù)理查房
- 微電子機(jī)械系統(tǒng)(MEMS)傳感器電路
- 音樂演唱會(huì)居間協(xié)議書
評(píng)論
0/150
提交評(píng)論