Loading

Loading

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

一、华为交换机

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

1、配置说明

  • 笔记本通过Console线连接至交换机COM口,通过xshell连接至调试会话
    注:
    1、可通过设备管理器查看COM端口号
    2、传输协议为SERIAL,波特率为9600,其他参数值为默认即可
    3、华为交换机默认用户密码为admin/admin@huawei.com
  • 执行system-view命令进入以太网端口视图
<HUAWEI>system-view 
Enter system view, return user view with Ctrl+Z.
[HUAWEI]
  • 执行interface Eth-Trunk {端口组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、常用操作

  • 查看交换机光模块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
posted @ 2023-10-07 14:54  Luxf0  阅读(539)  评论(0编辑  收藏  举报