Viewing SDLC Status Information
Problem
You want to check the status of an SDLC device on your router.
Solution
You can get a lot of useful SDLC information simply by looking at the interface:
Router>show int serial1
Serial1 is up, line protocol is up
Hardware is HD64570
Description: Connection to three remote SDLC devices
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation SDLC, loopback not set
Router link station role: PRIMARY (DCE)
Router link station metrics:
slow-poll 30 seconds
T1 (reply time out) 3000 milliseconds
N1 (max frame size) 12016 bits
N2 (retry count) 20
poll-pause-timer 200 milliseconds
poll-limit-value 1
k (windowsize) 7
modulo 8
sdlc vmac: 4000.CCCC.00--
sdlc addr 20 state is CONNECT
cls_state is CLS_IN_SESSION
VS 0, VR 0, Remote VR 0, Current retransmit count 0
Hold queue: 0/200 IFRAMEs 5025/618
TESTs 0/0 XIDs 0/0, DMs 0/0 FRMRs 0/0
RNRs 15/2 SNRMs 0/0 DISC/RDs 0/0 REJs 0/0
Poll: clear, Poll count: 0, ready for poll, chain: 22/21
sdlc addr 21 state is CONNECT
cls_state is CLS_IN_SESSION
VS 0, VR 0, Remote VR 0, Current retransmit count 0
Hold queue: 0/200 IFRAMEs 127/15
TESTs 0/0 XIDs 0/0, DMs 0/0 FRMRs 0/0
RNRs 1/0 SNRMs 0/0 DISC/RDs 0/0 REJs 0/0
Poll: clear, Poll count: 0, ready for poll, chain: 20/22
sdlc addr 22 state is SNRMSENT
cls_state is CLS_CONNECT_RSP_PEND
VS 0, VR 0, Remote VR 0, Current retransmit count 0
Hold queue: 0/200 IFRAMEs 25/0
TESTs 0/0 XIDs 0/0, DMs 0/0 FRMRs 0/0
RNRs 0/0 SNRMs 0/0 DISC/RDs 0/0 REJs 0/0
Poll: clear, Poll count: 0, ready for poll, chain: 21/20
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 01:05:31
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 6 bits/sec, 2 packets/sec
5 minute output rate 3 bits/sec, 1 packets/sec
157210 packets input, 315708 bytes, 0 no buffer
Received 287021 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
156918 packets output, 307682 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=down CTS=up
Discussion
This recipe shows the output of a show interface command for the multidrop configuration shown in Recipe 15.6. The first thing to look at is the first line, which reports that the interface is up and line protocol is also up. In general, these values are affected by physical issues such as whether the cabling is correctly connected, clocking, and the choice of NRZ or NRZI line coding. The other thing to look at if you have trouble bringing the line up is the duplex setting of the interface. On Cisco routers, SDLC uses full duplex by default. To change this to half duplex, use the sdlc hdx command:
Router-A#(config)#interface Serial1
Router-A#(config-if)#sdlc hdx
In the output of the show interface command above, you can immediately see that there are three SDLC addresses configured, with hexadecimal addresses 20, 21, and 22. In this particular case, only the first two stations are shown in a connected state, and the third is not responding. The router is trying to contact it, so it is listed in a SNRMSENT state. This means that the router has sent a Set Normal Response Mode (SNRM) request to initialize the Physical Unit (PU). Table 15-5 shows all of the possible states for SDLC devices.
State | Description |
---|---|
CONNECT | Circuit initialization has completed successfully for this device. |
DISCONNECT | The router is not attempting to communicate with the device. |
DISCSENT | The router has sent a disconnection request to the device, but has not yet received a response. |
SNRMSEEN | The router has received a connection request from the device (the router must be secondary, and the device must be primary). |
SNRMSENT | The router has sent a connection request to the device, but has not yet received a response (the router must be primary to send a SNRM). |
THEMBUSY | The device has sent an RNR frame. |
USBUSY | The router has sent an RNR frame. |
BOTHBUSY | The router and the device are both sending RNR frames. |
XIDSENT | For PU2.1 devices, this means that the router has sent the XID to the device. |
XIDSTOP | For PU2.1 devices, the device has sent its XID to the router. |
In normal conditions, all of your devices should be in the CONNECT state, so this is a good thing to check when debugging an SDLC problem. If a device is connected, but you suspect that there is a problem with it, there is a useful EXEC command that is effectively an SDLC version of PING:
Router#sdlc test serial 1 20
SDLC Test for address C1 completed
Frames sent=10 Frames received=10
This command sends short SDLC frames out the specified interface (in this case Serial1) addressed to the desired destination address (in this case, 20). If the device is online and the circuit is configured correctly, then you should see the same number of frames received as sent. By default, it sends 10 frames. You can change the number and content of these frames, but usually this simple form is sufficient to see if there are problems reaching the device.
The most common problems with an SDLC connection are mismatched XID or SDLC addresses. Sometimes you will encounter physical problems caused by either a bad cable or electrical noise. And the other most common issues are caused by clock rate problems (either too fast or too slow for the attached devices), or an incorrect choice of NRZ or NRZI line coding. It is usually best to start with the physical layer and see if the interface is coming up at all. If the interface won't come up, or comes up but won't stay up, then look for physical problems such as these. If the interface comes up but you can't communicate with the devices, look for problems with XID values and SDLC addresses.