



免費(fèi)預(yù)覽已結(jié)束,剩余1頁可下載查看
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
路由交換命令總結(jié)基礎(chǔ)配置進(jìn)入console口進(jìn)行本地配置用戶模式 xxenable n特權(quán)模式 xx#configure terminal全局配置模式 xx(config)#interface f|s n/m進(jìn)入接口配置模式xx(config-if)#進(jìn)入(子)接口模式后配置IP(config-if)#ip addr A.B.C.D 子網(wǎng)掩碼激活接口(config-if)#no shutdown配置速度(config-if)#speed auto|10|100配置接口工作模式(config-if)#duplex auto|half|full配置時(shí)鐘(串行口DCE端)(config-if)#clock rate n反向操作(刪除配置)no + 命令在換回接口上配多個(gè)ip(config-if)#ip addr A.B.C.D 子網(wǎng)掩碼(config-if)#ip addr A.B.C.D 子網(wǎng)掩碼 secondary查看所有配置#show running-config路由器關(guān)閉路由功能充當(dāng)主機(jī)(config)#no ip routing為路由器設(shè)置網(wǎng)關(guān)(config)#ip default-gateway ip地址改機(jī)器名字(config)#hostname yy控制線路超時(shí)(config)#line n(config-line)#exec-timeout 0 0關(guān)閉域名解析功能(config)#no ip domain-lookup開啟路由器http功能(config)#ip http server(config)#username xxx password yyy(config)#username xxx secret yyy(config)#enable secret yyy啟用密碼加密服務(wù)(config)#service password-encryption yyy開啟路由器https功能(config)#ip http secure-server開啟路由器遠(yuǎn)程登錄功能(config)#line vty 0 4(config)#login local或者(config)#no login(config)#enable n登錄時(shí)使用命令 telnet A.B.C.D交換機(jī)查看mac地址表#show mac-address-table綁定靜態(tài)mac地址(config)#mac-address-table static H.H.H vlan n interface fx/x #show arp在主機(jī)上使用arp -a查看arp信息開啟交換機(jī)端口安全(防止連接主機(jī)惡意發(fā)送隨機(jī)mac填滿mac地址表)(conifg)#switchport port-security(conifg)#switchport ?#show port-security int fx/x恢復(fù)(config)#errdisable recovery為交換機(jī)vlan1配置管理ip(conifg)#int vlan 1(config-if)#ip addr A.B.C.D 子網(wǎng)掩碼(config-if)#no shut交換機(jī)vlan查看vlan #show vlan-switch或是#show vlan創(chuàng)建vlan #vlan database(vlan)#vlan n將端口加入到vlan中(config-if)#switchport access vlan n給允許多個(gè)vlan的接口打trunk(config-if)#switchport mode trunk單臂路由vlan路由器上配置子接口實(shí)現(xiàn)不同vlan之間通信,先必須激活其父接口,另外IP不允許重復(fù)(config)#interface fx/x.x(config-subif)#encapsulation dot1q vlan-id(config-subif)#ip addr A.C.D.E 子網(wǎng)掩碼(config-subif)#no shut使用三層交換機(jī)交換虛擬接口交換機(jī)上配置虛擬交換接口實(shí)現(xiàn)不同vlan之間通信,先必須在交換機(jī)上添加對應(yīng)vlan(config)#int vlan n(config-if)#ip addr A.B.C.D 子網(wǎng)掩碼(config-if)#no shut在刪除時(shí),務(wù)必先刪除交換虛擬接口,再刪對應(yīng)vlanVTP配置VTP模式#vlan database(vlan)#vtp server|client|transparent只有域名和密碼完全一樣的路由器之間才能同步vlan信息(vlan)#vtp domain (vlan)#vtp password 打開VTP裁剪(vlan)#vtp pruning退出激活(vlan)#exit端口聚合創(chuàng)建R1(config)#interface port-channel 1(config-if)#switchport trunk encapsulation dot1q(config-if)#switchport mode trunk將指定接口加入聚合組內(nèi)#int range f x/x-x #channel-group 1 mode on查看聚合接口#show etherchannel summary生成樹協(xié)議基于vlan的生成樹可防止環(huán)路開啟生成樹協(xié)議(STP默認(rèn)是開啟的,可省略)(config)#spanning-tree vlan n修改生成樹協(xié)議優(yōu)先級(根網(wǎng)橋:mac最小、優(yōu)先級最小)(config)#spanning-tree vlan n priority m交換機(jī)和主機(jī)之間連接的端口開啟portfast,可防止主機(jī)發(fā)送BPDU偽造數(shù)據(jù)(config-if)#spanning-tree portfast查看生成樹#show spanning-tree vlan n靜態(tài)路由查看協(xié)議#show ip protocols查看路由表#show ip route添加靜態(tài)路由(以默認(rèn)路由舉例)(config)#ip route 出接口|下一跳ip浮動靜態(tài)路由(備份鏈路,在原鏈路失效后起作用)(config)#ip route 出接口 AD管理距離靜態(tài)黑洞路由(config)#ip route null 0RIP距離矢量路由,動態(tài)路由配置RIP宣告直連網(wǎng)段(config)#router rip(config-router)#network 網(wǎng)段更改為版本2(config-router)#version 2|1關(guān)閉自動匯總(如果被其他網(wǎng)路隔開時(shí),最好關(guān)閉自動匯總)(config-router)#no auto-summary設(shè)置被動接口(只接受更新,不宣告自己)(config-router)#passive-interface 接口單播更新(只和指定的ip交換路由信息)(config-router)#neighbor ip地址清除路由表內(nèi)容#clear ip route *OSPF鏈路狀態(tài)路由,動態(tài)路由配置OSPF宣告直連網(wǎng)路(config)#router ospf (config-router)#router-id (config-router)#network area n重啟OSPF進(jìn)程#clear ip ospf process查看接口的OSPF信息#show ip ospf interface查看鄰居表#show ip ospf neighbor查看鏈路數(shù)據(jù)表#show ip ospf databaseEIGRP鏈路狀態(tài)路由,動態(tài)路由配置EIGRP宣告直連網(wǎng)路(config)#router eigrp (config-router)#network 查看鄰居表#show ip eigrp neighbors查看拓?fù)浔?show ip eigrp topologyVRRP虛擬路由器路由協(xié)議提供網(wǎng)關(guān)冗余查看VRRP信息#show vrrp VRRP配置(在提供備份的兩臺路由器上做以下配置)端口跟蹤(監(jiān)視某個(gè)接口的狀態(tài))(config)#track 1 interface 接口 line-protocol(config-if)#vrrp ip 額外配置優(yōu)先級(IP和優(yōu)先級越大Master)和搶占(config-if)#vrrp priority (config-if)#vrrp preempt(config-if)#vrrp 1 track 1 decrement 訪問控制列表ACLACL無法控制自身發(fā)起的流量,對于已經(jīng)建立的流量不起作用標(biāo)準(zhǔn)ACL(不能單獨(dú)刪除、添加一條訪問列表)(config)#access-list permit|deny ip地址 反掩碼擴(kuò)展ACL(config)#access-list permit|deny 應(yīng)用到指定ACL到某個(gè)接口(config)#int 接口(config-if)#ip access-group in|out命名ACL(config)#ip access-list standard (config-std-nacl)#permit|deny ip地址 反掩碼(config)#ip access-list extended (config-ext-nacl)#permit|deny 應(yīng)用到指定ACL到某個(gè)接口(config)#int 接口(config-if)#ip access-group in|out自反ACL(RACL,可以只允許內(nèi)網(wǎng)主動發(fā)起的流量通過)(config)#ip access-list extended OUTB(config-ext-nacl)#permit tcp any any reflect RACL(config)#ip access-list extended INB(config-ext-nacl)#evaluate RACL(config-ext-nacl)#deny ip any any應(yīng)用到指定ACL到某個(gè)接口(config-if)#ip access-group OUTB out(config-if)#ip access-group INB in基于時(shí)間的ACL設(shè)置時(shí)區(qū)時(shí)間(config)#clock timezone GMT +8 #clock set hh:mm:ss 定義時(shí)間(config)#time-range (config-time-range)#periodic hh:mm to hh:mm(config-time-range)#absolute start hh:mm:ss end hh:mm:ss 結(jié)合ACL(config)#ip access-list extended (config-ext-nacl)#deny tcp any any time-range NAT和PAT定義內(nèi)外網(wǎng)接口(config)#int 接口(config-if)#ip nat inside|outside靜態(tài)NAT(config)#ip nat inside source static ip地址 靜態(tài)PAT(config)#ip nat inside source static ip地址 使用ACL捕獲流量(config)#access-list n permit ip地址 反掩碼(config)#ip nat pool netmask 掩碼TCP負(fù)載均衡(輪詢轉(zhuǎn)換)(config)#ip nat pool netmask 掩碼 type rotary動態(tài)NAT(config)#ip nat inside source list n pool 動態(tài)PAT(config)#ip nat inside source list n pool overload查看轉(zhuǎn)換項(xiàng)#show ip nat translations廣域網(wǎng)PPP協(xié)議在串行口上的兩臺路由器都封裝ppp協(xié)議(config)#int sx/x(config-if)#encapsulation ppp(config-if)#no shut啟用PAP認(rèn)證,未加密認(rèn)證方(config)#username password (config-if)#ppp authentication pap請求認(rèn)證方(config-if)#ppp pap sent-username password 啟用CHAP認(rèn)證,安全加密認(rèn)證方(config)#username password (config-if)#ppp authentication chap請求認(rèn)證方(config)#username password (config-if)#ppp authentication chap幀中繼無廣播的多路訪問網(wǎng)絡(luò)(NBMA)配置幀中繼交換機(jī)關(guān)閉路由器路由功能(config)#no ip routing啟用幀中繼(config)#frame-relay switching進(jìn)入串行接口R8(config)#int sx/x封裝frame-relay協(xié)議R8(config-if)#encapsulation frame-relay指定lmi-type類型(config-if)#frame-relay lmi-type cisco指定intf-type接口類型為DCE(config-if)#frame-relay intf-type dce配置時(shí)鐘頻率(config-if)#clock rate n配置DLCI(config-if)#frame-relay route in
溫馨提示
- 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)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 成功心理定律
- java代理機(jī)制面試題及答案
- 腫瘤患者夏季防暑指南
- 工程人員培訓(xùn)
- 郵政綜柜培訓(xùn)
- 羊水栓塞的產(chǎn)科護(hù)理查房
- 2025年中國內(nèi)部防火門行業(yè)市場全景分析及前景機(jī)遇研判報(bào)告
- 針織教程培訓(xùn)課件
- 腎內(nèi)科飲食指導(dǎo)
- 中醫(yī)腫瘤消融方案
- 公共組織績效評估-形考任務(wù)三(占10%)-國開(ZJ)-參考資料
- JT∕T 795-2023 事故汽車修復(fù)技術(shù)規(guī)范
- 趣識古文字智慧樹知到期末考試答案章節(jié)答案2024年吉林師范大學(xué)
- 中國瓷器介紹英文版教學(xué)內(nèi)容
- 2022年武漢市洪山區(qū)法院書記員招聘筆試試題及答案解析
- “雙減”背景下初中化學(xué)作業(yè)設(shè)計(jì)優(yōu)秀案例
- 綜合英語(3)-國家開放大學(xué)電大學(xué)習(xí)網(wǎng)形考作業(yè)題目答案
- 影視劇改編經(jīng)典案例解析課件(全)
- 甘肅省教育科學(xué)規(guī)劃20XX年度課題申請申報(bào)表
- 《平行四邊形》PPT課件共(25張PPT)
- 北京市西城區(qū)2021-2022學(xué)年三年級下冊數(shù)學(xué)期末試卷(含答案)
評論
0/150
提交評論