跳至内容
水月笔记
用户工具
登录
站点工具
搜索
工具
显示页面
过去修订
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
开始
»
网络相关
»
华为配置命令
您的足迹:
网络相关:华为配置命令
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
华为配置命令手册 //display// //lldp// //neighbor// //brief// 命令用来查看邻居设备的概要信息 配置名称和密码 system-view 进入系统视图配置 quit或return 退出系统视图模式 sysname 名称 设置主机名 user-interface console 0 进入控制台 authentication-mode password 回车后设置密码 修改用户界面的验证密码 set authentication password cipher 密码 配置密文密码 配置远程管理IP地址 interface vlanif 1 进入VLAN ip add 192.168.1.254 24 配置IP undo shutdown 开启接口 dns domain 域名 设置域名 dns server 192.168.254.254 设置域名IP dis vlan 显示vlan save 保存配置 dis curr 显示当前配置 reboot 重启设备 undo terminal monitor 取消提示信息 配置端口速率、双工、ARP: int g0/0/1 进入接口 description 内容 端口描述 undo negotiation auto 取消协商 duplex full 全双工 auto duplex full 自动协商速率 speed 10 速率10M auto speed 100 自动协商速率 arp static 192.168.1.8 5489-99cf-2603 绑定MAC地址 dis arp 或 dis arp all 查看ARP 配置接口IP和静态路由 int g0/0/1 进入接口 ip add 192.168.1.6 24 配IP地址 undo shutdown 开启 dis cur 或 dis cur 查看ARP ip route-static 192.168.20.0 24 10.0.12.2 配置静态路由 ip route-static 192.168.10.0 24 serial 0/0/1 端口 ip route-static 0.0.0.0 0 192.168.1.5 默认路由8个0 display ip routing-table 查看路由表 配置VLAN vlan 10 创建vlan 10 description 内容 vlan描述 vlan batch 30 40 创建多个vlan 2 to 20 int g0/0/1 进入接口 port link-type access 访问口 port default vlan 10 加入vlan port link-type trunk 干道口 port trunk allow pass vlan 10 20 允许通过 potr turnk allow pass vlan all 所有通过 int e0/0/2 进入接口 port link-type hybrid 混合口模式 undo port default vlan 删除默认vlan port hybrid untagged vlan 20 去标签 port hybrid pvid vlan 2 设置默认vlan port trunk allow-pass vlan 10 to 100 允许通过不连续用空格(前面加undo不允许) dis port vlan 查看端口所属vlan display vlan 查看vlan 配置VLAN一致性GVRP 双向注册 Normal模式(服务器模式) VLAN增删改,广播保持一致 gvrp 开启gvrp也是默认模式 Fixed模式(客户机模式) 只传播手动配置的VLAN信息 gvrp registration fixed 开启客户机模式 Fobbidden模式(透明模式) 只传播VLAN1不传播其他VLAN ,默认模式 gvrp registration forbidden 开启透明模式 dis vlan summary 查看vlan汇总 dis gvrp status 查看gvrp状态 配置RIP协议 rip 启用RIP默认V1 network 192.168.1.0 发布直连网段 version 2 配置v2版本 dis rip 查看rip dis rip database 查看rip数据库 dis ip routing-table 查看路由表 优先级:直连0、静态60、rip 100、ospf 10/150 配置OSPF协议 ospf 1 启用OSPF默认是进程1 area 0 进入区域0 network 192.168.3.0 0.0.0.255 发布直连网段 sildent-interface g0/0/2 被动接口只能往外发路由 dis ospf interface 查看ospf通告 dis ospf peer 查看ospf邻居 dis ip routing-table 查看路由表 dis ospf routing 查看ospt路由表 配置基于全局的DHCP协议 dhcp enable 开启dhcp ip pool 名称 地址池名 network 192.168.1.0 地址池 lease day 2 租约默认为1 gateway-list 192.168.1.254 网关 excluded-ip-address 192.168.1.250 192.168.1.253 排除IP范围 dns-list 8.8.8.8 DNS服务器 dhcp select global 基于全局 配置基于接口的DHCP协议 dhcp enable 开启dhcp int g0/0/1 进入接口 dhcp select interface 基于接口 dhcp server lease day 2 租约默认为1 dhcp server excluded-ip-address 192.168.1.1 192.168.1.10 排除IP范围 dhcp server dns-list 8.8.8.8 DNS dis ip pool 查看dhcp 客户机:自动获取 查看ipconfig/ifconfig 配置基本ACL: 2000-2999 acl 2000 配置基本acl rule 5 permit source 1.1.1.1 0 允许源IP(注意反掩码0,默认步长5) rule 10 deny any 拒绝任意 user-interface vty 0 4 进入接口 acl 2000 inbound 应用acl dis acl all 查看所有acl dis acl 2000 查看acl 2000 配置高级ACL: 3000-3999 acl 3000 配置高级acl rule permit ip source 1.1.1.1 0 destination 4.4.4.4 0 允许访问 user-interface vty 0 4 进入虚拟接口 acl 3000 outbound 虚拟应用acl int g0/0/1 进入物理接口 traffic-filter inbound acl 3000 物理应用acl dis acl all 查看所有acl 配置动态NAT(多对少) nat address-group 1 202.169.10.50 202.169.10.60 外部IP acl 2001 配置ACL抓流量 rule 5 permit source 172.17.1.0 0.0.0.255 内部IP int g0/0/01 进入接口 nat outbound 2001 address-group 1 no-pat 应用NAT不使用段数转换 dis nat outbound 查看NAT 配置静态NAT(一对一) int g0/0/1 进入接口 nat static global 202.169.10.5 inside 172.16.1.1 一对一转换用于服务器 配置动态NAPT(多对一) int g0/0/0 进入接口 nat outbound 2001 多对一转换 dis nat static 查看静态NAT 配置三层交换机VLAN间路由 int vlanif 10 进入接口 ip add 192.168.1.254 24 配IP int vlanif 20 进入接口 ip add 192.168.2.254 24 配IP dis ip interface brief 接口简略信息 dis port vlan 接口vlan信息 dis vlan 查看vlan信息 配置单臂路由VLAN间通信 ip add 192.168.1.254 24 配置IP dot1q termination vid 10 封装 arp broadcast enable 开启arp dis ip interface brief 查看接口 dis ip routing-table 查看路由表 display current-configuration 查看配置
CKG Edit
/www/wwwroot/dokuwiki/data/pages/网络相关/华为配置命令.txt
· 最后更改: 2024/03/18 09:02 由
bjgdtc
页面工具
显示页面
过去修订
反向链接
回到顶部