Interface TX Power should allow negative values #11006

Closed
opened 2025-12-29 21:39:04 +01:00 by adam · 7 comments
Owner

Originally created by @yzguy on GitHub (Apr 10, 2025).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.2.6

Feature type

Data model extension

Proposed functionality

Update the validations for Interface TX Power to allow negative values

Use case

We run 400G ZR optics in our devices and in some cases we need to lower the transmit power to a negative because it goes through an amplifier or the path is short enough

Database changes

Possible database validation change

External dependencies

No response

Originally created by @yzguy on GitHub (Apr 10, 2025). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.2.6 ### Feature type Data model extension ### Proposed functionality [Update the validations](https://github.com/netbox-community/netbox/commit/a173083e5bc0997098d513811c9283988e82a210) for Interface TX Power to allow negative values ### Use case We run 400G ZR optics in our devices and in some cases we need to lower the transmit power to a negative because it goes through an amplifier or the path is short enough ### Database changes Possible database validation change ### External dependencies _No response_
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:39:04 +01:00
adam closed this issue 2025-12-29 21:39:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 10, 2025):

Forgive my ignorance but it's been a while since I worked with optics. How can transmit power be less than zero? I'm guessing you're referring to a deduction from a default power level. Can you provide a real-world example?

Edit: Decibels are a thing. 🤦

@jeremystretch commented on GitHub (Apr 10, 2025): Forgive my ignorance but it's been a while since I worked with optics. How can transmit power be less than zero? I'm guessing you're referring to a deduction from a default power level. Can you provide a real-world example? Edit: Decibels are a thing. 🤦
Author
Owner

@sleepinggenius2 commented on GitHub (Apr 10, 2025):

In NetBox, the transmit power is specified to be in units of dBm. The reference power level is 1 mW, so a negative dBm value just means that it it transmitting below 1 mW, i.e. -10 dBm is 0.1 mW, -20 dBm is 0.01 mW, etc. For long reach optics, you will typically see positive values, but for short reach optics or short distances, you will often see negative values. Looking at a link for one of our customers, it is a 10GBASE-LR optic currently running at -2.1 dBm to get from our PoP to the customer's site ~2.5 miles away.

Name : Te0/2
Administrative Speed: 10000
Administrative Duplex: full 
Administrative Auto-MDIX: on
Administrative Power Inline: N/A
Operational Speed: 10000
Operational Duplex: full 
Operational Auto-MDIX: on
Media Type: SFP-10G-LR

                                           Optical   Optical
           Temperature  Voltage  Current   Tx Power  Rx Power
Port       (Celsius)    (Volts)  (mA)      (dBm)     (dBm)
---------  -----------  -------  --------  --------  --------
Te0/2        33.2       3.17      34.7      -2.1      -5.8
@sleepinggenius2 commented on GitHub (Apr 10, 2025): In NetBox, the transmit power is specified to be in units of dBm. The reference power level is 1 mW, so a negative dBm value just means that it it transmitting below 1 mW, i.e. -10 dBm is 0.1 mW, -20 dBm is 0.01 mW, etc. For long reach optics, you will typically see positive values, but for short reach optics or short distances, you will often see negative values. Looking at a link for one of our customers, it is a 10GBASE-LR optic currently running at -2.1 dBm to get from our PoP to the customer's site ~2.5 miles away. ``` Name : Te0/2 Administrative Speed: 10000 Administrative Duplex: full Administrative Auto-MDIX: on Administrative Power Inline: N/A Operational Speed: 10000 Operational Duplex: full Operational Auto-MDIX: on Media Type: SFP-10G-LR Optical Optical Temperature Voltage Current Tx Power Rx Power Port (Celsius) (Volts) (mA) (dBm) (dBm) --------- ----------- ------- -------- -------- -------- Te0/2 33.2 3.17 34.7 -2.1 -5.8 ```
Author
Owner

@bctiemann commented on GitHub (Apr 10, 2025):

Ah, OK. That seems pretty reasonable then.

@bctiemann commented on GitHub (Apr 10, 2025): Ah, OK. That seems pretty reasonable then.
Author
Owner

@yzguy commented on GitHub (Apr 12, 2025):

Just more info about our use case, we are running 400G ZR optics (QSFP56-DD-400G-ZR-M-HP) in Juniper PTXs, and originally we had them going through just a Passive Mux and turned up their tx-power to max (+1dBm) but the loss was too much, so we moved to using an amplifier. We have to turn down the tx-power in this case because 0-1dBm is too much.

The use of tunable optics is increasing throughout the industry so this would be great.

> show configuration interfaces et-0/2/0
speed 400g;
mtu 9216;
optics-options {
    wavelength 1561.42;
    tx-power -6;
}

It would be cool to be able to specify a wavelength for an interface too, the "wireless" section has one, but not one for the non-wireless section. I considered using the wireless section but it felt a little dirty :P

@yzguy commented on GitHub (Apr 12, 2025): Just more info about our use case, we are running 400G ZR optics (QSFP56-DD-400G-ZR-M-HP) in Juniper PTXs, and originally we had them going through just a Passive Mux and turned up their tx-power to max (+1dBm) but the loss was too much, so we moved to using an amplifier. We have to turn down the tx-power in this case because 0-1dBm is too much. The use of tunable optics is increasing throughout the industry so this would be great. ``` > show configuration interfaces et-0/2/0 speed 400g; mtu 9216; optics-options { wavelength 1561.42; tx-power -6; } ``` It would be cool to be able to specify a wavelength for an interface too, the "wireless" section has one, but not one for the non-wireless section. I considered using the wireless section but it felt a little dirty :P
Author
Owner

@ross-cello commented on GitHub (Apr 17, 2025):

To complicate matters, optics like 100G LR4's express more than one channel.

         Parameter                 High Alarm  Low Alarm  High Warning  Low Warning
         ------------------------  ----------  ---------  ------------  -----------
         Rx Power Threshold(dBm)          7.4      -14.5           4.5        -10.5
         Tx Power Threshold(dBm)          7.4       -8.3           4.5         -4.3
         LBC Threshold(mA)              55.00      25.00         50.00        30.00
         Temp. Threshold(celsius)       75.00      -5.00         70.00         0.00
         Voltage Threshold(volt)         3.63       2.97          3.46         3.13

         Polarization parameters not supported by optics

         Lane  Laser Bias    TX Power    RX Power  Output Frequency
         ----  ----------  ----------  ----------  ----------------
           0     37.8 mA    2.30 dBm    1.49 dBm       N/A
           1     38.5 mA    1.89 dBm    1.37 dBm       N/A
           2     38.1 mA    2.14 dBm    1.23 dBm       N/A
           3     38.4 mA    2.35 dBm    1.55 dBm       N/A

I'd be happy for negative values though. We can add least record the lesser values.

From memory, I believe -40dBm is universally recognised as No Signal. You'd likely observe on a disabled interface.
Might be expressed as Inifinity on some vendors.

         Lane  Laser Bias    TX Power    RX Power  Output Frequency
         ----  ----------  ----------  ----------  ----------------
           0      0.0 mA  -40.00 dBm    0.10 dBm       N/A
           1      0.0 mA  -40.00 dBm    0.50 dBm       N/A
           2      0.0 mA  -40.00 dBm   -0.06 dBm       N/A
           3      0.0 mA  -40.00 dBm    0.58 dBm       N/A

Though IIRC DWDM signals can comfortably hit -30dBm without issues.

@ross-cello commented on GitHub (Apr 17, 2025): To complicate matters, optics like 100G LR4's express more than one channel. ``` Parameter High Alarm Low Alarm High Warning Low Warning ------------------------ ---------- --------- ------------ ----------- Rx Power Threshold(dBm) 7.4 -14.5 4.5 -10.5 Tx Power Threshold(dBm) 7.4 -8.3 4.5 -4.3 LBC Threshold(mA) 55.00 25.00 50.00 30.00 Temp. Threshold(celsius) 75.00 -5.00 70.00 0.00 Voltage Threshold(volt) 3.63 2.97 3.46 3.13 Polarization parameters not supported by optics Lane Laser Bias TX Power RX Power Output Frequency ---- ---------- ---------- ---------- ---------------- 0 37.8 mA 2.30 dBm 1.49 dBm N/A 1 38.5 mA 1.89 dBm 1.37 dBm N/A 2 38.1 mA 2.14 dBm 1.23 dBm N/A 3 38.4 mA 2.35 dBm 1.55 dBm N/A ``` **I'd be happy for negative values though. We can add least record the lesser values.** From memory, I believe -40dBm is universally recognised as No Signal. You'd likely observe on a disabled interface. Might be expressed as Inifinity on some vendors. ``` Lane Laser Bias TX Power RX Power Output Frequency ---- ---------- ---------- ---------- ---------------- 0 0.0 mA -40.00 dBm 0.10 dBm N/A 1 0.0 mA -40.00 dBm 0.50 dBm N/A 2 0.0 mA -40.00 dBm -0.06 dBm N/A 3 0.0 mA -40.00 dBm 0.58 dBm N/A ``` Though IIRC DWDM signals can comfortably hit -30dBm without issues.
Author
Owner

@yzguy commented on GitHub (Apr 17, 2025):

@ross-cello What would be the use-case/value of recording the TX power of a non-tunable optic in NetBox?

I just opened #19226 to address this

@yzguy commented on GitHub (Apr 17, 2025): @ross-cello What would be the use-case/value of recording the TX power of a non-tunable optic in NetBox? I just opened #19226 to address this
Author
Owner

@ross-cello commented on GitHub (Apr 22, 2025):

We don't have a strong use case. Would like to use to record initial values as a point-of-reference for degradation over time.
Either that, or just another field to sync from our NMS alongside the other interface attributes.

Wouldn't really treat it any different from duplex, which is basically implied at this stage.

@ross-cello commented on GitHub (Apr 22, 2025): We don't have a strong use case. Would like to use to record initial values as a point-of-reference for degradation over time. Either that, or just another field to sync from our NMS alongside the other interface attributes. Wouldn't really treat it any different from duplex, which is basically implied at this stage.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11006