1. 程式人生 > >初步了解思科路由器

初步了解思科路由器

回退 huawei 對比 dmi quit hostname word name 用戶

思科與華為對比
<huawei> 用戶視圖 =========router> 用戶模式 enable
[huawei] 系統視圖 ==========router# 特權模式 Router(config)#
接口/協議視圖============Router(config)# 全局配置模式(接口/線路/協議)

全局配置模式
接口配置模式
interface gi/0/0
no shutdown
ip address 192.168.1.1 255.255.255.0
線路配置模式
line vty 0 4 (等同於華為中的user-interface vty)
password nihao
協議配置模式

設備初始化配置命令

Router> //此時為用戶視圖
Router>enable //進入設備的特權模式
Router# //特權模式

Router#config terminal //進設備入到的全局配置模式
Router(config)#

Router(config)#hostname R1 //更改設備主機名
R1(config)#
R1(config)#no ip domain-lookup //關閉設備的域名查詢功能

R1(config)#exit //退出到上一個模式 (華為:quit)
R1#

R1(config)#end //直接回退到特權模式 (華為:return)
R1#

R1#show ip interface brief //查看當前設備端口信息

interface ip address ok? method status protocol
gi/0/0 un yes unset admin down down

R1#config terminal //進入設備的特權模式
R1(config)#interface gi0/0 //進入gi0/0配置模式
R1(config-if)#no shutdown //打開端口
R1(config-if)#ip address 192.168.1.1 255.255.255.0//配置ip地址
R1(config-if)end //直接回退到特權模式
R1#show ip interface brief //驗證配置命令是否成功

R1#show running-config //查看設備的當前運行配置文件(位於RAM中)
R1#write //保存設備的配置內容到啟動配置文件中(位於EVRAM)

初步了解思科路由器