How to configure Dying Gasp on Omada Campus switches

정보성 텍스트
설정 가이드
08-25-2025
90
카탈로그

Contents

Introduction

Requirements

Configuration

Configuration for sending the Dying Gasp message via the OAM link

Configuration for sending Dying Gasp message to syslog server

Configuration for sending Dying Gasp message via SNMP Trap

Verification

Conclusion

QA

Introduction

Devices located at the network edge often face suboptimal power conditions, making them prone to unexpected power loss. The Dying Gasp mechanism provides a way to send an alert to the monitoring system about an unexpected power failure before the device loses connectivity. When a power outage occurs, hardware capacitors delay the device's shutdown briefly. During this period, the device sends a Dying Gasp message to the configured OAM link, syslog server, or SNMP notification recipient.

Requirements

  • Omada Campus Switches

Configuration

As mentioned in the introduction, when the unexpected power loss happens, the Dying Gasp message could be sent via three methods:

1. Send Dying Gasp notification through the configured OAM link.

2. Send log to configured syslog server.

3. Send an SNMP Trap message to the configured SNMP trap receiver.

The following section will describe how to configure Dying Gasp to send messages via these three methods and display the results of receiving the messages.

Configuration for sending the Dying Gasp message via the OAM link

The OAM link is for sending monitoring information between network devices supporting OAM. Here, I will take another Omada switch as the peer device. To configure Dying Gasp to send messages through the OAM link, we need to create a VLAN for the OAM link, add the port connecting to another switch tagged into this VLAN, and enable OAM on this port. The same procedure needs to be performed on the peer switch, too. Finally, allow a dying gasp and set the sending method as OAM and designate the OAM VLAN you created.

Step 1. Create a VLAN for the OAM link. For example, I will create VLAN 2 for OAM usage. After entering the global config view in CLI, use the following commands:

vlan 2

exit

This will create VLAN 2 and return to the global config view.

Step 2. Add the port connecting to the peer OAM device to the newly created VLAN and enable OAM on this port. For example, I will add port 5, a gigabit port, to VLAN 2, which we have just created, and then enable OAM on port 5. Commands as follows:

interface gigabitEthernet 1/0/5
switchport general allowed vlan 2 tagged
ethernet-oam
exit

Please enter the command based on the actual port number and speed. On the peer OAM device, perform the same config.

Step 3. Enable Dying Gasp with OAM link as the message sending method. Command as follows:

dying-gasp enable oam vlan 2

This will specify sending a dying gasp message through OAM, and the VLAN ID is 2.

Here, we have completed the configuration for sending Dying Gasp messages through OAM. In conclusion, the commands are:

interface gigabitEthernet 1/0/5
switchport general allowed vlan 2 tagged
ethernet-oam
exit
dying-gasp enable oam vlan 2

Configuration for sending Dying Gasp message to syslog server

A syslog server is typically used to receive logs remotely. After configuring the syslog server address on the switch, we can enable sending a Dying Gasp message to the syslog server and receive it remotely.

Step 1. Set syslog server address on the switch; this will tell the switch where to send the logs, including the Dying Gasp message. The address of the syslog server must be reachable from the switch’s interface. For the log severity, as the message level of Dying Gasp is level 1, the severity level you set must not be smaller than 1. For example, I will set the syslog server address to 192.168.0.104 and the log severity to 6. Command as follows:

logging host index 1 192.168.0.104 6

On the Omada switch, a maximum of four syslog servers can be configured simultaneously, as indicated by the number after “index”, ranging from 1 to 4. Configure the index number, IP address, and log severity based on your actual network settings and needs.

Step 2. Enable dying gasp with the sending method as syslog server. Command as follows:

dying-gasp enable syslog

We have completed the configuration for Dying Gasp to send messages through the syslog server. In conclusion, the commands are as follows:

logging host index 1 192.168.0.104 6
dying-gasp enable syslog

Configuration for sending Dying Gasp message via SNMP Trap

SNMP Trap is commonly used to receive important notifications. After enabling the SNMP service and setting up the SNMP user and trap configuration, a dying gasp message can also be sent via SNMP trap and recorded on the SNMP Trap receiver or similar software.

Step 1. Enable the SNMP server, set up users, and configure traps. For example, here I set the user community name as “Omada”, SNMP Trap destination, which is the location of the PC running SNMP Trap receiver software is 192.168.0.4, by default, the SNMP Trap message will be sent to port 162 and the SNMP Trap receiver software will also listen on port 162 by default. Command as follows:

snmp-server
snmp-server community "Omada" read-only "viewDefault"
snmp-server host 192.168.0.104 162 "Omada" smode v2c slev noAuthNoPriv type trap

Setting the user privilege to read-only or read-write won't affect the switch sending the Dying Gasp message. Additionally, for the trap’s smode, you can configure it as either v1 or v2c.

Step 2. Enable dying gasp with the sending method as SNMP Trap. Command as follows:

dying-gasp enable snmp

We have completed the configuration for sending messages through SNMP Trap for Dying Gasp. In conclusion, the commands are as follows:

snmp-server
snmp-server community "Omada" read-only "viewDefault"
snmp-server host 192.168.0.104 162 "Omada" smode v2c slev noAuthNoPriv type trap
dying-gasp enable snmp

Verification

After finishing the configuration on the switch, let’s check how the Dying Gasp message will be sent through these three ways.

For sending through OAM link, go to the peer switch configured with OAM, enter the CLI, unplug the Dying Gasp switch’s power to emulate an unexpected power outage, you should be able to see the log printed on the screen, saying “Detected remote Dying Gasp on port xx”, this will also be recorded to the logging buffer, you could also check the events received through OAM on the port, take port 5, which is a 2.5G port as example, the command is:

show ethernet-oam event-log interface two-gigabitEthernet 1/0/5

Alt text: Show the content of the switch terminal and the logs recorded in the switch logging buffer

Alt text: Show the events received on the port with OAM configured.

After configuring, the syslog server IP address is set on the switch, typically the PC running the syslog server. On the PC, start the syslog server. Then, unplug the Dying Gasp switch’s power to emulate an unexpected power outage. You should be able to see the log recorded on the server.

Alt text: Show the logs recorded on the syslog server, including the Dying Gasp message.

After configuring, the SNMP Trap receiver software's IP address is set on the switch, typically the PC running the software. On the PC, start the software, and it should automatically begin to listen on port 162. Unplug the Dying Gasp switch’s power to emulate an unexpected power outage, and you should be able to see the trap message received.

Alt text: Show the SNMP Trap messages received on the software, including the Dying Gasp message

Conclusion

We have now completed the introduction on configuring Dying Gasp on the switch and sending messages through three different methods. The verification section also provides examples of the messages.

Get to know more details of each function and configuration please go to Download Center to download the manual of your product.

QA

Q1: Can I set Dying Gasp to send a message via multiple methods at the same time?

A1: Yes, you can enable the three Dying Gasp message sending methods simultaneously. Once enabled, you will receive the messages in the corresponding place.

이 문서를 평가해 주세요

관련 문서