151-5197-5087
扬州华为授权服务中心
当前位置:网站首页 > 网络设备调试 正文 网络设备调试

【硬件相关】交换机配置说明

2024-12-05 23:02:35 网络设备调试 24 ℃ 0 评论

华为交换机

示例为华为交换机(S6720-54C-EI-48S-AC)

一、连接说明

  • 笔记本通过Console线连接至交换机COM口,通过xshell连接至调试会话
    注:
    1、可通过设备管理器查看COM端口号
    2、传输协议为SERIAL,波特率为9600,其他参数值为默认即可
    3、华为交换机默认用户密码为admin/admin@huawei.com

二、配置说明

1、链路聚合
  • 执行system-view命令进入系统视图
<HUAWEI>system-view 
Enter system view, return user view with Ctrl+Z.
[HUAWEI]
  • 执行interface Eth-Trunk <port-id>命令进入链路聚合端口,执行mode lacp命令将端口组设置模式为LACP
[HUAWEI]interface Eth-Trunk 10
[HUAWEI-Eth-Trunk10]mode lacp 
[HUAWEI-Eth-Trunk10]display this
#
interface Eth-Trunk10
 mode lacp
#
return
[HUAWEI-Eth-Trunk10]quit
  • 执行interface XGigabitEthernet 0/0/{交换机端口号}进入交换机端口,执行eth-trunk {端口组ID}将当前交换机端口加入端口组
    注:如需取消设置,则执行undo eth-trunk即可
[HUAWEI]interface XGigabitEthernet 0/0/42
[HUAWEI-XGigabitEthernet0/0/42]eth-trunk 10
[HUAWEI-XGigabitEthernet0/0/42]display this
#
interface XGigabitEthernet0/0/42
 eth-trunk 10
#
return
  • 执行display eth-trunk查看当前端口组配置
    注:需要把对应节点网卡配置修改为bond4,此时查看对应端口组端口状态为Selected
[HUAWEI]display eth-trunk
Eth-Trunk80's state information is:
Local:
LAG ID: 80                  WorkingMode: LACP                                 
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 1856-4421-3090                         
Least Active-linknumber: 1  Max Active-linknumber: 8                         
.
Operate status: up          Number Of Up Port In Trunk: 4                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
XGigabitEthernet0/0/7  Selected 10GE     32768   1      20545   10111100  1     
XGigabitEthernet0/0/9  Selected 10GE     32768   2      20545   10111100  1     
XGigabitEthernet0/0/3  Selected 10GE     32768   3      20545   10111100  1     
XGigabitEthernet0/0/8  Selected 10GE     32768   4      20545   10111100  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
XGigabitEthernet0/0/7  65535    6891-d066-f634  255     1      15      10111100
XGigabitEthernet0/0/9  65535    6891-d066-f634  255     2      15      10111100
XGigabitEthernet0/0/3  65535    6891-d066-f634  255     3      15      10111100
XGigabitEthernet0/0/8  65535    6891-d066-f634  255     4      15      10111100
    
Eth-Trunk81's state information is:
Local:
LAG ID: 81                  WorkingMode: LACP                                 
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 1856-4421-3090                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: up          Number Of Up Port In Trunk: 2                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
XGigabitEthernet0/0/5  Selected 10GE     32768   5      20801   10111100  1     
XGigabitEthernet0/0/1  Selected 10GE     32768   6      20801   10111100  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
XGigabitEthernet0/0/5  65535    6891-d067-426c  255     1      15      10111100
XGigabitEthernet0/0/1  65535    6891-d067-426c  255     2      15      10111100
2、配置VLAN

华为S系列交换机 维护宝典 (华为坤灵分销V200版本)

  • 执行system-view命令进入系统视图
<HUAWEI>system-view 
Enter system view, return user view with Ctrl+Z.
[HUAWEI]
  • 执行vlan <vlan-id>命令创建VLAN,进入VLAN视图
    注:整机支持4096个VLAN,其中VLAN 0和VLAN 4095为保留VLAN,VLAN 1为缺省VLAN。因此创建VLAN时,可创建2~4094范围内的任意VLAN。
[HUAWEI] vlan 4000
[HUAWEI-vlan4000] quit
  • 执行interface XGigabitEthernet <interface-number>命令进入以太网接口视图
    执行port link-type access命令配置接口类型为access
    执行port default vlan <vlan-id>命令将接口加入到指定vlan
[HUAWEI]interface XGigabitEthernet 0/0/1 
[HUAWEI-XGigabitEthernet0/0/1]port link-type access 
Info: This operation may take a few seconds. Please wait for a moment...done.
[HUAWEI-XGigabitEthernet0/0/1]port default vlan 4000 
[HUAWEI-XGigabitEthernet0/0/1]quit 
[HUAWEI]
[HUAWEI]interface XGigabitEthernet 0/0/2 
[HUAWEI-XGigabitEthernet0/0/2]port link-type access 
Info: This operation may take a few seconds. Please wait for a moment...done.
[HUAWEI-XGigabitEthernet0/0/2]port default vlan 4000 
[HUAWEI-XGigabitEthernet0/0/2]quit 
[HUAWEI]
  • 执行display vlan summary命令查看当前已创建VLAN信息
    执行display vlan <vlan-id>命令查看指定VLAN信息
[HUAWEI]display vlan summary 
Static VLAN:
Total 3 static VLAN.
  1 4000 to 4001 

Dynamic VLAN:
Total 0 dynamic VLAN.

Reserved VLAN:
Total 0 reserved VLAN.
[HUAWEI]
[HUAWEI]display vlan 4000
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                                                          
--------------------------------------------------------------------------------
4000 common  UT:XGE0/0/1(U)     XGE0/0/2(U)     XGE0/0/3(U)     XGE0/0/4(U)     
                XGE0/0/5(D)     XGE0/0/6(D)     XGE0/0/7(D)     XGE0/0/8(D)     
                XGE0/0/9(D)     XGE0/0/10(D)    XGE0/0/11(D)    XGE0/0/12(D)    

VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------
4000 enable  default       enable  disable    VLAN 4000                         

2、常用操作

  • 查看交换机光模块SN号

可通过display transceiverdisplay elabel命令查询,一般SN号为Manu. Serial NumberBarCode对应参数值

<HUAWEI>system-view
[HUAWEI]display elabel

H3C交换机

示例为H3C交换机(H3C S6800 Series)

1、配置说明

参考文档:缺省情况下如何通过Console口登录设备

  • 笔记本通过Console线连接至交换机COM口,通过xshell连接至调试会话
    注:
    1、可通过设备管理器查看COM端口号
    2、传输协议为SERIAL,波特率为9600,其他参数值为默认即可

  • 执行system-view命令进入以太网端口视图

<H3C>system-view 
System View: return to User View with Ctrl+Z.
[H3C]
  • 创建动态链路聚合口1,设置trunk模式,允许所有VLAN通过,启用lacp(聚合口设置成动态dynamic,即lacp)
    注:交换机端对端口配置了lacp动态聚合,主机端同样需要针对网卡配置bond4(BONDING_OPTS='mode=4 miimon=100 ad_select=1 xmit_hash_policy=layer3+4'),否则交换机端口会处于Unselected状态
[H3C]interface Bridge-Aggregation 1                                                    
[H3C-Bridge-Aggregation1]port link-type trunk
[H3C-Bridge-Aggregation1]port trunk permit vlan all
[H3C-Bridge-Aggregation1]link-aggregation mode dynamic
[H3C-Bridge-Aggregation1]quit
  • 分别进入万兆端口1/3/5/7(可通过dis interface查看端口号全称),将端口加入到动态链路聚合口1中
[H3C]interface Ten-GigabitEthernet 1/0/1
[H3C-Ten-GigabitEthernet1/0/1]port link-type trunk
[H3C-Ten-GigabitEthernet1/0/1]port trunk permit vlan all
[H3C-Ten-GigabitEthernet1/0/1]port link-aggregation group 1
[H3C-Ten-GigabitEthernet1/0/1]interface Ten-GigabitEthernet 1/0/3
[H3C-Ten-GigabitEthernet1/0/3]port link-type trunk 
[H3C-Ten-GigabitEthernet1/0/3]port trunk permit vlan all
[H3C-Ten-GigabitEthernet1/0/3]port link-aggregation group 1
[H3C-Ten-GigabitEthernet1/0/3]interface Ten-GigabitEthernet 1/0/5
[H3C-Ten-GigabitEthernet1/0/5]port link-type trunk
[H3C-Ten-GigabitEthernet1/0/5]port trunk permit vlan all
[H3C-Ten-GigabitEthernet1/0/5]port link-aggregation group 1
[H3C-Ten-GigabitEthernet1/0/5]interface Ten-GigabitEthernet 1/0/7
[H3C-Ten-GigabitEthernet1/0/7]port link-type trunk
[H3C-Ten-GigabitEthernet1/0/7]port trunk permit vlan all
[H3C-Ten-GigabitEthernet1/0/7]port link-aggregation group 1
  • 可通过display link-aggregation verbose查看当前动态链路聚合信息
[H3C]display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing 
Port Status: S -- Selected, U -- Unselected, I -- Individual 
Port: A -- Auto port, M -- Management port, R -- Reference port 
Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, 
        D -- Synchronization, E -- Collecting, F -- Distributing, 
        G -- Defaulted, H -- Expired 

Aggregate Interface: Bridge-Aggregation1
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, 0868-8d67-de83
Local: 
  Port                Status   Priority Index    Oper-Key               Flag
  XGE1/0/1(R)         S        32768    1        1                      {ACDEF}
  XGE1/0/3            S        32768    2        1                      {ACDEF}
  XGE1/0/5            S        32768    3        1                      {ACDEF}
  XGE1/0/7            S        32768    4        1                      {ACDEF}
Remote: 
  Actor               Priority Index    Oper-Key SystemID               Flag   
  XGE1/0/1            255      1        15       0xffff, b026-285e-e3e0 {ACDEF}
  XGE1/0/3            255      2        15       0xffff, b026-285e-e3e0 {ACDEF}
  XGE1/0/5            255      3        15       0xffff, b026-285e-e3e0 {ACDEF}
  XGE1/0/7            255      4        15       0xffff, b026-285e-e3e0 {ACDEF}
  • 可通过display link-aggregation summary查看所有动态链路聚合状态
[H3C]display link-aggregation summary 
Aggregation Interface Type: 
BAGG -- Bridge-Aggregation, BLAGG -- Blade-Aggregation, RAGG -- Route-Aggregation, SCH-B -- Schannel-Bundle 
Aggregation Mode: S -- Static, D -- Dynamic 
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor System ID: 0x8000, 0868-8d67-de83

AGG        AGG   Partner ID              Selected  Unselected  Individual  Share
Interface  Mode                          Ports     Ports       Ports       Type 
--------------------------------------------------------------------------------
BAGG1      D     0xffff, b026-285e-e3e0  4         0           0           Shar 
BAGG2      D     0xffff, b026-285e-be30  4         0           0           Shar 
BAGG3      D     0xffff, b026-285f-0010  4         0           0           Shar 
BAGG4      D     0xffff, b026-285e-f7b0  4         0           0           Shar 

2、配置说明

  • 查看交换机万兆端口1/0/1状态
show interface Ten-GigabitEthernet 1/0/1
  • 查看交换机端口协商速率及端口状态
display interface brief

  • 查看交换机当前配置(如链路聚合配置、万兆网口配置等)
display this

版权说明:如非注明,本站文章均为 扬州驻场服务-网络设备调试-监控维修-南京泽同信息科技有限公司 原创,转载请注明出处和附带本文链接

请在这里放置你的在线分享代码
«    2024年12月    »
1
2345678
9101112131415
16171819202122
23242526272829
3031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
    文章归档
    网站收藏
    友情链接