cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
578
Views
0
Helpful
0
Replies

How to get IP and MAC address of a device from an interface

MahdiR
Level 1
Level 1

I'm trying to get the IP and MAC address of a device that is connected to interface 0/0/7 on my ASR920 with Netconf.

I can see both the IP and the MAC address from the CLI, however the tags that are supposed to show these, are not present in the model.

 

Here is the output of CLI showing the information I need: 

ezgif.com-gif-maker.png

 

Here is the output from the logger. I'm using the native model. As you can see there are a lot of tags that are missing, I assume because there are no data in those tags. But there is clearly a device that is connected to interface 0/0/7 and it has an IP and MAC that should be retrieved.

<GigabitEthernet>
          <name>0/0/7</name>
          <description>Mahdi tester stuff</description>
          <shutdown/>
          <load-interval>30</load-interval>
          <negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
            <auto>true</auto>
          </negotiation>
          <service xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
            <instance>
              <id>10</id>
              <ethernet/>
              <ethernet-evc-name>IA-FTTH</ethernet-evc-name>
              <encapsulation>
                <dot1q>
                  <id>10</id>
                </dot1q>
              </encapsulation>
              <rewrite>
                <ingress>
                  <tag>
                    <pop>
                      <way>1</way>
                      <mode>symmetric</mode>
                    </pop>
                  </tag>
                </ingress>
              </rewrite>
              <bridge-domain>
                <bridge-id>10</bridge-id>
                <split-horizon>
                  <group>1</group>
                </split-horizon>
              </bridge-domain>
              <mac>
                <security>
                  <maximum>
                    <addresses>10</addresses>
                  </maximum>
                  <violation>restrict</violation>
                </security>
              </mac>
            </instance>
            <instance>
              <id>20</id>
              <ethernet/>
              <ethernet-evc-name>TV-FTTH</ethernet-evc-name>
              <encapsulation>
                <dot1q>
                  <id>20</id>
                </dot1q>
              </encapsulation>
              <rewrite>
                <ingress>
                  <tag>
                    <pop>
                      <way>1</way>
                      <mode>symmetric</mode>
                    </pop>
                  </tag>
                </ingress>
              </rewrite>
              <bridge-domain>
                <bridge-id>20</bridge-id>
                <split-horizon>
                  <group>2</group>
                </split-horizon>
              </bridge-domain>
              <mac>
                <security>
                  <maximum>
                    <addresses>20</addresses>
                  </maximum>
                  <violation>restrict</violation>
                </security>
              </mac>
            </instance>
            <instance>
              <id>30</id>
              <ethernet/>
              <ethernet-evc-name>MAN-FTTH</ethernet-evc-name>
              <encapsulation>
                <untagged/>
              </encapsulation>
              <bridge-domain>
                <bridge-id>30</bridge-id>
                <split-horizon>
                  <group>3</group>
                </split-horizon>
              </bridge-domain>
              <mac>
                <security>
                  <maximum>
                    <addresses>10</addresses>
                  </maximum>
                  <violation>restrict</violation>
                </security>
              </mac>
            </instance>
          </service>
          <service-policy xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-policy">
            <input>FTTH-IN-8</input>
            <output>FTTH-OUT-8</output>
          </service-policy>
        </GigabitEthernet>
0 Replies 0