初步了解思科路由器

思科与华为对比
<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)

猜你喜欢

转载自blog.51cto.com/14190698/2360851