华为 命令 so easy

华为路由器交换机配置命令:计算机命令
PCAlogin:root ;使用 root 用户
password:linux ;口令是 linux
#shutdown-hnow ;关机
#init0 ;关机
#logout ;用户注销
#login ;用户登录
#ifconfig ;显示 IP 地址
#ifconfigeth0netmask ;设置 IP 地址
#ifconfigeht0netmaskdown ;禁用 IP 地址
#routeadd0.0.0.0gw ;设置网关
#routedel0.0.0.0gw ;删除网关
#routeadddefaultgw ;设置网关
#routedeldefaultgw ;删除网关
#route ;显示网关
#ping ;发 ECHO
#telnet ;远程登录
华为路由器交换机配置命令:交换机命令
[Quidway]discur ;显示当前配置
[Quidway]displaycurrent-configuration ;显示当前配置
[Quidway]displayinterfaces ;显示接口信息
[Quidway]displayvlanall ;显示路由信息
[Quidway]displayversion ;显示版本信息
[Quidway]superpassword ;修改特权用户密码
[Quidway]sysname ;交换机命名
[Quidway]interfaceethernet0/1 ;进入接口视图
[Quidway]interfacevlanx ;进入接口视图
[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0 ;配置 VLAN IP 地址
[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2 ;静态路由=网关
[Quidway]rip ;三层交换支持
[Quidway]local-userftp
[Quidway]user-interfacevty04 ;进入虚拟终端
[S3026-ui-vty0-4]authentication-modepassword ;设置口令模式
[S3026-ui-vty0-4]setauthentication-modepasswordsimple222 ;设置口令
[S3026-ui-vty0-4]userprivilegelevel3 ;用户级别
[Quidway]interfaceethernet0/1 ;进入端口模式
[Quidway]inte0/1 ;进入端口模式
[Quidway-Ethernet0/1]duplex{half|full|auto} ;配置端口工作状态
[Quidway-Ethernet0/1]speed{10|100|auto} ;配置端口工作速率
[Quidway-Ethernet0/1]flow-control ;配置端口流控
[Quidway-Ethernet0/1]mdi{across|auto|normal} ;配置端口平接扭接
[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid} ;设置端口工作模式
[Quidway-Ethernet0/1]portaccessvlan3 ;当前端口加入到 VLAN
[Quidway-Ethernet0/2]porttrunkpermitvlan{ID|All} ;设 trunk 答应的 VLAN
[Quidway-Ethernet0/3]porttrunkpvidvlan3 ;设置 trunk 端口的 PVID
[Quidway-Ethernet0/1]undoshutdown ;激活端口
[Quidway-Ethernet0/1]shutdown ;关闭端口
[Quidway-Ethernet0/1]quit ;返回
[Quidway]vlan3 ;创建 VLAN
[Quidway-vlan3]portethernet0/1 ;在 VLAN 中增加端口
[Quidway-vlan3]porte0/1 ;简写方式
[Quidway-vlan3]portethernet0/1toethernet0/4 ;在 VLAN 中增加端口
[Quidway-vlan3]porte0/1toe0/4 ;简写方式
[Quidway]monitor-port ;指定镜像端口
[Quidway]portmirror ;指定被镜像端口
[Quidway]portmirrorint_listobserving-portint_typeint_num ;指定镜像和被镜像
[Quidway]descriptionstring ;指定 VLAN 描述字符
[Quidway]description ;删除 VLAN 描述字符
[Quidway]displayvlan[vlan_id] ;查看 VLAN 设置
[Quidway]stp{enable|disable} ;设置生成树默认关闭
[Quidway]stppriority4096 ;设置交换机的优先级
[Quidway]stproot{primary|secondary} ;设置为根或根的备份
[Quidway-Ethernet0/1]stpcost200 ;设置交换机端口的花费
[Quidway]link-aggregatione0/1toe0/4ingress|both; 端口的聚合
[Quidway]undolink-aggregatione0/1|all; 始端口为通道号
[SwitchA-vlanx]isolate-user-vlanenable ;设置主 vlan
[SwitchA]isolate-user-vlansecondary ;设置主 vlan 包括的子 vlan
[Quidway-Ethernet0/2]porthybridpvidvlan ;设置 vlan pvid
[Quidway-Ethernet0/2]porthybridpvid ;删除 vlan pvid
[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged ;设置无标识的 vlan
假如包的 vlanid PVId 一致,则去掉 vlan 信息 . 默认 PVID=1
所以设置 PVID 为所属 vlanid 设置可以互通的 vlan untagged.
 
 
 
 
 
 
 
 
华三交换机配置命令
用户视图
<H3C>
----------------------------------------------------------------------
---------------------
systen-view
系统视图
----------------------------------------------------------------------
---------------------
[H3C]?
[H3C]super password    修改 super 密码
[H3C]sysname     交换机命名
[H3C]interface ethernet 0/1   进入接口视图
[H3C]quit     退出系统视图
[H3C]info-center console channel console 信息输出设置
[H3C]monitor-port ethernet 0/1   配置端口镜像
配置端口
----------------------------------------------------------------------
---------------------
[H3C-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态
[H3C-Ethernet0/1]speed {10|100|auto}  配置端口工作速率
[H3C-Ethernet0/1]flow-control   配置端口流控 ( 防止拥塞丢包 )
[H3C-Ethernet0/1]mdi {across|auto|normal} 配置端口 MDI/MDIX 状态
[H3C-Ethernet0/1]shutdown/undo shutdown  关闭 / 打开接口
 
VLAN 基本配置
----------------------------------------------------------------------
---------------------
[H3C]vlan 3      创建 / 删除一个 VLAN/ 进入 VLAN 配置视图
[H3C]undo vlan 3
[H3C-vlan3]port ethernet0/1 to ethernet0/4  VLAN 增加 / 删除以太网接口
[H3C-Ethernet0/2]port access vlan 3   将端口加入到指定 VLAN
[H3C-Ethernet0/2]port link-type {trunk|access|hybrid} 设置端口工作模式
[H3C-Ethernet0/2]port trunk permit vlan {ID|All} 设置 trunk 端口允许通过
VLAN
[H3C-Ethernet0/2]port trunk pvid vlan 3   设置 trunk 端口的 PVID
----------------------------------------------------------------------
---------------------
交换机端口的 3 种工作模式:
Access 模式 : 不支持 802.1q 帧的传送
Hybird 模式:允许多个 vlan 的报文发送时不打标签
Trunk 模式:只允许缺省 vlan 的报文发送时不打标签
trunk 端口上收到了非 802.1q 帧时,交换机会给该帧加上 802.1q 的标志字段,
该标志字段中的 VLAN ID 即该端口的 PVID, 使用 port trunk pvid vlan vlan-id
配置端口的 PVID
 
配置端口聚合
----------------------------------------------------------------------
---------------------
端口聚合,也称为端口汇聚或端口干路,是将多个端口聚合在一起,实现对出 /
入流量在各成员端口间进行分担的一种技术,解决上行链路的瓶颈问题,完成所
有接入端口流量总和的传输。如果需要,两个扩展模块可以汇聚成一个负荷分担
组。
配置端口聚合
link-aggregation port_num1 to port_num2 {ingress|both}
-[H3C]link-aggregation ethernet 0/7 to ethernet 0/10 ingress
清除端口聚合
undo link-aggregation {master_port_num|all}
-[H3C]undo link-aggregation ethernet0/7

你可能感兴趣的:(交换机配置,华为路由器)