Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENCONFIG-gNMI - gnmi_get on lldp interface displays incorrect TTL value #112

Closed
sachin-brm opened this issue Sep 12, 2019 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@sachin-brm
Copy link
Collaborator

Problem Description/Summary :

OPENCONFIG-gNMI - gnmi_get on lldp interface displays incorrect TTL value
Expected Behavior :

gnmi_get on lldp interface should display correct TTL value and it should be in sync with CLICK CLI and CLISH CLI

Topology :

DUT with lldp neighbors

Steps to Repro :

DUT should have lldp neighbors

  1. Go to telemetry docker "docker exec -it telemetry bash"
  2. Perform gNMI get operation on lldp specific interface and observe the TTL value as "19013".But in CLICK cli TTL value for that interface is "120"

root@sonic:/# gnmi_get -insecure -xpath /openconfig-lldp:lldp/interfaces/interfacce[name=Ethernet0] -target_addr 127.0.0.1:8080
== getRequest:
prefix: <

path: <
elem: <
name: "openconfig-lldp:lldp"

elem: <
name: "interfaces"

elem: <
name: "interface"
key: <
key: "name"
value: "Ethernet0"

encoding: JSON_IETF

== getResponse:
notification: <
timestamp: 1568200012627073033
prefix: <

update: <
path: <
elem: <
name: "openconfig-lldp:lldp"

elem: <
name: "interfaces"

elem: <
name: "interface"
key: <
key: "name"
value: "Ethernet0"

val: <
json_ietf_val: "{"openconfig-lldp:interface":[{"name":"Ethernet0","neighbors":{"neighbor":[{"capabilities":{"capability":[{"name":"openconfig-lldp-types:MAC_BRIDGE","state":{"enabled":true,"name":"openconfig-lldp-types:MAC_BRIDGE"}},{"name":"openconfig-lldp-types:ROUTER","state":{"enabled":true,"name":"openconfig-lldp-types:ROUTER"}}]},"id":"Ethernet0","state":{"chassis-id":"b8:6a:97:fd:c8:c6","chassis-id-type":"MAC_ADDRESS","id":"1","management-address":"10.59.142.211,2001::1","port-description":"Ethernet0","port-id":"twentyfiveGigE1:1","port-id-type":"LOCAL","system-description":"Debian GNU/Linux 9 (stretch) Linux 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2015-12-19) x86_64","system-name":"sonic","ttl":19013}}]}}]}"

root@sonic:/#

CLICK CLI output:
root@sonic:/home/admin# show lldp neighbors

LLDP neighbors:

Interface: Ethernet0, via: LLDP, RID: 1, Time: 0 day, 05:30:43
Chassis:
ChassisID: mac b8:6a:97:fd:c8:c6
SysName: sonic
SysDescr: Debian GNU/Linux 9 (stretch) Linux 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2015-12-19) x86_64
TTL: 120
MgmtIP: 10.59.142.211
MgmtIP: 2001::1
Capability: Bridge, on
Capability: Router, on
Capability: Wlan, off
Capability: Station, off
Port:
PortID: local twentyfiveGigE1:1
PortDescr: Ethernet0

CLISH CLI OUTPUT:
root@sonic:/home/admin# sonic-cli
sonic#
sonic#
sonic#
sonic# show lldp neighbor

LLDP Neighbors

Interface: Ethernet0,via: LLDP
Chassis:
ChassisID: b8:6a:97:fd:c8:c6
SysName: sonic
SysDescr: Debian GNU/Linux 9 (stretch) Linux 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2015-12-19) x86_64
TTL: 19857
Capability: MAC_BRIDGE, ON
Capability: ROUTER, ON
Port
PortID: twentyfiveGigE1:1
PortDescr: Ethernet0

Reproducibility ( Ex:- 3 out of 3 attempts ) Please also update "Reproducible" field :

3

@sachin-brm sachin-brm added the bug Something isn't working label Sep 12, 2019
@GarrickHe GarrickHe self-assigned this Sep 12, 2019
@GarrickHe
Copy link

@sachin-brm I'll take a look at this.

@GarrickHe
Copy link

GarrickHe commented Sep 12, 2019

@sachin-brm @jeff-yin - The TTL info should actually be removed from the mgmt-framework CLI and GNMI response. SONiC's AppDB doesn't save LLDP TTL for it's neighbors. What's getting displayed for TTL here is actually the time of the remote system.

admin@sonic:~$ redis-cli
127.0.0.1:6379> HGETALL "LLDP_ENTRY_TABLE:Ethernet0"
 1) "lldp_rem_chassis_id_subtype"
 2) "4"
 3) "lldp_rem_sys_name"
 4) "OS10"
 5) "lldp_rem_index"
 6) "2"
 7) "lldp_rem_port_desc"
 8) "ethernet1/1/1:1"
 9) "lldp_rem_sys_cap_supported"
10) "68 00"
11) "lldp_rem_sys_desc"
12) "Dell EMC Networking OS10 Enterprise.\r\nCopyright (c) 1999-2019 by Dell Inc. All Rights Reserved.\r\nSystem Description: OS10 Enterprise.\r\nOS Version: 10.4.9999EX.\r\nSystem Type: Z9100-ON"
13) "lldp_rem_port_id_subtype"
14) "5"
15) "lldp_rem_sys_cap_enabled"
16) "68 00"
17) "lldp_rem_chassis_id"
18) "34:17:eb:2c:d7:00"
19) "lldp_rem_port_id"
20) "ethernet1/1/1:1"
21) "lldp_rem_man_addr"
22) ""
23) "lldp_rem_time_mark"
24) "178432"    <<==== this information is getting displayed
127.0.0.1:6379>

if you look in the output, this is all information for a particular LLDP neighbor saved in appDB. We don't have TTL.

The show lldp neighbor output above is actually getting information from the Linux kernel, not SONiC's appDB.

@GarrickHe
Copy link

GarrickHe commented Sep 12, 2019

I filed a bug with SONiC to have them add TTL information to appDB:

sonic-net/sonic-dbsyncd#26

In the meantime, we can remove the TTL field from the output until the issue gets fixed.

@GarrickHe
Copy link

Filed pull-request to remove TTL field from output:

#117

Will update the code again when Azure SONiC adds the request TTL information back into appDB.

dell-engops pushed a commit that referenced this issue Jun 7, 2022
* [JIRA SONIC-59502] User name field in not applicable cases should be displayed as Not Applicable instead of empty.

Change-Id: Ie96be7eacf13a9ebe4c9e95abbd6a88f1e47533f

* [JIRA SONIC-60245] Field to display the operational value of the session timeout in the output of the show authentication clients.

Change-Id: Ieddba8ac30568d55197fe1ce172b8cc208ffdc30

* [JIRA SONIC-56405] Added support for pac configuration over range of interfaces.

Change-Id: I0ce68fc2497fcc45fcd0c15d6113542967d974c2

Co-authored-by: Sravani Maddukuri <[email protected]>
Co-authored-by: Shiva Kumar Boddula <[email protected]>
Co-authored-by: Sonic Build <[email protected]>
Co-authored-by: SONiC Syncbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants