华为路由器交换机基本状态以及VLAN口令设置,华为路由器交换机设置过吗?对root用户熟悉了吗?你的交换机路由器是不是经常让你掉线,看看下面的命令文章,一切问题都能解决。
华为路由器交换机:root用户
PCAlogin:root;使用root用户
password:linux;口令是linux
#shutdown-hnow;关机
#init0;关机
#logout#login
#ifconfig;显示IP地址
#ifconfigeth0
#ifconfigeht0
#routeadd0.0.0.0gw
#routedel0.0.0.0gw
#routeadddefaultgw
#routedeldefaultgw
#route;显示网关
#ping
华为路由器交换机:交换机基本状态
switch:;ROM状态,路由器是rommon>
hostname>;用户模式
hostname#;特权模式
hostname(config)#;全局配置模式
hostname(config-if)#;接口状态
华为路由器交换机:交换机口令设置
switch>enable;进入特权模式
switch#configterminal;进入全局配置模式
switch(config)#hostname
switch(config)#enablesecretxxx;设置特权加密口令为xxx
switch(config)#enablepasswordxxx;设置特权非密口令为xxx
switch(config)#lineconsole0;进控制台口(Rs232)初始化
switch(config-line)#linevty04;进入虚拟终端virtualtty
switch(config-line)#login;允许登录
switch(config-line)#passwordxx;设置登录口令xx
switch#exit;返回命令
华为路由器交换机:交换机VLAN设置
switch#vlandatabase;进入VLAN设置
switch(vlan)#vlan2;建VLAN2
switch(vlan)#novlan2;删vlan2
switch(config)#intf0/1;进入端口1
switch(config-if)#switchportaccessvlan2;当前端口1加入VLAN2
switch(config-if)#switchportmodetrunk;设置为干线
switch(config-if)#switchporttrunkallowedvlan1,2;设置允许的vlan
switch(config-if)#switchporttrunkencapdot1q;设置vlan中继
switch(config)#vtpdomain
上一篇:C 程序员讲述C 编程技巧说明