cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
552
Views
2
Helpful
7
Replies

Node or interface mac address association (found from LLDP)

zo3
Level 1
Level 1

Hi! I'm getting a response from the sandbox when getting the LLDP information for a node:

```

"lldpAdjEp": {
"attributes": {
"capability": "router",
"chassisIdT": "mac",
"chassisIdV": "fa:c2:90:1d:2e:50",
"childAction": "",
"dn": "topology/pod-1/node-101/sys/lldp/inst/if-[eth1/49]/adj-1",
"enCap": "",
"id": "1",
"mgmtId": "0",
"mgmtIp": "10.0.8.65",
"mgmtPortMac": "unspecified",
"modTs": "2024-09-13T00:39:29.451+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"portDesc": "topology/pod-1/paths-201/pathep-[eth5/1]",
"portIdT": "mac",
"portIdV": "fa:c2:90:1d:2e:50",
"portVlan": "unspecified",
"stQual": "",
"status": "",
"sysDesc": "topology/pod-1/node-201",
"sysName": "SP_201",
"ttl": "120"
}
}

```

However, I do not know where to find the mac address that is being referenced for the linked node (201) anywhere. Does anyone know where this ID is coming from? I know from the docs this is supposed to be the neighbor's mac address but I cannot find the object or class that contains this information besides what I"m getting from this response. Thanks!

7 Replies 7

AshSe
VIP
VIP

The MAC address you're seeing in the LLDP information is part of the Link Layer Discovery Protocol (LLDP) data, which is used for network devices to advertise their identity and capabilities to neighbors on the same network. In your case, the LLDP data is showing information about a neighboring device connected to the node you're querying.

Here's a breakdown of the relevant fields in the LLDP information:

  1. chassisIdV: This is the MAC address of the chassis of the neighboring device. In your case, it's fa:c2:90:1d:2e:50.
  2. portIdV: This is the MAC address of the port on the neighboring device. In your case, it's also fa:c2:90:1d:2e:50.

The neighboring device is identified by the sysName field, which is SP_201, and the sysDescfield, which is topology/pod-1/node-201.

To find more information about the neighboring node (201), you would typically look at the network management system or controller that is managing your network. In the context of Cisco ACI (Application Centric Infrastructure), you would use the APIC (Application Policy Infrastructure Controller) to query details about the node.

Here’s how you can find more information about the node with ID 201:

  1. Using the APIC GUI:

    1. Log in to the APIC GUI.
    2. Navigate to Fabric > Inventory > Pod > Node.
    3. Look for the node with ID 201. You should be able to see details about this node, including its MAC address and other relevant information.
  2. Using the APIC API:

    1. You can use the APIC REST API to query details about the node. For example, you can use the following API endpoint to get information about node 201:

    Screenshot 2024-10-23 at 11.38.12 AM.png

      1. This will return details about the node, including its MAC address and other attributes.
    1. Using CLI on the Node:

      1. If you have access to the CLI of the node, you can use commands like show lldp neighbors or show interface to get detailed information about the interfaces and their MAC addresses.

    By using these methods, you should be able to find the MAC address and other details of the node with ID 201

Hey AshSe,

Thank you so much for your reply. I wasn't explicit in my original question, so my apologies! I was checking the fabricNode and information per interface as well and I cannot find the field that should match for the mac address? I don't know if this is only because I'm utilizing the sandbox instead of a real set up environment for Cisco ACI?

I was seeing in the interface information (l1PhysIf I believe?) There is a `routerMac` field but I'm not sure if there is anything per node on the `fabricNode` class level?

 

For example this is what I see from the response to my sandbox with the APIC API:

https://10.10.20.14/api/node/class/fabricNode.json

```

{
"totalCount": "4",
"imdata": [
{
"fabricNode": {
"attributes": {
"adSt": "on",
"address": "10.0.136.66",
"annotation": "",
"apicType": "apic",
"childAction": "",
"delayedHeartbeat": "no",
"dn": "topology/pod-1/node-102",
"extMngdBy": "",
"fabricSt": "active",
"id": "102",
"lastStateModTs": "2024-10-29T19:10:31.688+00:00",
"lcOwn": "local",
"modTs": "2024-10-29T19:10:31.686+00:00",
"model": "N9K-C9396PX",
"monPolDn": "uni/fabric/monfab-default",
"name": "leaf-2",
"nameAlias": "",
"nodeType": "unspecified",
"role": "leaf",
"serial": "TEP-1-102",
"status": "",
"uid": "0",
"userdom": "all",
"vendor": "Cisco Systems, Inc",
"version": "simsw-6.0(2h)"
}
}
},
{
"fabricNode": {
"attributes": {
"adSt": "on",
"address": "10.0.136.64",
"annotation": "",
"apicType": "apic",
"childAction": "",
"delayedHeartbeat": "no",
"dn": "topology/pod-1/node-101",
"extMngdBy": "",
"fabricSt": "active",
"id": "101",
"lastStateModTs": "2024-10-29T19:06:59.340+00:00",
"lcOwn": "local",
"modTs": "2024-10-29T19:08:21.655+00:00",
"model": "N9K-C9396PX",
"monPolDn": "uni/fabric/monfab-default",
"name": "leaf-1",
"nameAlias": "",
"nodeType": "unspecified",
"role": "leaf",
"serial": "TEP-1-101",
"status": "",
"uid": "0",
"userdom": "all",
"vendor": "Cisco Systems, Inc",
"version": "simsw-6.0(2h)"
}
}
},
{
"fabricNode": {
"attributes": {
"adSt": "on",
"address": "10.0.0.1",
"annotation": "",
"apicType": "apic",
"childAction": "",
"delayedHeartbeat": "no",
"dn": "topology/pod-1/node-1",
"extMngdBy": "",
"fabricSt": "unknown",
"id": "1",
"lastStateModTs": "2024-10-29T18:59:35.778+00:00",
"lcOwn": "local",
"modTs": "2024-10-29T18:59:35.776+00:00",
"model": "",
"monPolDn": "uni/fabric/monfab-default",
"name": "apic1",
"nameAlias": "",
"nodeType": "unspecified",
"role": "controller",
"serial": "TEP-1-1",
"status": "",
"uid": "0",
"userdom": "all",
"vendor": "Cisco Systems, Inc",
"version": "6.0(2h)"
}
}
},
{
"fabricNode": {
"attributes": {
"adSt": "on",
"address": "10.0.136.65",
"annotation": "",
"apicType": "apic",
"childAction": "",
"delayedHeartbeat": "no",
"dn": "topology/pod-1/node-201",
"extMngdBy": "",
"fabricSt": "active",
"id": "201",
"lastStateModTs": "2024-10-29T19:09:46.578+00:00",
"lcOwn": "local",
"modTs": "2024-10-29T19:09:46.577+00:00",
"model": "N9K-C9508",
"monPolDn": "uni/fabric/monfab-default",
"name": "spine-1",
"nameAlias": "",
"nodeType": "unspecified",
"role": "spine",
"serial": "TEP-1-103",
"status": "",
"uid": "0",
"userdom": "all",
"vendor": "Cisco Systems, Inc",
"version": "simsw-6.0(2h)"
}
}
}
]
}
```

Hey @zo3 , could you please tell me what's your question now?

Hi @AshSe , my question is, where can I find the actual mac addressed referenced in LLDP/CDP neighbors?

 

For example, Leaf101 on the sandbox right now has the physical interface eth1/49 that is LLDP neighbors with Spine-201 and it says the mac address associated with that is 2a:12:8d:9c:70:5c

If I go to Spine-201, I see that the interface eth5/1 is LLDP neighbors with Leaf-101 with mac address shown to be 9a:f0:b6:fb:cc:21 - I cannot find where these mac addresses are associated with? I don't see them related to the device or the interfaces, so do you know where these are being related and found in terms of the LLDP/CDP neighbors fields?

Hey @zo3 


@zo3 wrote:

where can I find the actual mac addressed referenced in LLDP/CDP neighbors?

For example, Leaf101 on the sandbox right now has the physical interface eth1/49 that is LLDP neighbors with Spine-201 and it says the mac address associated with that is 2a:12:8d:9c:70:5c

If I go to Spine-201, I see that the interface eth5/1 is LLDP neighbors with Leaf-101 with mac address shown to be 9a:f0:b6:fb:cc:21 - I cannot find where these mac addresses are associated with? I don't see them related to the device or the interfaces, so do you know where these are being related and found in terms of the LLDP/CDP neighbors fields?


>> To find the actual MAC addresses referenced in LLDP (Link Layer Discovery Protocol) or CDP (Cisco Discovery Protocol) neighbors, you typically need to look at the LLDP/CDP neighbor details on the device itself.

The MAC addresses you see in the LLDP/CDP neighbors output are typically the MAC addresses of the interfaces on the neighboring devices. However, these MAC addresses might not always be the same as the MAC addresses you see in the interface configurations or the MAC address table. This discrepancy can occur due to several reasons, such as:

  1. Virtual MAC Addresses: Some devices use virtual MAC addresses for LLDP/CDP advertisements, which might not match the physical MAC addresses of the interfaces.
  2. Management MAC Addresses: The MAC addresses used in LLDP/CDP might be the management MAC addresses of the devices, which can be different from the interface MAC addresses.
  3. Aggregated Links: In the case of link aggregation (LAG) or port channels, the MAC address advertised might be the MAC address of the aggregated interface rather than the individual physical interfaces.

To find the actual MAC addresses referenced in LLDP/CDP neighbors, you can follow these steps:

Step 1: Verify LLDP/CDP Neighbors on Both Devices

  1. On Leaf101:

    show lldp neighbors detail
     

    Look for the neighbor information for Spine-201, specifically the MAC address 2a:12:8d:9c:70:5c.

  2. On Spine-201:

    show lldp neighbors detail
     

    Look for the neighbor information for Leaf101, specifically the MAC address 9a:f0:b6:fb:cc:21.

Step 2: Check Interface MAC Addresses

  1. On Leaf101:

    show interface eth1/49
     

    Verify the MAC address of the interface eth1/49.

  2. On Spine-201:

    show interface eth5/1
     

    Verify the MAC address of the interface eth5/1.

Step 3: Check MAC Address Table

  1. On Leaf101:

    show mac address-table
     

    Look for the MAC address 2a:12:8d:9c:70:5c in the MAC address table.

  2. On Spine-201:

    show mac address-table
     

    Look for the MAC address 9a:f0:b6:fb:cc:21 in the MAC address table.

Step 4: Check Device Management MAC Address

  1. On Leaf101:

    show version
     

    Look for the base MAC address of the device, which might be used for LLDP/CDP.

  2. On Spine-201:

    show version
     

    Look for the base MAC address of the device, which might be used for LLDP/CDP.

Hope This Helps!!!

@AshSe super helpful !! the caveat is i wonder if this is possible to access via the APIC API (vs the CLI) at all? i.e. is there some API endpoint / object that captures this data? i have no idea how to check this from the GUI (i'm trying to utilize the API to do this programmatically vs. having to go into every device manually!)

 

thank you so much again, this is very helpful - i'll see if this commands have any direct translation from the API docs

Dear @zo3 , I am feeling blessed to know that I could be of some help to you. To answer your concern for APIC API; 

 

Using the APIC GUI to Find LLDP/CDP Neighbor Information

1. Authenticate to the APIC:

  • First, you need to authenticate to the APIC to get a token for subsequent API calls.

2. Query LLDP Neighbor Information:

  • You can query the LLDP neighbor information using the lldpAdjEp object.

3. Query CDP Neighbor Information:

  • Similarly, you can query the CDP neighbor information using the cdpAdjEp object.

 

Using the APIC GUI

If you prefer to use the APIC GUI to find the relevant API endpoints:

  1. Log in to the APIC GUI.
  2. Navigate to the "Fabric" tab.
  3. Go to "Inventory" and select "Pod".
  4. Select a "Node" > "Interfaces" > Physical Interfaces".
  5. Select an interface and look for LLDP/CDP neighbor information.

You can use the "API Inspector" tool in the APIC GUI to see the exact API calls being made when you navigate through the GUI. This can help you identify the correct endpoints and parameters to use in your scripts.

By using the APIC API, you can programmatically retrieve LLDP/CDP neighbor information for all devices in your ACI fabric, making it easier to automate network management tasks.

Hope This Helps!!!

AshSe

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License