下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
Cisco路由器交換機配置命令詳解1.交換機支持的命令:
交換機基本狀態(tài):
switch:
;ROM狀態(tài),路由器是rommon〉
hostname〉
;用戶模式hostname#
;特權(quán)模式
hostname(config)#
;全局配置模式hostname(config-if)#
;接口狀態(tài)
交換機口令設(shè)置:
switch〉enable
;進(jìn)入特權(quán)模式switch#configterminal
;進(jìn)入全局配置模式
switch(config)#hostname〈hostname〉
;設(shè)置交換機的主機名
switch(config)#enablesecretxxx
;設(shè)置特權(quán)加密口令
switch(config)#enablepasswordxxa
;設(shè)置特權(quán)非密口令
switch(config)#lineconsole0
;進(jìn)入控制臺口
switch(config-line)#linevty04
;進(jìn)入虛擬終端
switch(config-line)#login
;允許登錄
switch(config-line)#passwordxx
;設(shè)置登錄口令xxswitch#exit
;返回命令
交換機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模式
交換機設(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:
;查看閃存
交換機顯示命令:
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
;重新起動
路由器口令設(shè)置:
router〉enable
;進(jìn)入特權(quán)模式
router#configterminal
;進(jìn)入全局配置模式
router(config)#hostname〈hostname〉
;設(shè)置交換機的主機名
router(config)#enablesecretxxx
;設(shè)置特權(quán)加密口令
router(config)#enablepasswordxxb
;設(shè)置特權(quán)非密口令
router(config)#lineconsole0
;進(jìn)入控制臺口
router(config-line)#linevty04
;進(jìn)入虛擬終端
router(config-line)#login
;要求口令驗證
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è)置同步時鐘
router(config-if)#ipaddress〈ip〉〈netmask〉
;設(shè)置IP地址
router(config-if)#ipaddress〈ip〉〈netmask〉second
;設(shè)置第二個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
;開機配置存到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)路由舉例
動態(tài)路由:
router(config)#iprouting
;啟動路由轉(zhuǎn)發(fā)
router(config)#routerrip
;啟動RIP路由協(xié)議。
router(config-router)#network〈netid〉
;設(shè)置發(fā)布路由
router(config-router)#negihbor〈ip〉
;點對點幀中繼用。
幀中繼命令:
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è)置虛電路號
router(config-s0)#frame-relayinterface-dlci16
;
router(config)#log-adjacency-changes
;記錄鄰接變化
router(config)#ints0/0.1point-to-point
;設(shè)置子接口點對點
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
擴展訪問控制列表:
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映射到一個公網(wǎng)IP不同的端口上。
外部網(wǎng)關(guān)協(xié)議配置
routerA(config)#routerbgp100
routerA(config-router)#network
routerA(config-router)#neighborremote-as200
配置PPP驗證:
RouterA(config)#username〈RouterB〉password〈word〉
RouterA(config)#ints0RouterA(config-if)#pppauthentication{chap|pap}
3.PIX防火墻命令
Pix525(config)#nameifethernet0outsidesecurity0
;命名接口和級別
Pix525(config)#interfaceethernet0auto
;設(shè)置接口方式
Pix525(config)#interfaceethernet1100full
;設(shè)置接口方式
Pix525(conf
溫馨提示
- 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二四年度租賃合同:高端辦公設(shè)備(如復(fù)印機、傳真機)
- 2025勞動合同書(合同版本)
- 2025年廣告宣傳推廣合同
- 2025房產(chǎn)委托代持合同書
- 2025房產(chǎn)代理銷售合同
- 2025建筑消防設(shè)施檢測合同書最終
- 2025復(fù)印機購銷合同協(xié)議(精簡版)
- 藥店藥師聘用合同年
- 2025年建筑物空調(diào)系統(tǒng)設(shè)計合同
- 2025年度個人住房貸款擔(dān)保合同標(biāo)準(zhǔn)范本8篇
- 中國末端執(zhí)行器(靈巧手)行業(yè)市場發(fā)展態(tài)勢及前景戰(zhàn)略研判報告
- 北京離婚協(xié)議書(2篇)(2篇)
- 2025中國聯(lián)通北京市分公司春季校園招聘高頻重點提升(共500題)附帶答案詳解
- 康復(fù)醫(yī)學(xué)科患者隱私保護(hù)制度
- Samsung三星SMARTCAMERANX2000(20-50mm)中文說明書200
- 2024年藥品質(zhì)量信息管理制度(2篇)
- 2024年安徽省高考地理試卷真題(含答案逐題解析)
- 廣東省廣州市2024年中考數(shù)學(xué)真題試卷(含答案)
- 高中學(xué)校開學(xué)典禮方案
- 內(nèi)審檢查表完整版本
- 3級人工智能訓(xùn)練師(高級)國家職業(yè)技能鑒定考試題及答案
評論
0/150
提交評論