华为交换机MAC找端口、限速和禁端口命令

进入交换机后:

 

 

  1. 通过已知的MAC来回去改MAC的端口

 

dis mac-address

-------------------------------------------------------------------------------

MAC Address    VLAN/VSI                          Learned-From        Type      

-------------------------------------------------------------------------------

0026-b92c-79a7 1/-                               GE0/0/14            dynamic   

0026-b95a-cc35 1/-                               GE0/0/18            dynamic   

3c97-0e6a-d49c 1/-                               GE0/0/24            dynamic   

d4ae-52cd-f19d 1/-                               GE0/0/22            dynamic   

e0db-5525-fa15 1/-                               GE0/0/2             dynamic   

 

-------------------------------------------------------------------------------

Total items displayed = 5

 

 

  1. 通过匹配端口来限速(那匹配的 0/0/18 端口为例)

a.system-view        //进视图模式        

b.[HUAWEI]interface GigabitEthernet 0/0/18      //   interface GigabitEthernet 0/0/18才是命令

c.[HUAWEI-GigabitEthernet0/0/18]qos lr inbound cir 10240 cbs 204800    //上传限速10M    cbs官方建议=200 * cir

d.[HUAWEI-GigabitEthernet0/0/18]qos lr outbound cir 20480 cbs 409600   //下载限速20M    20480kbp=20Mbp

e.[HUAWEI-GigabitEthernet0/0/18]display this       //查看有哪些部署18端口

#

interface GigabitEthernet0/0/18

 qos lr outbound cir 20480 cbs 409600

 qos lr inbound cir 10240 cbs 204800

#

return

 

f.[HUAWEI-GigabitEthernet0/0/18]undo qos lr inbound   //删除18端口上传限速

g.[HUAWEI-GigabitEthernet0/0/18]undo qos lr outbound  //删除18端口下载限速

备注:查看所有端口配置,可以使用命令display current-configuration interface

 

  1. 关闭端口和开启(以18端口为例)

a.system-view

b.[HUAWEI]interface GigabitEthernet 0/0/18

c.[HUAWEI-GigabitEthernet0/0/18]shutdown          //关闭端口

d.[HUAWEI-GigabitEthernet0/0/18]display interface brief     //显示所有端口状态简报

PHY: Physical

*down: administratively down

#down: LBDT down

(l): loopback

(s): spoofing

(b): BFD down

(e): ETHOAM down

(dl): DLDP down

(lb): LBDT block

InUti/OutUti: input utility/output utility

Interface                   PHY   Protocol  InUti OutUti   inErrors  outErrors

GigabitEthernet0/0/1        down  down         0%     0%          0          0

GigabitEthernet0/0/2        up    up           0%     0%          1          0

GigabitEthernet0/0/3        down  down         0%     0%          0          0

GigabitEthernet0/0/4        down  down         0%     0%          0          0

GigabitEthernet0/0/5        down  down         0%     0%          0          0

GigabitEthernet0/0/6        down  down         0%     0%          0          0

GigabitEthernet0/0/7        down  down         0%     0%          0          0

GigabitEthernet0/0/8        down  down         0%     0%          0          0

GigabitEthernet0/0/9        down  down         0%     0%          0          0

GigabitEthernet0/0/10       down  down         0%     0%          0          0

GigabitEthernet0/0/11       down  down         0%     0%          0          0

GigabitEthernet0/0/12       down  down         0%     0%          0          0

GigabitEthernet0/0/13       down  down         0%     0%          0          0

GigabitEthernet0/0/14       up    up           0%     0%          0          0

GigabitEthernet0/0/15       down  down         0%     0%          0          0

GigabitEthernet0/0/16       down  down         0%     0%          0          0

GigabitEthernet0/0/17       down  down         0%     0%          0          0

GigabitEthernet0/0/18       *down down         0%     0%          0          0

GigabitEthernet0/0/19       down  down         0%     0%          0          0

GigabitEthernet0/0/20       down  down         0%     0%          0          0

GigabitEthernet0/0/21       down  down         0%     0%          0          0

GigabitEthernet0/0/22       up    up           0%     0%          0          0

GigabitEthernet0/0/23       down  down         0%     0%          0          0

GigabitEthernet0/0/24       up    up           0%     0%          0          0

GigabitEthernet0/0/25       down  down         0%     0%          0          0

GigabitEthernet0/0/26       down  down         0%     0%          0          0

GigabitEthernet0/0/27       down  down         0%     0%          0          0

GigabitEthernet0/0/28       down  down         0%     0%          0          0

NULL0                       up    up(s)        0%     0%          0          0

Vlanif1

 

 

 

 

e.[HUAWEI-GigabitEthernet0/0/18]undo shutdown  

//开启端口  当你在这个路径下GigabitEthernet0/0/18 可以执行上面命令,否则:和关闭执行顺序一样

f.[HUAWEI-GigabitEthernet0/0/18]display interface brief   //这个命令不需要在0/0/18路径下

也是可以[HUAWEI]display interface brief

PHY: Physical

*down: administratively down

#down: LBDT down

(l): loopback

(s): spoofing

(b): BFD down

(e): ETHOAM down

(dl): DLDP down

(lb): LBDT block

InUti/OutUti: input utility/output utility

Interface                   PHY   Protocol  InUti OutUti   inErrors  outErrors

GigabitEthernet0/0/1        down  down         0%     0%          0          0

GigabitEthernet0/0/2        up    up           0%     0%          1          0

GigabitEthernet0/0/3        down  down         0%     0%          0          0

GigabitEthernet0/0/4        down  down         0%     0%          0          0

GigabitEthernet0/0/5        down  down         0%     0%          0          0

GigabitEthernet0/0/6        down  down         0%     0%          0          0

GigabitEthernet0/0/7        down  down         0%     0%          0          0

GigabitEthernet0/0/8        down  down         0%     0%          0          0

GigabitEthernet0/0/9        down  down         0%     0%          0          0

GigabitEthernet0/0/10       down  down         0%     0%          0          0

GigabitEthernet0/0/11       down  down         0%     0%          0          0

GigabitEthernet0/0/12       down  down         0%     0%          0          0

GigabitEthernet0/0/13       down  down         0%     0%          0          0

GigabitEthernet0/0/14       up    up           0%     0%          0          0

GigabitEthernet0/0/15       down  down         0%     0%          0          0

GigabitEthernet0/0/16       down  down         0%     0%          0          0

GigabitEthernet0/0/17       down  down         0%     0%          0          0

GigabitEthernet0/0/18       down  down         0%     0%          0          0

GigabitEthernet0/0/19       down  down         0%     0%          0          0

GigabitEthernet0/0/20       down  down         0%     0%          0          0

GigabitEthernet0/0/21       down  down         0%     0%          0          0

GigabitEthernet0/0/22       up    up           0%     0%          0          0

GigabitEthernet0/0/23       down  down         0%     0%          0          0

GigabitEthernet0/0/24       up    up           0%     0%          0          0

GigabitEthernet0/0/25       down  down         0%     0%          0          0

GigabitEthernet0/0/26       down  down         0%     0%          0          0

GigabitEthernet0/0/27       down  down         0%     0%          0          0

GigabitEthernet0/0/28       down  down         0%     0%          0          0

NULL0                       up    up(s)        0%     0%          0          0

Vlanif1                     up    up           --     --          0          0

你可能感兴趣的:(华为交换机MAC找端口、限速和禁端口命令)