Networking · · 2 min read

Soft reset an SFP on a Juniper switch (QFX and EX)

Soft reset an SFP on a Juniper switch (QFX and EX)

Intro 

When using an SFP/ SFP+ or QSFP module, you may encounter an issue where it simply doesn't work when you first plug it in, and a common next step is to remove the SFP and reinsert it physically. What if you've already left the site, or you're back at the main office or working from home?

There is a way to carry out a "Soft Reset" of an SFP which can resolve many issues, similar to physical removal and reinsertion of SFP modules.

How do we do this?

Locate the port on the switch where the SFP is plugged in and note down the port number. In this example, we will look at XE-1/0/10 on an EX4600.

xe-1/0/10       up  down **Description**

The next step requires us to work/ log into the FPC/ PFE itself. So how do we know which FPC we need to reach?

XE-1/0/10 is the port we need to soft reset, so let's look at how JUNOS interprets that port. We won't go into massive detail about how it's put together but rather skim across the top for the basics.

XE-1/0/10

Juniper Networks Cheatsheet - General Commands
We’ve put together a list and a pdf cheatsheet of the most commonly used Juniper Networks commands as a reference for all.

With these details, we can now go ahead and log into the FPC required for the soft removal of this port.

start shell pfe network fpc1
set cmqfx xcvr remove pic 0 port 10

Soft removing pic/port: 0/10!!!
[Fri DATE LOG: Info] sfp-1/0/10 SFP unplugged

You should see something similar to advise that the SFP has now been unplugged; if you have another session open to the CLI of the switch and try to do a "show interfaces xe-1/0/10", it should show that it doesn't exist or hardware is unplugged.

Let's go ahead and soft plug the SFP back in.

set cmqfx xcvr insert pic 0 port 10

Soft inserting pic/port: 0/10!!!
[Fri DATE LOG: Info] sfp-1/0/10 SFP plugged in

exit

That's it. You should now be able to "show interfaces xe-1/0/10" to find out if the port is back up, etc.

Exit to back out of the shell session into the FPC.

Other commands to help with diagnostics 

If you want to show a complete list of the SFP modules plugged in, their details and anything else, we can also run the below to acquire this information (while logged into the FPC in shell);

show sfp list

If you have any questions, let me know!

Read next

Image for our ELI5 series. This image states "ELI5 - What is MTPCP". MPTCP being Multipath TCP
ELI5 ·

What is Multipath TCP (MPTCP)?

Discover how Multipath TCP lets a single connection use multiple network paths at once, increasing speed and resilience for mobile devices, data‑centres and the future Internet.

What is SLAAC (IPv6)?
ELI5 ·

What is SLAAC (IPv6)?

Discover how SLAAC lets devices self‑assign global addresses, removes DHCP overhead, preserves end‑to‑end connectivity, and scales effortlessly for home, enterprise, and IoT networks.