华为交换机的连接 |
您所在的位置:网站首页 › 工业交换机怎么连接 › 华为交换机的连接 |
昨天我写了一下交换机的原理和配置关系,所以今天就顺手写一下华为交换机的连接,算是个小实验。本章比较简单,讲的内容不是很多相对比较容易理解。 目录 一、Telnet服务 二、交换机连接步骤实验 1.思科和华为命令 2.华为几个主要的命令 三、服务器-交换机详细配置 1、 设置IP地址 2、开启telnet功能 3、设置telnet模式为密码模式 4、设置明文/密文密码 5、设置一下用户权限 四、客户机client如何配置 1.启动客户机 2.配置管理IP 3.客户机上验证telnet服务器是否可以登录(在用户视图下) 4.可以在客户机上保存服务器的配置信息 5.查看当前配置 五、补充 内存 命令补全 总结 一、Telnet服务步骤:1.开启telnet功能 2.设置密码认证 3.认证密码 4.登录账户权限 应用层有telnet服务(telnet使用的是TCP23号端口) telnet服务一般是C/S架构,开启telnet功能的主机是服务器(server)模式,等待用户使用telnet远程登录本机 客户机是Client模式,使用telnet协议远程登录telnet服务器 补充:C/S架构:C/S架构一般指服务器-客户机。服务器-客户机,即Client-Server(C/S)结构。C/S结构通常采取两层结构。服务器负责数据的管理,客户机负责完成与用户的交互任务。 Telnet要在用户视图下查看不能在系统视图下查看 二、交换机连接步骤实验 1.思科和华为命令 命令思科华为telnetinvty04 assword cisco login user-interface vty 0 4进入telnet authentication-mode password验证模式为密码模式 set authentication password simple Huawei 明文密码 user privilege level 3用户权限 模式用户模式 enable用户视图>system-view查看、调试#特权(查看show ) config ter(config) #全局配置模式 系统视图[ ]配置、 查看退出命令-级级退出exit -级级退出quit完全结束end 完全结束return重命名(config) #hostname [ ]sysname R1永不超时ine console 0 no exec-timeout exec-timeout 0 0 user-interface console 0 idle-timeout 0 0 关闭弹出信息config) #logging syn < >undo terminal monitor起始文件startup-configuration saved--configuration我们主要还是看华为的命令 华为有4种视图模式 : 用户视图、系统视图、接口视图、协议视图。用的比较多的是系统视图和接口视图。 切换视图 ① 切换用户视图( ) 默认状态下是用户视图 按 CTRL+ ] 可以进入用户视图 ② 切换系统视图( [主机名] ) 在用户模式下输入 system-view 可以进入系统视图 ③ 切换接口视图 ( [主机名-接口名] ) 在系统视图下 输入接口名可以进入接口视图 补充: ①接口有一般有两种类型 以E开头和以G开头 以E开头的为百兆接口,以G开头的为千兆接口 ②路由器一般选用AR2220 ③交换机使用三层交换机 选用S3700(百兆接口) 或 S5700(千兆接口) ④接口连线使用auto自动连接即可 2.华为几个主要的命令 system-view //进入系统视图 [Huawei]sysname SW1 //修改名字 [SW1]user-interface console 0 //永不超时命令 [SW1-ui-console0]id [SW1-ui-console0]idle-timeout 0 0 undo terminal monitor //关闭弹窗 Info: Current terminal monitor is off. //提示弹窗已关闭 三、服务器-交换机详细配置 1、 设置IP地址PS:交换机物理接口下不能配置IP地址,交换机有虚拟接口,默认接口叫vlanif 1,我们可以给默认虚拟地址配置IP,即给二层交换机配置一个管理IP。 system-view //一定要在系统视图下配置交换机管理IP Enter system view, return user view with Ctrl+Z. [server]interface Vlanif 1//交换机默认虚拟接口 [server-Vlanif1]ip address 192.168.1.10 24//给交换机配置管理IP [server-Vlanif1][server-Vlanif1]quit [server] [server]user-interface vty 0 4 //Vty 叫线程数,0 4允许五个人通道 [server-ui-vty0-4] 3、设置telnet模式为密码模式[server-ui-vty0-4]authentication-mode password //telnet模式为密码模式 4、设置明文/密文密码[server-ui-vty0-4]set authentication password simple huawei // simple是明文,密文是cipher,设置的密码是huawei 5、设置一下用户权限[server-ui-vty0-4]user privilege level 3 //level 3是有管理权限的 undo terminal monitor Info: Current terminal monitor is off. system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname client [client]user-interface console 0 [client-ui-console0]idle-timeout 0 0 [client-ui-console0]quit [client] [client]interface vlanif 1 [client-Vlanif1]ip address 192.168.1.20 24 [client-Vlanif1] 3.客户机上验证telnet服务器是否可以登录(在用户视图下)telnet 192.168.1.10//telnet服务器的管理IP Trying 192.168.1.10 ... Press CTRL+K to abort Connected to 192.168.1.10 ... Login authentication Password: //这里输入密码时不会出现字符,你只需要输入正确的密码回车就行了 Info: The max number of VTY users is 5, and the number of current VTY users on line is 1. The current login time is 2021-08-05 21:35:14. ![]() save//保存 The current configuration will be written to the device. Are you sure to continue?[Y/N]Y//这里输入Y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]://这里回车就好了 Now saving the current configuration to the slot 0. Save the configuration successfully. display saved-configuration //可以查看已经保存好的配置(在系统视图下) display current-configuration //显示当前交换机的配置信息。 五、补充 内存RAM:随机存取存储器 设备断电,当前配置文件丢失 RMR:只读存储器 设备断电,保存过的配置文件丢失 默认选项(c),又称缺省值,是一种计算机术语, 指在无决策者干预情况下,对于决策或应用软件、 计算机程序的系统参数的自动选择。 命令补全在输入命令时可以使用电脑的TAB按键来补全命令, 像如果你要输入system-view,就可以输入sys,按下tab按键进行补全 本次实验总共就是一下几个命令,挺简单,多输入的话记起来就容易很多。 服务器上设置管理IP [ ]interface vlanif 1 ip address 192.168.1.10 255.255.255.0 开启Telnet功能 [ ]user-interface vty 0 4 设置Telnet模式为密码模式 authentication-mode password 设置明文/密文密码和等级 set authentication password simple huawei user priviliage level 3 客户机上设置管理ip [ ]interface vlanif 1 ip address 192.168.1.20 255.255.255.0 客户机验证Telnet服务器是否可以登录 < >telnet 192.168.1.10 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |