eNSP命令行基础 |
您所在的位置:网站首页 › ensp交换机命令大全 › eNSP命令行基础 |
一、eNSP介绍。 eNSP(Enterprise Network Simulation Platform)是一款由华为提供的免费的、可扩展的、图形化操作的网络仿真工具平台,主要对企业网络路由器、交换机进行软件仿真,呈现真实设备实景,支持大型网络模拟,让广大用户有机会在没有真实设备的情况下能够模拟演练,学习网络技术。 软件特点:高度仿真 1.可模拟华为AR路由器、x7系列交换机的大部分特性。 2.可模拟PC终端、Hub、云、帧中继交换机等。 3.仿真设备配置功能,快速学习华为命令行。 4.可模拟大规模设备组 二、eNSP命令行基础 用户视图: 系统视图:system view 用户界面视图:[Huawei]user-insterface vty 0 4 接口视图:[Huawei]interface serial 0 ACL视图:[Huawei]acl 2001 VLAN视图:[Huawei]vlan 2 路由协议相关视图:[Huawei]ospf 用户界面视图:[Huawei]aaa 华为:用户视图、系统视图、接口/协议视图 思科:用户视图、特权视图、配置视图、接口视图 从用户视图进入系统视图:system-view 从系统视图返回到用户视图:quit q 从任意的非用户视图返回到用户视图:return 注意: 1.用户视图相当于思科的用户模式,系统视图相当于思科的全局模式 2.Return命令相当于思科的end命令,和Cisco类似,return命令的功能也可以用组合完成 display clock //查看时间 clock timezone beijing add 08:00:00 //设置主机时区 clock datetime 14:30:00 2017-06-06 //设置主机时间 [Huawei]sysname Router1 //修改主机名 [Huawei]display version //查询系统版本 [Huawei]display users //查询当前已连接的终端用户 [Huawei]display this //查询在当前模式下所配置的命令 save [Huawei]display saved-configuration //查询"已保存"的配置文件 [Huawei]display cu 系统配置文件有两种: 已保存的/saved-configuration:需要人为配置并通过save保存至"硬盘":永久生效 正在使用的/current-configuration :人为配置,但未通过save保存,临时生效,重启即失效。 [Huawei]display current-configuration //查询"正在运行"的配置文件 [Huawei]save //保存当前"正在运行"的配置文件到"已保存"的配置文件中 [Huawei]reset saved-configuration //删除"已保存"的配置文件 [Huawei]compare configuration //对两种配置文件进行比较 [Huawei]dis transceiver int xg0/0/1 verbose //查看万兆接口光功率及模块名称,华为模块显示:"dendor:HUAWEI" 开启/关闭显示终端调试、日志、警告信息功能: terminal monitor undo terminal monitor 开启/关闭信息中心: [Huawei]info-center enable [Huawei]undo info-center enable 接口配置类: [Huawei]clear configuration interface Ethernet 0/0/4 //清空该接口的所有配置 [Huawei]user-interface console 0 [Huawei-ui-console0]history-command max-size 20 命令记录条目数量 # Set the timeout duration to 1 minute and 30 seconds. [Huawei-ui-console0]set authentication password cipher 123456 设置密码 [Huawei-ui-console0]idle-timeout 1 30 //1分30秒 [Huawei-ui-console0]screen-length 512 //同时支持显示的行数,最大512,默认24 [Huawei]user-interface vty 0 4 [Huawei-ui-vty0]user privilege level 3 [Huawei-ui-vty0-4]set authentication password cipher Enter Password():huawei123 1.远程管理网络设备的两种验证方式:telnet 、SSH/stelnet 远程连接协议:
2.配置 Telnet 方式登录时的密码: [Huawei] user-interface vty 0 4 [Huawei-ui-vty0-4] authentication-mode password/aaa //启用密码验证或AAA验证 [Huawei-ui-vty0-4] set authentication password simple/cipher abc123 //以明文或密文方式加密 [Huawei-ui-vty0-4] set authentication password cipher abc123 //此为路由器配置命令,路由器只能是密文加密 [Huawei-ui-vty0-4] user privilege level 3 //设置远程登录vty用户权限为3,表示可以使用所有命令 3.配置 Telnet以用户名+密码方式登录时的密码: 进入AAA模式命令行下: [Huawei]aaa 添加新用户为:huawei 密码为:abc123 加密模式为:cipher 密文加密,用户级别为3 [Huawei-aaa]local-user huawei privilege level 3 password cipher 123456 // 设置哪些服务可以通过此test用户进行验证,设置telnet 服务 [Huawei-aaa]local-user huawei service-type http ssh telnet web [Huawei-aaa]local-user huawei privilege level 3 //远程登录时能够使用的级别命令 命令级别为0-3共四个级别,区别如下: 0 参观 ping、tracert、telnet、rsh、super、language-mode、display、quit 1 监控 0级命令、msdp-tracert、mtracert、reboot、reset、send、terminal、undo、upgrade、debugging 2 配置,所有配置命令(管理级的命令除外)和0、1级命令 3 管理,所有命令 将save命令设置为level 3级别并能够在用户视图下运行。 [Huawei]command-privilege level 3 view shell save system-view [Huawei]user-interface vty 0 4 [Huawei-ui-vty0-4] [Huawei]user-interface maximum-vty 6 //设置终端数量为6个 路由器以telnet方式访问路由器: telnet 192.168.1.1 telnet:23 ssh:22 4.以SSH方式实现加密的远程连接 [Huawei]aaa [Huawei-aaa]local-user zhangsan password cipher abc123 privilege level 3 [Huawei-aaa]local-user zhangsan service-type ssh [Huawei]ssh user zhangsan authentication-type password ********* [Huawei]stelnet server enable ********** [Huawei]rsa local-key-pair create //生成密钥对信息,可省略。 [Huawei]user-interface vty 0 4 [Huawei-ui-vty0-4]authentication-mode aaa [Huawei-ui-vty0-4]protocol inbound ssh ********* 客户端CRT远程连接即可 路由器以ssh方式连接路由器: [Huawei]ssh client first-time enable [Huawei]stelnet 192.168.2.1 5.配置 Console 方式登录时的密码: [Huawei]user-interface console 0 [Huawei-ui-console0]authentication-mode password //设置console登录验证方式为密码方式 [Huawei-ui-console0]set authentication password simple abc123 //simple设置明文密码,cipher为密文密码 [Huawei-ui-console0]user privilege level 3 //指定console连接的用户级别 用户级别为0-15,0、1、2分别对应命令级别的0、1、2。3-15对应命令级别的3 注意:console能够使能aaa,但不能指定用户的具体协议 启用了ssh就不能够使用telnet |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |