华为基础命令总结.doc_第1页
华为基础命令总结.doc_第2页
华为基础命令总结.doc_第3页
华为基础命令总结.doc_第4页
华为基础命令总结.doc_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

华为基础命令总结目 录1.镜像口配置12.设备改名字23.配置保存24查看路由表25.telnet密码、特权密码26.用户远程登录 从用户模式变成特权模式27.交换接口配置(vlan、access、trunk)38.接口物理配置39.DHCP分配310.VRRP配置411.静态路由412.RIP协议413.OSPF协议41.单区域42.多区域53.STUB54.完全STB55.点到点56.改COST值67.查看配置信息614.端口聚合61.二层端口聚合 (华为又名 E-trunk)62.三层端口聚合715.MSTP71.配置82.查看配置信息1016.ACL101. 标准列表102.扩展列表113.时间的配置 (例子)114.查看配置信息111.镜像口配置Quidwaymonitor-port 指定镜像端口Quidwayport mirror 指定被镜像端口Quidwayport mirror int_list observing-port int_type int_num 指定镜像和被镜像2.设备改名字SW2sysname SW23.配置保存saveAre you sure to continue?Y/Ny4查看路由表display ip routing-table5.telnet密码、特权密码Quidwaysuper password 修改特权用户密码Huaweiuser-interface vty 0 3Huawei-ui-vty0-3authentication-mode password /设置口令模式Huawei-ui-vty0-3set authentication password cipher 123Huawei-ui-vty0-3user privilege level 3 用户级别6.用户远程登录 从用户模式变成特权模式此命令在被telnet的路由器上配置,这里和思科的命令不同,要想在 LSW1 配置密码 只能配置 CON 密码!Huaweisuper password level 7 cipher 123例子 LSW2 远程登录到 LSW1 telnet 192.168.1.1super 7Password:sysHuawei7.交换接口配置(vlan、access、trunk)SW1vlan 3 SW1-vlan3port ethernet 0/1 to ethernet 0/4 /在VLAN中增加端口SW1int g0/0/1SW1-GigabitEthernet0/0/1port link-type accessSW1-GigabitEthernet0/0/1port default vlan 10SW1int e0/0/1SW1-Ethernet0/0/1port link-type trunkSW1-Ethernet0/0/1port trunk allow-pass vlan ID|AllSW1-Ethernet0/0/1port trunk pvid vlan 3 /设置trunk端口的PVID8.接口物理配置Quidway-Ethernet0/1duplex half|full|auto /配置端口工作状态Quidway-Ethernet0/1speed 10|100|auto /配置端口工作速率Quidway-Ethernet0/1flow-control /配置端口流控Quidway-Ethernet0/1mdi across|auto|normal /配置端口平接扭接Quidway-Ethernet0/1port link-type trunk|access|hybrid /设置端口工作模式Quidway-Ethernet0/1undo shutdown /激活端口9.DHCP分配SW2dhcp enableSW2ip pool 1SW2-ip-pool-1network 192.168.1.0 255.255.255.0SW2-ip-pool-1dns-list 192.168.1.1SW2-ip-pool-1gateway-list 192.168.1.1SW2-ip-pool-1excluded-ip-address192.168.1.1255.255.255.0 查看配置命令Quidway display ip pool 查看IP地址池配置情况10.VRRP配置SW2int vl 10SW2-Vlanif10ip add 192.168.1.253 255.255.255.0SW2-Vlanif10vrrp vrid 10 192.168.1.254SW2-Vlanif10vrrp vrid 10 priority 120SW2-Vlanif10vrrp vrid 10 track interface g0/0/3 reduced 30查看配置命令 display vrrp 命令可以看到SwitchA的状态是Master11.静态路由SW1ip route-static 20.1.1.0 255.255.255.0 10.1.1.212.RIP协议SW1ripSW1-rip-1version 2SW1-rip-1undo summarySW1-rip-1net 10.0.0.0删掉 rip 协议SW1undo rip 1Warning: The RIP process will be deleted. Continue?Y/Ny注意:1.绿色数字是几 就删掉几 比如SW1-rip-2 就 SW1undo rip 2 2.比如10.1.1.1/24 要是通告网络的话 cisco可以10.1.1.0 华为必须的 10.0.0.0查看配置信息SwitchA display rip 1 route 查看SwitchA的RIP路由表。13.OSPF协议1.单区域SW1ospfSW1-ospf-1area 0SW1-ospf-1-area-0.0.0.0network 10.1.1.0 0.0.0.255SW3router id 1.1.1.12.多区域SW1-1ospfSW1-1-ospf-1area 1SW1-1-ospf-1-area-0.0.0.1network 30.1.1.0 0.0.0.2553.STUBSW1-1-ospf-1-area-0.0.0.1stub4.完全STBSW1-1-ospf-1-area-0.0.0.1stub no-summaryNSSA区域和STUB区域配置一样5.点到点SW2int vl 30SW2-Vlanif30ospf network-type p2p查看接口什么模式 (紫色部分看出已经变成点到点模式)SW3display ospf interface Vlanif 40 OSPF Process 1 with Router ID 20.1.1.1 Interfaces Interface: 20.1.1.1 (Vlanif40) - 20.1.1.2 Cost: 1 State: P-2-P Type: P2P MTU: 1500 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 16.改COST值SW3int vl 40SW3-Vlanif40ospf cost 10查看cost值 (紫色部分已经看出cost值改成10了 默认是1)SW3display ospf interface Vlanif 40 OSPF Process 1 with Router ID 20.1.1.1 Interfaces Interface: 20.1.1.1 (Vlanif40) - 20.1.1.2 Cost: 10 State: P-2-P Type: P2P MTU: 1500 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 17.查看配置信息SwitchA display ospf peer 查看SwitchA的OSPF邻居SwitchA display ospf routing 显示SwitchA的OSPF路由信息。SwitchA display ospf lsdb 查看SwitchA的LSDB。14.端口聚合 1.二层端口聚合 (华为又名 E-trunk)SW1interface Eth-Trunk 1SW1int g0/0/1SW1-GigabitEthernet0/0/1eth-trunk 1SW1-GigabitEthernet0/0/1int g0/0/2SW1-GigabitEthernet0/0/2eth-trunk 1SW1int Eth-Trunk 1SW1-Eth-Trunk1port link-type trunkSW1-Eth-Trunk1port trunk allow-pass vlan all检查Eth-Trunk 1是否创建成功,及成员接口是否正确加入 SW1display trunkmembership eth-trunk 1Trunk ID: 1 Used status: VALID TYPE: ethernet Working Mode : Normal Number Of Ports in Trunk = 2Number Of Up Ports in Trunk = 2Operate status: up Interface GigabitEthernet0/0/1, valid, operate up, weight=1Interface GigabitEthernet0/0/2, valid, operate up, weight=1显示Eth-Trunk 1的配置信息(查看时 打dis eth-trunk1 不能打 dis e-trunk 1 因为e-trunk和eth-trunk不一样 )display eth-trunk 1Eth-Trunk1s state information is:WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 2 -PortName Status Weight GigabitEthernet0/0/1 Up 1 GigabitEthernet0/0/2 Up 1 2.三层端口聚合Huaweivlan 100Huaweiint vl 100Huawei-Vlanif100ip add 10.1.1.1 255.255.255.0Huaweiinterface Eth-Trunk 1Huaweiint g0/0/1Huawei-GigabitEthernet0/0/1eth-trunk 1Huaweiint g0/0/2Huawei-GigabitEthernet0/0/2eth-trunk 1Huaweiinterface Eth-Trunk 1Huawei-Eth-Trunk1port link-type accessHuawei-Eth-Trunk1port default vlan 10015.MSTP拓扑图注:stp enable 最后配置1.配置LSW1sysHuaweisys LSW1LSW1vl 10LSW1-vlan10vl 20LSW1-vlan20int g0/0/1LSW1-GigabitEthernet0/0/1port link-type trunkLSW1-GigabitEthernet0/0/1port trunk allow-pass vlan allLSW1-GigabitEthernet0/0/1bpdu enableLSW1-GigabitEthernet0/0/1int g0/0/2LSW1-GigabitEthernet0/0/2port link-type trunkLSW1-GigabitEthernet0/0/2port trunk allow-pass vlan allLSW1-GigabitEthernet0/0/2bpdu enableLSW1stp region-configurationLSW1-mst-regionregion-name RG1LSW1-mst-regionregion-name RG2LSW1-mst-regioninstance 1 vlan 10LSW1-mst-regioninstance 2 vlan 20LSW1-mst-regionactive region-configuration 激活配置域LSW1stp pathcost-standard legacy 端口开销的计算方法华为私有计算方法LSW1stp bpdu-protection 启动BPDU保护LSW1-GigabitEthernet0/0/3stp edged-port enable 边缘端口配置LSW1-GigabitEthernet0/0/3port hybrid pvid vlan 10 边缘端口配置LSW1-GigabitEthernet0/0/3port hybrid untagged vlan 10 边缘端口配置LSW1int g0/0/4LSW1-GigabitEthernet0/0/4stp edged-port enableLSW1-GigabitEthernet0/0/4port hybrid pvid vlan 20LSW1-GigabitEthernet0/0/4port hybrid untagged vlan 20LSW1stp enableLSW2syHuaweisy LSW2LSW2vl 10LSW2-vlan10vl 20LSW2int g0/0/1LSW2-GigabitEthernet0/0/1port link-type trunkLSW2-GigabitEthernet0/0/1port trunk allow-pass vlan allLSW2-GigabitEthernet0/0/1stp root-protection 启动根保护LSW2int g0/0/2LSW2-GigabitEthernet0/0/2port link-type trunkLSW2-GigabitEthernet0/0/2port trunk allow-pass vlan allLSW2-GigabitEthernet0/0/2stp root-protectionLSW2stp region-configurationLSW2-mst-regionregion-name RG1LSW2-mst-regioninstance 1 vlan 10LSW2-mst-regioninstance 2 vlan 20LSW2-mst-regionactive region-configurationLSW2stp instance 0 priority 4096LSW2stp instance 1 priority 4096LSW2stp instance 2 priority 8192 LSW2stp enableLSW3sysHuaweisys LSW3LSW3vlan 10LSW3-vlan10vl 20LSW3int g0/0/1LSW3-GigabitEthernet0/0/1port link-type trunkLSW3-GigabitEthernet0/0/1port trunk allow-pass vlan allLSW3-GigabitEthernet0/0/1stp root-protectionLSW3-GigabitEthernet0/0/1int g0/0/2LSW3-GigabitEthernet0/0/2port link-type trunkLSW3-GigabitEthernet0/0/2port trunk allow-pass vlan allLSW3-GigabitEthernet0/0/2stp root-protectionLSW3stp region-configurationLSW3-mst-regionregion-name RG2LSW3-mst-regioninstance 1 vl 10LSW3-mst-regionactive region-configurationLSW3stp instance 0 priority 8192LSW3stp instance 1 priority 8192LSW3stp instance 2 priority 4096LSW3stp pathcost-standard legacyLSW3stp enable2.查看配置信息 display stp brief 查看端口状态和端口的保护类型16.ACL注:标准访问列表是 2000-2999 扩展访问列表是 3000-3999 LSW1 不能访问 LSW21. 标准列表SW1acl 2000 定义ACL规则SW1-acl-basic-2000rule deny source 10.1.1.0 0.0.0.255SW1traffic classifier 1 配置流分类,定义基于ACL的匹配规则SW1-classifier-1if-match acl 2000SW1traffic behavior 2 定义流行为SW1-behavior-2denySW1traffic policy 3 定义流策略,将流分类与流行为关

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论