华为交换机基本命令配置(创建vlan、配置telnet登录)

<HUAWEI>system-view      进入系统视图

[HUAWEI]sysname SW1     交换机命名为SW1

[SW1]undo info-center enable 关闭消息中心

[SW1]quit  退出当前视图

<SW1>display vlan     查看vlan详情

<SW1>system-view     进入系统视图

[SW1]vlan 5           创建vlan 5

[SW1]vlan batch 6 7 8 11 to 20   创建vlan 6 7 8以及11到20(批量创建vlan)

[SW1]undo vlan 11            删除vlan11

[SW1]interface vlan 6   进入vlan6

[SW1-Vlanif6]ip address 192.168.1.254 为vlan 6创建管理地址

[SW1-Vlanif6]quit       退出当前视图

[SW1]interface g0/0/1  进入接口g0/0/1

[SW1-GigabitEthernet0/0/1]port link-type access 配置接口为接入模式

[SW1-GigabitEthernet0/0/1]port default vlan 6  把接口划入vlan6

配置交换机telnet访问

[SW1]telnet server enable 开启telnet服务

Info: The Telnet server has been enabled.

[SW1]user-interface vty 0 4    开启VTY线路模式

[SW1-ui-vty0-4]protocol inbound telnet 配置telnet协议访问

[SW1-ui-vty0-4]authentication-mode aaa  配置认证模式为aaa

[SW1-ui-vty0-4]quit

配置aaa认证(用户名和密码)

[SW1]aaa

[SW1-aaa]local-user admin privilege level 15 password simple 123456

注意如果用户名是admin需要加一条命令:local-user admin service-type telnet

其他用户名暂时没出问题,如果不加此命令会报错:Error: Local authentication is rejected

保存配置

[SW1]quit

<SW1>save

The current configuration will be written to the device.

Are you sure to continue?[Y/N]y

Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:

Now saving the current configuration to the slot 0.

Save the configuration successfully.

查看ip配置详情

模拟器与真机桥接

 拓扑如下

配置如下图:

测试:

打开本机电脑的cmd,输入命令telnet 192.168.1.254

配置console口登录密码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值