华三交换机常用配置
一.堆叠
1.设置第一台交换机成员号及优先级
[H3C]irf member 1 priority 32
2.关闭需要用到的端口
[H3C]interface range Ten-GigabitEthernet 1/0/51 to Ten-GigabitEthernet 1/0/52 [H3C-if-range]shutdown %Jul 28 12:20:13:544 2023 H3C STP/6/STP_NOTIFIED_TC: Instance 0's port Ten-GigabitEthernet1/0/52 was notified a topology change. %Jul 28 12:20:13:551 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/51 changed to down. %Jul 28 12:20:13:562 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/51 changed to down. [H3C-if-range]%Jul 28 12:20:13:653 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/52 changed to down. %Jul 28 12:20:13:660 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/52 changed to down. [H3C-if-range]quit
3.创建IRF虚拟接口
[H3C]irf-port 1/1 [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/51 You must perform the following tasks for a successful IRF setup: Save the configuration after completing IRF configuration. Execute the "irf-port-configuration active" command to activate the IRF ports. [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/52 [H3C-irf-port1/1]quit
4.开启端口,保存并激活irf配置
[H3C]interface range Ten-GigabitEthernet 1/0/51 to Ten-GigabitEthernet 1/0/52 [H3C-if-range]undo shutdown %Jul 28 12:21:51:353 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/51 changed to up. [H3C-if-range]%Jul 28 12:21:51:361 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/51 changed to up. %Jul 28 12:21:51:373 2023 H3C LLDP/6/LLDP_CREATE_NEIGHBOR: Nearest bridge agent neighbor created on port Ten-GigabitEthernet1/0/51 (IfIndex 52), neighbor's chassis ID is a055-28a6-0200, port ID is Ten-GigabitEthernet1/0/52. %Jul 28 12:21:51:415 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/52 changed to up. %Jul 28 12:21:51:428 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/52 changed to up. %Jul 28 12:21:51:436 2023 H3C LLDP/6/LLDP_CREATE_NEIGHBOR: Nearest bridge agent neighbor created on port Ten-GigabitEthernet1/0/52 (IfIndex 53), neighbor's chassis ID is a055-28a6-0200, port ID is Ten-GigabitEthernet1/0/51. [H3C]quit [H3C]save force Validating file. Please wait... Saved the current configuration to mainboard device successfully. [H3C]irf-port-configuration active [H3C]%Jul 28 12:22:11:599 2023 H3C STM/6/STM_LINK_UP: IRF port 1 came up. [H3C]%Jul 28 12:22:31:924 2023 H3C STM/2/STM_LINK_TIMEOUT: IRF port 1 went down because the heartbeat timed out. %Jul 28 12:22:31:924 2023 H3C STM/3/STM_LINK_DOWN: IRF port 1 went down.
5.配置第二台交换机
[H3C]irf member 1 renumber 2 Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y Please reboot the device for the new member ID to take effect. [H3C]save force Validating file. Please wait... Saved the current configuration to mainboard device successfully. [H3C]quit <H3C>reboot Start to check configuration with next startup configuration file, please wait.........DONE! This command will reboot the device. Continue? [Y/N]:y Now rebooting, please wait....%Jul 28 12:29:24:138 2023 H3C DEV/5/SYSTEM_REBOOT: System is rebooting now. [H3C]interface range Ten-GigabitEthernet 2/0/51 to Ten-GigabitEthernet 2/0/52 [H3C-if-range]shutdown %Jul 28 13:16:52:906 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet2/0/51 changed to down. %Jul 28 13:16:52:912 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet2/0/51 changed to down. %Jul 28 13:16:53:019 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet2/0/52 changed to down. %Jul 28 13:16:53:025 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet2/0/52 changed to down. [H3C-if-range]quit [H3C]irf-port 2/2 [H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/51 You must perform the following tasks for a successful IRF setup: Save the configuration after completing IRF configuration. Execute the "irf-port-configuration active" command to activate the IRF ports. [H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/52 [H3C-irf-port2/2]dis th # irf-port 2/2 port group interface Ten-GigabitEthernet2/0/51 port group interface Ten-GigabitEthernet2/0/52 # return [H3C-irf-port2/2]quit [H3C]interface range Ten-GigabitEthernet 2/0/51 to Ten-GigabitEthernet 2/0/52 [H3C-if-range]undo shutdown [H3C-if-range]quit [H3C]save force Validating file. Please wait... Saved the current configuration to mainboard device successfully. [H3C]irf-port-configuration active
6.验证是否成功
[H3C]dis irf MemberID Role Priority CPU-Mac Description *+1 Master 32 a055-2311-0104 --- 2 Standby 1 a055-28a6-0204 --- -------------------------------------------------- * indicates the device is the master. + indicates the device through which the user logs in. The bridge MAC of the IRF is: a055-2311-0100 Auto upgrade : yes Mac persistent : 6 min Domain ID : 0
二.snmp配置
1.SNMP v2
[H3C]snmp-agent [H3C]snmp-agent sys-info version v2c SNMPv1 and SNMPv2c are insecure because they transmit the community string and data in plaintext form. [H3C]snmp-agent community read xxx #xxx为团体名 [H3C]snmp-agent target-host trap address udp-domain xx.xx.xx.xx udp-port 161 params securityname xxx #xx.xx.xx.xx为NMS地址,xxx为团体名

浙公网安备 33010602011771号