Port stuck in L-port mode

So now and then you run into this issue where, no matter which configuration you try, a switch port always shows:

  86   10    6   3a5600   id    N8       Online      FC  L-Port  1 public

Even though all settings seem to be OK, fillwords are correct, HBA or array settings are the same as others, no port-errors are seen from a switch perspective but this port will not come up as an F-port.

The issue is most often a timing problem. During link-initialisation the first thing that happens is speed negotiation. That follows a certain stepping model after which it has determined both ports can use the highest mutual speed. You will see this in a portlogdump like this:

05:05:17.379 SPEE       sn      167   WS  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NM  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NF  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NC  00000004,00000000,00000000  ,

The first octed in the NC (Negotiate Connect) line shows the mutual achieved speed on which both ports can sync. (In this case 4G)

After that the ports will need to establish the protocol they want to talk. Normally a switch-port starts of as a U-port (Universal Port) which means it can become an L-port, F-port or E-port, and starts the so called LIP (Loop Initialisation Protocol). As soon that completes it will move into G-port mode and will then try and determine if it can switch to either E-port or F-port mode. The switch-port therefore sends a primitive signal called OLS for a period of 5ms and waits for the remote device to respond with a LR (Link Reset) after which the switchport responds with an LRR (Link Reset Received). This concludes the normal link initialisation from a switch perspective and it now depends on the remote device which determines what kind of port mode the switchport will turn into. The frame that is received next is either a FC-SW ELP (Exchange Link Parameters) or a FLOGI (Fabric Login). based on these the port knows its a E-port or and F-port and can act accordingly. If there is no response at all the port will wait for a certain time-out value before it determines the link has failed and is not able to connect in either F-port or E-port mode and thus remains in L-port status (as the U and G status are simply interim statuses and thus not used for port-status display.)

In the next two examples you can see that a port (161 in this case) remains in an L-port status because the link negotiation times out:

11:58:26.987 LOOP       loopscn 161  LIP  8002                                             - Start loop after gaining sync 
11:58:26.989 LOOP       loopscn 161  LIP  f7f7                                             - The loop port in the initializing state is requesting loop initialization but does not currently have a valid AL_PA 
11:58:26.990 LOOP       loopscn 161  LIM  0                                                - LISM completed, FL_Port became the loop master. 
11:58:26.990 PORT       Tx3     161   12  22000000,00000000,ffffffff,11010000              - LISM - Loop Initialisation Select Master 
11:58:26.990 PORT       Rx3     161   12  22000000,00000000,ffffffff,11010000,
11:58:26.990 PORT       Tx3     161   20  22000000,00000000,ffffffff,11020000              - LIFA - Loop Initialisation Fabric Address 
11:58:26.990 PORT       Rx3     161   20  22000000,00000000,ffffffff,11020000,
11:58:26.990 PORT       Tx3     161   20  22000000,00000000,ffffffff,11030000              - LIPA - Loop Initialisation Previous Address 
11:58:26.990 PORT       Rx3     161   20  22000000,00000000,ffffffff,11030000,
11:58:26.990 PORT       Tx3     161   20  22000000,00000000,ffffffff,11040000              - LIHA - Loop Initialisation Hard Address 
11:58:26.990 PORT       Rx3     161   20  22000000,00000000,ffffffff,11040000,
11:58:26.990 PORT       Tx3     161   20  22000000,00000000,ffffffff,11050100              - LISA - Loop Initialisation Soft Address 
11:58:26.990 PORT       Rx3     161   20  22000000,00000000,ffffffff,11050100,
11:58:26.990 PORT       Tx3     161  132  22000000,00000000,ffffffff,11060000              - LIRP - Loop Initialisation Report Position 
11:58:26.990 PORT       Rx3     161  132  22000000,00000000,ffffffff,11060000,
11:58:26.990 PORT       Tx3     161  132  22000000,00000000,ffffffff,11070000              - LILP - Loop Initialisation Loop Position 
11:58:26.990 PORT       Rx3     161  132  22000000,00000000,ffffffff,11070000,
11:58:26.990 INTR       pstate  161  OL1                                                   - Offline, OLS Transmitted 
11:58:27.302 INTR       pstate  161  LF2                                                   - Link failed, NOS Transmitted 
11:58:28.990 LOOP       loopscn 161  LIP  8014                                             - bloomInitRetry - not pt-to-tp capable

As you can see the time difference between the OLS (OL1 state) sent and the switch-port determining that the link has failed is 312ms. Brocade uses an artificial R_T_TOV value of 300ms for this plus a 20% margin according to specifications. (Be aware that the normal R_T_TOV “Receiver_Transmitter_TOV” is 100ms but it seems Brocade allows some significant headroom in here.)

This shows that the remote port either did not respond after the OLS primitive or the path from the switch to the device is bad which causes these primitive signals not to arrive at all in which case the device is not able to react to anything that’s arriving. Another problem can be that the array processor is simply too busy to handle these negotiations at that time causing the timeout or, and that’s pretty rare, a bug causes incorrect responses to be sent.

In the following sequence you see the correct status being walked causing a FLOGI to occur and the port switch to an F-port status:

05:05:17.379 SPEE       sn      167   WS  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NM  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NF  00000000,00000000,00000000  ,
05:05:18.019 SPEE       sn      167   NC  00000004,00000000,00000000  ,
05:05:18.019 LOOP       loopscn 167  LIP  8002                                             - Start loop after gaining sync 
05:05:18.029 LOOP       loopscn 167  LIP  f7f7                                             - The loop port in the initializing state is requesting loop initialization but does not currently have a valid AL_PA 
05:05:18.029 LOOP       loopscn 167  LIM  0                                                - LISM completed, FL_Port became the loop master. 
05:05:18.029 PORT       Tx3     167   12  22000000,00000000,ffffffff,11010000              - LISM - Loop Initialisation Select Master 
05:05:18.029 PORT       Rx3     167   12  22000000,00000000,ffffffff,11010000,
05:05:18.029 PORT       Tx3     167   20  22000000,00000000,ffffffff,11020000              - LIFA - Loop Initialisation Fabric Address 
05:05:18.029 PORT       Rx3     167   20  22000000,00000000,ffffffff,11020000,
05:05:18.029 PORT       Tx3     167   20  22000000,00000000,ffffffff,11030000              - LIPA - Loop Initialisation Previous Address 
05:05:18.029 PORT       Rx3     167   20  22000000,00000000,ffffffff,11030000,
05:05:18.029 PORT       Tx3     167   20  22000000,00000000,ffffffff,11040000              - LIHA - Loop Initialisation Hard Address 
05:05:18.029 PORT       Rx3     167   20  22000000,00000000,ffffffff,11040000,
05:05:18.029 PORT       Tx3     167   20  22000000,00000000,ffffffff,11050100              - LISA - Loop Initialisation Soft Address 
05:05:18.029 PORT       Rx3     167   20  22000000,00000000,ffffffff,11050100,
05:05:18.029 PORT       Tx3     167  132  22000000,00000000,ffffffff,11060000              - LIRP - Loop Initialisation Report Position 
05:05:18.029 PORT       Rx3     167  132  22000000,00000000,ffffffff,11060000,
05:05:18.029 PORT       Tx3     167  132  22000000,00000000,ffffffff,11070000              - LILP - Loop Initialisation Loop Position 
05:05:18.029 PORT       Rx3     167  132  22000000,00000000,ffffffff,11070000,
05:05:18.030 INTR       pstate  167  OL1                                                   - Offline, OLS Transmitted 
05:05:18.058 INTR       pstate  167   AC                                                   - Active state 
05:05:18.063 PORT       scn     167   11  00000000,00000000,00000002                       - FAB_SCN - fabric application event / LR_PORT - Link reset completed for non E_Port 
05:05:18.065 PORT       Rx3     167  116  22fffffe,00000000,0001ffff,04000000              - F_Port login - FLOGI 
05:05:18.065 PORT       scn     167    1  00000000,00000000,00000001                       - PORT_SCN - port state change / ONLINE - port is online 
05:05:18.065 PORT       scn     167   22  00000000,00000000,00000010                       - TRUNK_AREA_SCN - Trunk area state change / TA_LOGICAL_ONLINE - Trunk Area Logical port online 
05:05:18.065 PORT       scn     167    1  00000000,00000000,00000020                       - PORT_SCN - port state change / F_PORT - port is an F_PORT 
05:05:18.065 PORT       scn     167   22  00000000,00000000,00000008                       - TRUNK_AREA_SCN - Trunk area state change / TA_LOGICAL_FPORT - Trunk Area Logical F port 
05:05:18.106 PORT       Tx3     167  116  236ad600,00fffffe,0001ba89,02000000              - ELS Accept - LS_ACC 
05:05:18.106 PORT       Rx3     167  116  22fffffc,006ad600,0002ffff,03000000              - N_Port login - PLOGI  
05:05:18.107 PORT       Rx3     167    8  22fffffd,006ad600,0003ffff,62000000              - state change registration - SCR  
05:05:18.107 PORT       scn     167    2  006ad600,00000003,00000004                       - UPD_SCN - update state change / Update SCR 
05:05:18.107 PORT       scn     167    2  006ad600,00000003,00000100                       - UPD_SCN - update state change / Update Trunk Area 
05:05:18.107 PORT       Tx3     167  116  236ad600,00fffffc,0002ba8b,02000000              - ELS Accept - LS_ACC 
05:05:18.107 PORT       Tx3     167    4  236ad600,00fffffd,0003ba8c,02000000              - ELS Accept - LS_ACC 
05:05:18.125 nsd        rscn    167       fffc64 00fffc6a,1b000000,c0000000,00000000,
05:05:18.125 nsd        rscn    167       fffc65 00fffc6a,1b000000,c0000000,00000000,
05:05:18.125 nsd        rscn    167       fffc66 00fffc6a,1b000000,c0000000,00000000,
05:05:18.126 nsd        rscn    167       fffc67 00fffc6a,1b000000,c0000000,00000000,
05:05:18.127 nsd        rscn    167       fffc68 00fffc6a,1b000000,c0000000,00000000,
05:05:18.127 nsd        rscn    167       fffc69 00fffc6a,1b000000,c0000000,00000000,


In the case were the port does seem to be stuck in L-port mode make sure you do see an AC (Active) right after the OL1 entry. If you see an LF2 then either the physical side has an issue or the remote device did not respond in time.

I hope this clarified some of the symptoms you might see when connecting a device to a switch and it will not come up.

Kind regards,

Erwin van Londen

 

Print Friendly, PDF & Email

Subscribe to our newsletter to receive updates on products, services and general information around Linux, Storage and Cybersecurity.

The Cybersecurity option is an OPT-OUT selection due to the importance of the category. Modify your choice if needed.

Select list(s):

2 responses on “Port stuck in L-port mode

  1. Tuco Salamanca

    Very very useful article. Never found in Brocade a document where the initiation of a port were better explained. Thanks a lot