华为路由器基本命令
路由器基本命令:
[quidway]quit //退出到上一级
[quidway]save //保存当前配置
[quidway]delete //删除保存的配置
[quidway]display version //显示VRP版本
[quidway]display current-configuration //显示当前配置
[quidway]display saved-configuration //显示保存配置
[quidway]display ip routing-table //显示路由表
[quidway]display acl acl-number/all //显示访问控制列表
[quidway]display fr map-info //显示帧中继虚链路信息
[quidway]info-center console debugging //将 调试信息显示到console口
[quidway]debug ppp packet //调试ppp 查看所有PPP数据包
[quidway]undo debug ppp packet //关闭ppp调试信息
[quidway]debug fr packet //调试帧中继 查看所有FR数据包
[quidway]undo debug fr packet //关闭FR调试信息
[quidway]interface Ethernet 0 /Serial 0 //进入 以太网口0 或 进入串行通讯口0
[quidway-Ethernet0]ip address ip-address mask //给接口加ip地址
[quidway]ospf enable //打开OSPF路由协议
[quidway-Serial0]ospf enable area area-number //指定接口所在的OSPF区域
[quidway-Serial0]ospf peer 对端IP地址 //手工指定OSPF的邻居(在不支持广播的广域网链路里使用)
[quidway]rip //打开RIP路由协议
[quidway-Rip]network network-number //宣告直连网段
[quidway-Rip]peer 对端IP地址 //手工指定RIP的对端(在不支持广播的广域网链路里使用)
[quidway]ip route 目的网段 网络掩码 下一跳地址 //配置静态路由
[quidway]ip route 0.0.0.0 0.0.0.0 下一跳地址 //配置缺省路由
[quidway] local-user alading service-type exec-guest password simple alading //配置一用户alading 设置它的密码为 abc
交换机基本命令:
<sw1>system-view //进入交换机系统视图
[sw1]sysname name //更改交换机名称
<sw1>reset saved-configuration //删除交换机保存的配置
<sw1>save //保存当前配置
[sw1]user-interface aux 0 //进入AUX口
[sw1-ui-aux0]authentication-mode password //设置用户登陆验证模式为本地口令验证
[sw1-ui-aux0]set authentication password simple password //设置用户登录的验证口令
[sw1]info-center console channel console //将信息显示到console口
[sw1]monitor-port Ethernet0/1 //指定镜像端口
[sw1]port mirror Ethernet0/2 to Ethernet0/24 //指定被镜像端口
display mirror //显示镜像