C114门户论坛百科APPEN| 举报 切换到宽版

亚星游戏官网

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索
查看: 2197|回复: 2

[通信技术与资料] HUAWEI命令专题统计 [复制链接]

军衔等级:

亚星游戏官网-yaxin222  新兵

注册:2019-5-171
发表于 2021-1-24 13:30:43 |显示全部楼层
考点01:配置交换机的名称和密文密码:
<Huawei> //用户视图
<Huawei>system-view //进入系统视图配置
[Huawei] //系统视图
[Huawei]quit 或return //退出系统视图模式
[Huawei]sysname DTWLXY //设置主机名
[Huawei]user-interface console 0 //进入控制台
[Huawei-ui-console0]authentication-mode password
[Huawei-ui-console0]set authentication password
cipher huawei //配置密文密码
考点02:配置交换机的远程管理IP地址:
[Huawei]interface Vlanif 1 //进入VLAN1
[Huawei-Vlanif1]ip add 192.168.1.254 24 //配置IP
[Huawei-Vlanif1]undo shutdown //开启接口
[Huawei]dns domain dtwlxy.com //设置域名
[Huawei]dns server 192.168.254.254 //设置域名IP
dis vlan 显示vlan save保存配置
dis curr 显示当前配置 reboot重启设备
<Huawei>undo terminal monitor //取消提示信息
考点03:配置交换机端口速率、双工、ARP:
[Huawei]int g0/0/1 //进入接口
[Huawei-g0/0/1]description dtwlxy //端口描述
[Huawei-g0/0/1]undo negotiation auto //取消协商
[Huawei-GigabitEthernet0/0/1]duplex full //全双工
[Huawei-GigabitEthernet0/0/1]auto duplex full //自动
[Huawei-GigabitEthernet0/0/1]speed 10 //速率10M
[Huawei-GigabitEthernet0/0/1]auto speed 100 //自动
[Huawei]arp static 192.168.1.8 5489-98cf-2603//绑定
[Huawei]dis arp [Huawei]dis arp all //查看ARP
考点04:配置路由器接口IP和静态路由:
[Huawei]int g0/0/1 //进入接口
[Huawei-g0/0/1]ip add 192.168.1.6 24 //配IP地址
[Huawei-GigabitEthernet0/0/1]undo shutdown //开启
<Huawei>dis cur 或 [Huawei]dis cur //查看ARP
//配置静态路由
[Huawei]ip route-static 192.168.20.0 24 10.0.12.2
[Huawei]ip route-static 192.168.10.0 24 serial 0/0/1
[Huawei]ip route-static 0.0.0.0 0 192.168.1.5 //默认
[Huawei]dispaly ip routing-table //查看路由表

考点05:配置交换机VLAN相关命令:
[Huawei]vlan 10 或 [Huawei]vlan 20 //创建VLAN
[Huawei-vlan10]description dtwlxy //VLAN描述
[Huawei]vlan batch 30 40 //创建多个VLAN
[Huawei]int g0/0/1 //进入接口
[Huawei-g0/0/1]port link-type access //访问口
[Huawei-g0/0/1]port default vlan 10 //加入VLAN
[Huawei-g0/0/2]port link-type trunk //干道口
[Huawei-g0/0/2]port trunk allow-pass vlan 10 20允许
[Huawei-g0/0/2]port trunk allow-pass vlan all //所有
[Huawei]int e0/0/2 //进入接口
[Huawei-E0/0/2]port link-type hybrid //混合口模式
[Huawei-E0/0/2]undo port default vlan //删除默认vlan
[Huawei-E0/0/2]port hybrid untagged vlan 20//去标签
[Huawei-E0/0/2]port hybrid pvid vlan 2//设置默认vlan
[Huawei-E0/0/2]port trunk allow-pass vlan 10 to 100
//允许 (前面加undo不允许)
[Huawei]dis port vlan //查看vlan
[Huawei]display vlan //查看vlan
考点06:配置交换机VLAN一致性GVRP:通
用VLAN注册协议,国际标准。双向注册。
Normal模式: (类似cisco交换机服务器模式)
[Huawei]gvrp //开启gvrp 也是默认模式
Fixed模式: (类似cisco交换机客户机模式)
[Huawei-g0/0/2]gvrp registration fixed
Forbidden模式: (类似cisco交换机透明模式)
[Huawei-g0/0/3]gvrp registration forbidden
dis vlan summary //查看vlan汇总
dis gvrp status //查看gvrp状态
考点07:配置路由器RIP协议:RIPv1 RIPv2
[Huawei]rip //启用RIP默认v1
[Huawei-rip-1]network 192.168.1.0 //发布直连网段
[Huawei-rip-1]version 2 //配置v2版本
[Huawei]dis rip //查看rip
[Huawei]dis rip database //查看rip数据库
[Huawei]dis ip routing-table //查看路由表
优先级:直连 0、静态 60、rip 100、ospf 10/150
考点8:配置路由器OSPF协议:
[Huawei]ospf 1 //启用OSPF 默认是进程1
[Huawei-ospf-1]area 0 //进入区域0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.0
0.0.0.255 //发布直连网段
[Huawei-ospf-1]silent-interface g0/0/2 //被动接口
[Huawei]dis ospf interface //查看ospf通告
[Huawei]dis ospf peer //查看ospf邻居
[Huawei]dis ip routing-table //查看路由表
[Huawei]dis ospf routing //查看ospf路由表


考点9:配置基于全局的DHCP协议:
[Huawei]dhcp enable //开启dhcp
[Huawei]ip pool dtwlxy //地址池名
[Huawei-ip-pool-dtwlxy]network 192.168.1.0 //地址池
[Huawei-ip-pool-dtwlxy]lease day 2 //租约默认1
[Huawei-ip-pool-dtwlxy]gateway-list 192.168.1.254
[Huawei-ip-pool-dtwlxy]excluded-ip-address //网关
192.168.1.250 192.168.1.253 //排除IP范围
[Huawei-ip-pool-dtwlxy]dns-list 8.8.8.8 //DNS服务器
[Huawei-G0/0/0]dhcp select global //基于全局
考点10:配置基于接口的DHCP协议:
[Huawei]dhcp enable //开启dhcp
[Huawei]int g0/0/1 //进入接口
[Huawei-G0/0/1]dhcp select interface //基于接口
[Huawei-G0/0/1]dhcp server lease day 2 //租约默认1
[Huawei-G0/0/1]dhcp server excluded-ip-address
192.168.1.1 192.168.1.10 //排除IP范围
[Huawei-G0/0/1]dhcp server dns-list 8.8.8.8 //DNS
[Huawei]dis ip pool //查看dhcp
客户机:自动获取, 查看ipconfig、ifconfig
考点11:配置路由器基本ACL:2000-2999
[Huawei]acl 2000 //配置基本acl
[Huawei-acl-basic-2000]rule 5 permit source 1.1.1.1
0 //允许源IP(注意反掩码0,默认步长5)
[Huawei-acl-basic-2000]rule 10 deny any //拒绝任意
[Huawei]user-interface vty 0 4 //进入接口
[Huawei-ui-vty0-4]acl 2000 inbound //应用acl
[Huawei]dis acl all //查看所有acl
[Huawei]dis acl 2000 //查看acl 2000
考点12:配置路由器高级ACL:3000-3999
[Huawei]acl 3000 //配置高级acl
[Huawei-acl-adv-3000]rule permit ip source 1.1.1.1 0
destination 4.4.4.4 0 //允许访问
[Huawei]user-interface vty 0 4 //进入虚拟接口
[Huawei-ui-vty0-4]acl 3000 outbound //应用acl
[Huawei]int g0/0/1 //进入接口
[Huawei-G0/0/1]traffic-filter inbound acl 3000 //应用
[Huawei]dis acl all //查看所有acl
考点13:配置路由器动态NAT:(多对少)
[Huawei]nat address-group 1 202.169.10.50
202.169.10.60 //外部IP
[Huawei]acl 2001 //配置ACL
[Huawei-acl-basic-2001]rule 5 permit source
172.17.1.0 0.0.0.255 //内部IP
[Huawei]int g0/0/1 //进入接口
[Huawei-GigabitEthernet0/0/0]nat outbound 2001
address-group 1 no-pat //应用NAT
[Huawei]dis nat outbound //查看NAT
考点14:配置路由器静态NAT:(一对一)
[Huawei]int g0/0/1 //进入接口
[Huawei-GigabitEthernet0/0/1]nat static global
202.169.10.5 inside 172.16.1.1 //一对一转换

配置路由器动态NAPT:(多对一)
[Huawei]int g0/0/0 //进入接口
[Huawei-G0/0/0]nat outbound 2001 //多对一转换
[Huawei]dis nat static //查看静态NAT
考点15:配置三层交换机VLAN间路由:

首先基本配置,IP、VLAN等。
[Huawei]int vlanif 10 //进入接口
[Huawei-Vlanif10]ip add 192.168.1.254 24 //配IP
[Huawei]int vlanif 20 //进入接口
[Huawei-Vlanif20]ip add 192.168.2.254 24 //配IP
[Huawei]dis ip interface brief //接口简略信息
[Huawei]dis port vlan //接口vlan信息
[Huawei]dis vlan //查看vlan信息
考点16:配置单臂路由VLAN间通信:

首先基本配置,IP、VLAN等。
[Huawei-G0/0/1.1]ip add 192.168.1.254 24 //配置IP
[Huawei-G0/0/1.1]dot1q termination vid 10 //封装
[Huawei-G0/0/1.1]arp broadcast enable //开启arp
[Huawei]dis ip interface brief //查看接口
[Huawei]dis ip routing-table //查看路由表
[Huawei]display current-configuration //查看配置


举报本楼

本帖有 2 个回帖,您需要登录后才能浏览 登录 | 注册
您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系大家 |网站地图  

GMT+8, 2024-11-15 14:43 , Processed in 0.208427 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部
XML 地图 | Sitemap 地图