[j-nsp] How to shut down laser on any optics

Jared Mauch jared at puck.nether.net
Wed Jun 24 12:59:08 EDT 2020



> On Jun 24, 2020, at 12:51 PM, Jared Mauch <jared at puck.nether.net> wrote:
> 
> 
> 
>> On Jun 24, 2020, at 10:50 AM, Pierre Emeriaud <petrus.lt at gmail.com> wrote:
>> 
>> Howdy
>> 
>> I'm trying to shut down the laser from my optics from the junos cli in
>> order to ease troubleshooting. On MXes 240/480/960, mostly 17.4R2.
>> 
>> 'set interface ge-<foo> disable' works *sometimes* on mpc2e with an
>> sfp, or on mpc2 with xfp, but fails (laser still emits) on some other
>> mpc2 with xfp too, and didn't find it working on mpc2e and mpc7e with
>> xfp and qsfp optics.
>> 
>> I know I can use 'test xfp <xfp index> laser off' from fpc shell, but
>> not only this doesn't seem to work on anything besides xfp, it also
>> requires shell access which I can't provide to everyone needing
>> port-level privileges.
>> 
>> All juniper genuine optics, with the same P/N between working and
>> non-working ones.
>> 
>> - would you consider the 'disable' not working as (I) expected a bug?
>> - is there some other magic cli command that would achieve what i'm after?
> 
> 
> Many of the optics don’t have a way to disable the laser except via custom commands over the i2c.  Last I read the SFF MSA there wasn’t a good way to do this, and it wasn’t required.

Correction (somewhat)

It’s not required for the hardware to implement this.  There is a pin as well as bit you can set via i2c to (maybe) disable things:

- relevant part of MSA - 
8.10

Enhanced Options [Address A0h, Byte 93]

The Enhanced Options are a one byte field with 8 single bit indicators which describe the optional digital diagnostic features implemented in the transceiver. Since transceivers will not necessarily implement all optional features described in this document, this field allows the host system to determine which functions are available over the two-wire serial bus. A '1' indicates that the particular function is implemented in the transceiver. Bits 3 and 6 of byte 110 (see Table 9-11) allow the user to control the Rate_Select and TX_Disable functions. If these functions are not implemented, the bits remain readable and writable, but the transceiver ignores them.
- snip -

They would either need to have the GPIO wired for this pin on the PCBs and/or implement disable sets this bit AND the optic would need to honor it.

- Jared


More information about the juniper-nsp mailing list