CCNA Simulator Lab命令介紹
CCNA Simulator Lab命令之路由器實驗:
router> enable 從用戶模式進(jìn)入特權(quán)模式
router# disable or exit 從特權(quán)模式退出到用戶模式
router# show sessions 查看本機(jī)上的TELNET會話
router# disconnect 關(guān)閉所有的TELNET會話
router# show users 查看本機(jī)上的用戶
router# erase startup-config 刪除NVRAM中的配置
router# reload 重啟路由器
router# config terminal 從用戶模式進(jìn)入特權(quán)模式
router(config)# hostname r1 配置用戶名為r1
router(config)# #banner welcome# 配置開機(jī)話語
router# show controllers serial 0 查看串口0的物理層信息,主要是查看DTE/DCE
router# show ip interface 查看端口的IP配置信息
router# show hosts 查看主機(jī)表
end or ctrl+z 從各種配置模式退到特權(quán)模式
r1(config)# no ip domain-lookup 關(guān)閉動態(tài)域名解析
r1(config)# ip domain-lookup 打開動態(tài)域名解析
r1(config)# ip name-server 202.106.0.20 打開動態(tài)域名解析之后便可以指定DNS服務(wù)器
r1(config)# interface serial 0 進(jìn)入serial 0的接口配置模式
r1(config-if)# no shutdown 路由器出廠默認(rèn)所有端口關(guān)閉,使用此命令使它打開
r1(config-if)# encapsulation ppp 封裝ppp
r1(config-if)# clock rate 64000 如果是DCE便需要設(shè)置時鐘速率,如果是DTE便不需要
r1(config-if)# bandwidth 64 設(shè)置端口帶寬為64K
r1(config-if)# ctrl+c 或者ctrl+z 快捷鍵退出到到特權(quán)模式
r1# show interface serial 0 查看S0信息,如果看到serial和line protocol都顯示up說明鏈路兩端都設(shè)置成功
注意: 如果出現(xiàn) serial down , line down 可能對方的端口沒有打 no shutdown或者電纜沒有插好
如果出現(xiàn) serial up , line down 可能是DCE端沒有設(shè)置 clock rate , 也可能是封裝格式不對
r1# show cdp neighbors 查看CDP鄰居信息.
r1# show cdp entry *
r1(config-if)# ip add 10.0.0.1 255.0.0.0 進(jìn)入相應(yīng)的接口配置相應(yīng)的IP地址
r1# ping 10.0.0.2 使用ping 命令查看鄰居的連通性
r1# show ip route 查看路由表,可以看到以C打頭的路由信息,這是直連的路由信息;可以看到以R開頭的路由信息,是從rip學(xué)來的路由信息
可以看到以I開頭的路由信息取代了以R開頭的路由信息,這是因為igrp的管理距離是100,小于rip的120
r1(config)# router rip 啟動RIP路由協(xié)議
r1(config-router)# network 10.0.0.0 發(fā)布網(wǎng)段,注意network 后面是接的是網(wǎng)絡(luò)號而不是IP地址
r1# show ip protocol 查看配置的路由協(xié)議
r1(config)# router igrp 300 (一定要注意要在igrp后面加自治系統(tǒng)號,考試的時侯題目會告訴你AS number,照敲就是)
r1(config-router)# network 10.0.0.0
r1(config)# line vty 0 4 進(jìn)入虛擬線程配置模式,在這個模式里面可以對telnet功能進(jìn)行配置
r1(config-line)# login
r1(config-line)# password cisco 配置telnet密碼,默認(rèn)的網(wǎng)絡(luò)設(shè)備telnet的功能是關(guān)閉的,配了密碼之后會自動打開
r1(config)# enable password cisco 配置進(jìn)入enable模式的密碼,區(qū)分大小寫
r1(config)# enable secret ciscocisco 配置進(jìn)入enable模式的密碼,是加密的密碼,show run是看不見的
r1(config)# line console 0
r1(config-line)# login
r1(config-line)# password cisco 配置進(jìn)入用戶模式的密碼
r1(config-line)# logging synchronous 輸入同步
r1(config-line)# exec-timeout 0 0 禁止因為一段時間沒有輸入而跳出(類似windows里面的屏保)
r1# copy running-config startup-config 保存配置,考試的時侯注意題目的要求,如果題目要求里面要求你保存配置就一定不能少了這一項
r1# copy tftp startup-config
r1# copy running-config tftp
r1# copy tftp flash
CCNA Simulator Lab命令之交換機(jī)實驗:
swich(config)# ip address 192.168.0.177 255.255.255.0 與路由器在接口上配置ip不同,交換機(jī)是在全局配置模式配置
swich(config)# ip default-gateway 192.158.0.1 給交換機(jī)配置一個缺省網(wǎng)關(guān),請注意,不用寫掩碼
swich(config)# vlan 2 name cisco 配置一個vlan 2并且指定名字就叫cisco
swich# show interfaces 查看端口狀態(tài)
swich(config)# interface e0/10 進(jìn)入端口e0/10
swich(config-if)# vlan-membership static 2 將端口放進(jìn)vlan 2 里面
swich(config)# int f0/26 進(jìn)入快速以太網(wǎng)端口f0/26
swich(config-if)# trunk on 啟用trunk,注意: 只能在百兆以上端口啟用trunk
swich(config-if)# no trunk-vlan 51 52 在主干上關(guān)閉VLAN51、52的傳輸
以上就是總結(jié)的CCNA Simulator Lab命令。
【編輯推薦】