Skip to content

[SmartSwitch][DHCPServer] show dhcp_server ipv4 lease does not show the port name for smartswitch #20155

Closed
@gpunathilell

Description

@gpunathilell

Description

The show command for the dhcp_server does not work as expected for smartswitch platform. This is because the Port is obtained for the show command from the FDB entry in STATE_DB for the corresponding dhcp_interface, but for smartswitch the the DPUs are provided with link local addresses by the switch, and hence the port information is not present in the FDB table, due to this the port is shown as unknown in the output of the show dhcp_server ipv4 lease command. The code is present here

Steps to reproduce the issue:

  1. On smartswitch platform execute the show dhcp_server ipv4 lease command

Describe the results you received:

admin@sonic:/tmp$ show dhcp_server ipv4 lease
+---------------------------+-------------------+---------------+---------------------+---------------------+
| Interface                 | MAC Address       | IP            | Lease Start         | Lease End           |
+===========================+===================+===============+=====================+=====================+
| bridge-midplane|<Unknown> | b0:cf:b0:0e:3b:f3 | 169.254.200.2 | 2024-06-14 11:14:42 | 2024-06-14 11:29:42 |

Describe the results you expected:

admin@sonic:/tmp$ show dhcp_server ipv4 lease
+---------------------------+-------------------+---------------+---------------------+---------------------+
| Interface                 | MAC Address       | IP            | Lease Start         | Lease End           |
+===========================+===================+===============+=====================+=====================+
| bridge-midplane|port_name | b0:cf:b0:0e:3b:f3 | 169.254.200.2 | 2024-06-14 11:14:42 | 2024-06-14 11:29:42 |

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

The ip -n command could be used to obtain the neighbor information and this can be used to obtain the port name

Metadata

Metadata

Labels

MSFTTriagedthis issue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions