Skip to content

Commit bc72bf5

Browse files
authored
Merge pull request sonic-net#300 from BRCM-SONIC/if_events
Interface Down Reason
2 parents 0608348 + ca660e3 commit bc72bf5

File tree

1 file changed

+66
-61
lines changed

1 file changed

+66
-61
lines changed

system/Interface_Down_Reason.md

+66-61
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
| 0.2 | 05/17/2021 | Madhukar K | Modified portchannel content |
6262
| 0.3 | 06/22/2021 | Prasanth K V | Added REST details and DB schema |
6363
| 0.4 | 06/28/2021 | Madhukar K | Added portchannel details |
64+
| 0.5 | 10/18/2021 | Prasanth K V | Updates to REST and CLI output |
6465

6566
# About this Manual
6667
This document provides comprehensive functional and design information about the *Interface Down Reason* feature implementation in SONiC.
@@ -102,6 +103,7 @@ So an interface flap affects the system in general and hence it is important to
102103
- Incompatible transceiver
103104
- Transceiver not present
104105
- Port breakout in-progress
106+
- Port breakout completed
105107
- High BER
106108
- PMD-CDR-lock
107109
- PMD-signal-detected
@@ -195,19 +197,15 @@ For portchannels, a new field, reason, is been added to LAG_TABLE:
195197
}
196198
```
197199

198-
A new table is added for keeping track of the events IF_REASON_EVENT:
200+
A new table IF_REASON_EVENT is added for keeping track of the events IF_REASON_EVENT:
199201
```
200-
"IF_REASON_EVENT": {
201-
"Ethernet40": {
202-
"reason": "OPER_UP",
203-
"event": "PHY_link_up",
204-
"timestamp": "2021-06-06 09:29:55.639018"
205-
}
206-
"PortChannel20": {
207-
"reason": "OPER_UP",
208-
"event": "Portchannel_up",
209-
"timestamp": "2021-06-20 15:39:45.439412"
210-
}
202+
"IF_REASON_EVENT:Ethernet64:xcvr-status-up": {
203+
"timestamp":"2021-06-18.10:08:13.948691",
204+
"reason":"ERR_DISABLED"
205+
}
206+
"IF_REASON_EVENT:PortChannel20:portchannel-up": {
207+
"timestamp":"2021-06-20 15:39:45.439412",
208+
"reason":"OPER_UP"
211209
}
212210
```
213211
### 3.2.3 STATE DB
@@ -242,19 +240,19 @@ Only existing show command outputs are updated.
242240
#### Physical interface
243241
- *show interface status*
244242
A new column, "Reason", is been added in this command output. The high level reasons are
245-
Admin-down
246-
Err-disabled
247-
Phy-link-down
248-
Link-up
243+
admin-down
244+
err-disabled
245+
phy-link-down
246+
oper-up
249247
```
250248
sonic# show interface status
251249
----------------------------------------------------------------------------------
252-
Name Description Oper Reason Speed MTU Alternate Name
250+
Name Description Oper Reason AutoNeg Speed MTU Alternate Name
253251
----------------------------------------------------------------------------------
254-
Eth1/1 - Down Admin-down 100000 9100 Ethernet0
255-
Eth1/2/1 - Down Err-disabled 10000 9100 Ethernet4
256-
Eth1/2/2 - Down PHY-link-down 10000 9100 Ethernet5
257-
Eth1/2/3 - Up Link-up 10000 9100 Ethernet6
252+
Eth1/1 - down admin-down off 100000 9100 Ethernet0
253+
Eth1/2/1 - down err-disabled off 10000 9100 Ethernet4
254+
Eth1/2/2 - down phy-link-down off 10000 9100 Ethernet5
255+
Eth1/2/3 - up oper-up off 10000 9100 Ethernet6
258256
```
259257
- *show interface status <reason>*
260258
There is an option to list the interfaces with the specified reason. The output will have more details like related events with timestamp of occurrence.
@@ -264,21 +262,25 @@ sonic# show interface status err-disabled
264262
----------------------------------------------------------------------------------
265263
Name Event Timestamp
266264
----------------------------------------------------------------------------------
267-
Eth1/2/1 STP-err-disabled 2021-04-16 10:23:29
265+
Eth1/2/1 stp-status-up 2021-04-16 10:23:29
268266
```
269267
- *show interface <interface>*
270268
show interface command to display the down reasons as shown in the below example:
271269
```
272270
sonic# show interface Eth 1/2/2
273-
Eth1/2/2 is up, line protocol is down, reason PHY-link-down
274-
Remote-fault at 2021-01-06 07:49:45.737024
275-
Local-fault at 2021-01-06 07:49:45.737024
271+
Eth1/2/2 is up, line protocol is down, reason phy-link-down
276272
Hardware is Eth
277273
Mode of IPV4 address assignment: not-set
278274
Mode of IPV6 address assignment: not-set
279275
Interface IPv6 oper status: Disabled
280276
IP MTU 9100 bytes
281277
LineSpeed 100GB, Auto-negotiation off
278+
Events:
279+
port-breakout-inprogress at 2021-06-19.06:56:47.199816
280+
admin-down at 2021-06-19.06:56:47.269480
281+
initialized at 2021-06-19.06:56:48.730481
282+
port-breakout-completed at 2021-06-19.06:56:50.871198
283+
xcvr-status-up at 2021-06-19.06:56:59.084914
282284
Last clearing of "show interface" counters: never
283285
10 seconds input rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
284286
10 seconds output rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
@@ -293,26 +295,29 @@ Output statistics:
293295
```
294296

295297
The list of events:
296-
Admin-down
297-
Remote-fault
298-
Local-fault
299-
Link-training-failed
300-
Link-training-not-completed
301-
Link-training-not-started
302-
Link-tuning-failed
303-
Link-tuning-not-started
304-
Link-tuning-not-completed
305-
Incompatible-transceiver
306-
Transceiver-not-present
307-
Port-breakout-in-progress
308-
High-BER
309-
PMD-CDR-lock
310-
PMD-signal-detected
311-
STP-err-disabled
312-
Transceiver-err-disabled
313-
UDLD-err-disabled
314-
Link-flap-err-disabled
315-
PHY-link-up
298+
admin-down
299+
remote-fault
300+
local-fault
301+
link-training-failed
302+
link-training-not-completed
303+
link-training-not-started
304+
link-tuning-failed
305+
link-tuning-not-started
306+
link-tuning-not-completed
307+
incompatible-transceiver
308+
transceiver-not-present
309+
port-breakout-in-progress
310+
port-breakout-completed
311+
high-ber
312+
pmd-cdr-lock
313+
pmd-signal-detected
314+
stp-status-down
315+
stp-status-up
316+
xcvr-status-down
317+
xcvr-status-up
318+
udld-status-down
319+
udld-status-up
320+
phy-link-up
316321

317322

318323
#### Port channel interface
@@ -326,18 +331,18 @@ LACP-fail
326331

327332
```
328333
sonic# show interface status
329-
Name Description Oper Reason Speed MTU Alternate Name
334+
Name Description Oper Reason AutoNeg Speed MTU Alternate Name
330335
----------------------------------------------------------------------------------
331-
Eth1/1 - Down Admin-down 100000 9100 Ethernet0
332-
Eth1/2/1 - Down Err-disabled 10000 9100 Ethernet4
333-
Eth1/2/2 - Down Phy-link-down 10000 9100 Ethernet5
334-
Eth1/2/3 - Up Link-up 10000 9100 Ethernet6
335-
PortChannel1 - Down Admin-down 20000 9100 -
336-
PortChannel3 - Down Min-links 30000 9100 -
337-
PortChannel5 - Down Err-disabled 30000 9100 -
338-
PortChannel7 - Down All-links-down 40000 9100 -
339-
PortChannel8 - Down LACP-fail 40000 9100 -
340-
PortChannel9 - Up Up 10000 9100 -
336+
Eth1/1 - down admin-down off 100000 9100 Ethernet0
337+
Eth1/2/1 - down err-disabled off 10000 9100 Ethernet4
338+
Eth1/2/2 - down phy-link-down off 10000 9100 Ethernet5
339+
Eth1/2/3 - up oper-up off 10000 9100 Ethernet6
340+
PortChannel1 - down admin-down - 20000 9100 -
341+
PortChannel3 - down min-links - 30000 9100 -
342+
PortChannel5 - down err-disabled - 30000 9100 -
343+
PortChannel7 - down all-links-down - 40000 9100 -
344+
PortChannel8 - down lacp-fail - 40000 9100 -
345+
PortChannel9 - up oper-up - 10000 9100 -
341346
```
342347

343348
- *show interface PortChannel [id]*
@@ -384,17 +389,17 @@ Example response data:
384389
}
385390

386391

387-
GET /restconf/data/openconfig-interfaces:interfaces/interface={name}/openconfig-if-ethernet:ethernet/state/openconfig-interfaces-ext:reason-events
392+
GET /restconf/data/openconfig-interfaces:interfaces/interface={name}/openconfig-if-ethernet:ethernet/openconfig-interfaces-ext:reason-events
388393

389394
Example response data:
390395
```
391396
{
392397
"openconfig-interfaces-ext:reason-events": {
393-
"down-reason-event": [
398+
"reason-event": [
394399
{
395400
"reason-event": {
396401
"reason": "OPER_UP",
397-
"event": "PHY-link-up",
402+
"event": "phy-link-up",
398403
"timestamp": "2021-06-06 09:29:55.639018"
399404
}
400405
}
@@ -407,11 +412,11 @@ Example response data for link down scenario:
407412
```
408413
{
409414
"openconfig-interfaces-ext:reason-events": {
410-
"down-reason-event": [
415+
"reason-event": [
411416
{
412417
"reason-event": {
413418
"reason": "PHY_LINK_DOWN",
414-
"event": "Remote-fault",
419+
"event": "remote-fault",
415420
"timestamp": "2021-06-07 04:17:13.456626"
416421
}
417422
}

0 commit comments

Comments
 (0)