交換與路由命令總結(jié)_第1頁(yè)
交換與路由命令總結(jié)_第2頁(yè)
交換與路由命令總結(jié)_第3頁(yè)
交換與路由命令總結(jié)_第4頁(yè)
交換與路由命令總結(jié)_第5頁(yè)
已閱讀5頁(yè),還剩2頁(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、Cisco 交換機(jī)的部分命令解析一、交換機(jī)五種模式Swith> (用戶模式Swith# (特權(quán)模式 Swith(config# (全局配置模式 Swith(config-if# (接口模式 Swith(config-line# (線模式 二、交換機(jī)模式切換Swith>enable /切換到特權(quán)Swith#config t /切換到全局配置模式Swith(config# interface f0/1 /進(jìn)入接口 f0/0Swith(config# interface vlan 1 /進(jìn)入 VLAN 1中三、設(shè)置交換機(jī)的密碼1、用戶到特權(quán)的密碼Swith(config#enable p

2、assword 123 (優(yōu)先級(jí)低 Swith(config#enable secret 456 (優(yōu)先級(jí)高 /如果兩個(gè)都設(shè)置則 456生效2、控制臺(tái) console 密碼設(shè)置Swith(config# line con 0Swith(config-line#loginSwith(config-line#password console123 /設(shè)置 console 密碼為 telnet1233、啟用 telnet 密碼Swith(config#line vty 0 15 /最多有 015人可以 telnet 訪問(wèn) swith ,合計(jì) 16人Swith(config-line#loginSwi

3、th(config-line#password telnet123 /設(shè)置 telnet 密碼為 telnet123注:要想真正生效 telnet 還要設(shè)置特權(quán)密碼交換機(jī)命名 hostname BENETSW01Swith(config#hostname BENETSW01 /使用 hostname 命名交換機(jī)的名字 四、 show 命令集Swith#show version/顯示 IOS 版本信息Swith#show int vlan 1 brief/簡(jiǎn)單的顯示 VLAN1的信息Swith#show running-config/顯示正在運(yùn)行的配置文件Swith#show startup-c

4、onfig/顯示己經(jīng)保存的配置文件Swith#show mac-address-table/顯示 MAC 地址表Swith#show mac-address-table/顯示 MAC 地址表更新的間隔,默認(rèn)為 5分鐘Swith#show neighbor detail/顯示鄰居詳細(xì)信息Swith#show traffic/顯示 CDP 流量Swith#show五、設(shè)置交換機(jī)的網(wǎng)關(guān)和 DNS 名稱服務(wù)器的 IP 地址Swith(config# no ip domain-lookup /交換機(jī)名稱服務(wù)器的域名查詢六、創(chuàng)建、刪除、查看 VLANSwitch#vlan database /進(jìn)入 vla

5、n 數(shù)據(jù)庫(kù)配置模式Switch(vlan#vlan 2 /創(chuàng)建 VLAN2命名為 vlan0002,也可以使用 vlan2 name sales VLAN 2 added:Name: VLAN0002Switch(vlan#exit /退出時(shí)應(yīng)用生效Swith(vlan#no vlan 2 /刪除 vlan2Switch(config# interface f0/1Switch(config-if# switchport access vlan 2 /將端口加入 vlan 2中Switch(config-if# no switchport access vlan 2 /將端口從 vlan2中刪

6、除Switch(config# interface range f0/1 10 / 進(jìn)行 F0/1到 10端口范圍 Switch(config-if-range# switchport access vlan 2 /將 f0/1到 f0/10之間的所有端口加入 vlan 2 Switch# show vlan brief /查看所有 VLAN 的摘要信息Switch# show vlan id vlan-id /查看指定 VLAN 的信息七、開(kāi)啟并查看 trunk 端Swith(config#interface f0/24Swith(config-if#swith mode trunk /將

7、f0/24端口設(shè)置為 trunkSwitch#show interfacef0/24 switchport /查看 f0/24的接口狀態(tài)八、從 Trunk 中添加、刪除 VlanSwitch (config-if # switchport trunk allowed vlan remove 3 /從 trunk 端口刪除 v lan3通過(guò) Switch (config-if# switchport trunk allowed vlan add 3 /從 trunk 端口添加 vlan3通過(guò) Switch # show interface interface-id switchport /檢查中

8、繼端口允許 VLAN 的列表 九、單臂路由配置Router(config# interface f0/0.1Router(config-subif# encapsolution dot1q 2/子接口封裝 dot1q 針對(duì)的是 vlan2Cisco 路由器的部分命令解析一、路由器的模式用戶模式:Router> /用戶模式特權(quán)模式:Router# /特權(quán)模式全局配置模式:Router(config# /配置模式接口配置模式:Router(config-if# /接口模式子接口配置模式:Router(config#interface fa0/0.1 /進(jìn)入子接口Router(config-s

9、ubif# /子接口狀態(tài)Line 模式:Router(config-line# /進(jìn)行線模式路由模式:Router(config-router# /路由配置模式二、配置靜態(tài)路由條目三、配置默認(rèn)路由四、密碼配置配置控制臺(tái)密碼teacher(config#line console 0teacher(config_line#loginteacher(config_line#password ciscoteacher(config#enable password cisco/配置特權(quán)模式密碼teacher(config#enable secret 1234/配置加密保存的密碼teacher(confi

10、g#service password-encryption/對(duì)所有密碼加密五、配置路由器的 banner 信息teacher(config#banner motd $This is Aptech company s Router! Please don t change the configuration without permission!$六、配置路由器接口的描述信息teacher(config#interface fastethernet 0/0teacher(config_if#descriptionconnecting the company s intranet!七、配置控制臺(tái)配

11、置控制臺(tái)會(huì)話時(shí)間teacher(config#line console 0teacher(config_line#exec-timeout 0 0配置控制臺(tái)輸出 日志 同步teacher(config#line console 0teacher(config_line#logging synchronous八、動(dòng)態(tài)路由相關(guān)命令Router(config# router rip/啟動(dòng) RIP 進(jìn)程Router(config-router#version 2 /指定啟動(dòng) rip v2版本Router(config-router# network network-number /宣告主 網(wǎng)絡(luò) 號(hào)Ro

12、uter# show ip route/查看路由表Router#show ip route static/僅顯示靜態(tài)路由信息Router# show ip protocols /查看路由協(xié)議配置Rouetr# debug ip rip/打開(kāi) RIP 協(xié)議調(diào)試命令九、動(dòng)態(tài)路由配置RouterA(config#interface f0/0RouterA(config-if#no shutdownRouterA(config#interface f0/1RouterA(config-if#no shutdownRouterA(config#router rip十、路由器密碼恢復(fù)進(jìn)入 ROM Monitor模式修改配置寄存器的值,啟動(dòng)時(shí)繞過(guò) startup-config 文件: rommon1>c

溫馨提示

  • 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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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)論