Skip to content
New issue

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

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

Already on GitHub? # to your account

Cisco NXOS show ip arp detail "+ - Adjacencies synced via CFSoE" #1923

Closed
icarus747 opened this issue Dec 4, 2024 · 4 comments
Closed

Cisco NXOS show ip arp detail "+ - Adjacencies synced via CFSoE" #1923

icarus747 opened this issue Dec 4, 2024 · 4 comments

Comments

@icarus747
Copy link
Contributor

icarus747 commented Dec 4, 2024

ISSUE TYPE
  • Template Issue with error and raw data
TEMPLATE USING
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+)
Value AGE (\S+)
Value MAC_ADDRESS (\S+)
Value INTERFACE (\S+)
Value PHYSICAL_INTERFACE (\S+)


Start
  #Ignore junk
  ^.+\s-\sAdjacencies\s
  ^\s*IP\sARP\sTable\s
  ^\s*Total\snumber\sof\sentries:
  ^\s*Address\s+Age\s+MAC\s+Address\s+Interface\s+Physical\sInterface\s*$$ -> Data
  ^. -> Error

Data
  ^${IP_ADDRESS}\s+${AGE}\s+${MAC_ADDRESS}\s+${INTERFACE}\s+${PHYSICAL_INTERFACE}\s*$$ -> Record
  ^. -> Error
SAMPLE COMMAND OUTPUT
# show ip arp detail 
Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean

IP ARP Table for context default
Total number of entries: 1725
Address         Age       MAC Address     Interface        Physical Interface
10.10.10.194   00:03:10  aaaa.bbbb.cccc  Ethernet1/9      Ethernet1/9     
10.10.10.190   00:03:18  aaaa.bbbb.cccc  Ethernet2/9      Ethernet2/9     
10.10.10.81    00:02:14  aaaa.bbbb.cccc  Ethernet2/12     Ethernet2/12    
192.168.1.1     00:02:06  aaaa.bbbb.cccc  Ethernet7/47     Ethernet7/47    
10.10.11.2      00:03:12  aaaa.bbbb.cccc  Vlan11           port-channel1   
10.10.11.20     00:00:18  aaaa.bbbb.cccc  Vlan11           port-channel3    +
10.10.11.21     00:00:06  aaaa.bbbb.cccc  Vlan11           port-channel3   


SUMMARY

When arp table contains an entry with a + symbol at the end of the line the template will error out.

STEPS TO REPRODUCE

Run show ip arp detail on an nexus 7710

EXPECTED RESULTS

Same as normal behavior but without the error.

ACTUAL RESULTS
  File "...\venv\lib\site-packages\textfsm\parser.py", line 1024, in _Operations
    raise TextFSMError('State Error raised. Rule Line: %s. Input Line: %s'
textfsm.parser.TextFSMError: State Error raised. Rule Line: 17. Input Line: 10.10.11.20     00:00:25  aaaa.bbbb.cccc Vlan11           port-channel3    + 
WORKAROUND

I modified the data output to make the + optional after "PHYSICAL_INTERFACE." Could incorporate the additional flags to be ignored.

Data
  ^${IP_ADDRESS}\s+${AGE}\s+${MAC_ADDRESS}\s+${INTERFACE}\s+${PHYSICAL_INTERFACE}(?:\s+\+)?\s*$$ -> Record
  ^. -> Error
@mjbear
Copy link
Contributor

mjbear commented Dec 5, 2024

WORKAROUND

I modified the data output to make the + optional after "PHYSICAL_INTERFACE." Could incorporate the additional flags to be ignored.

Data
  ^${IP_ADDRESS}\s+${AGE}\s+${MAC_ADDRESS}\s+${INTERFACE}\s+${PHYSICAL_INTERFACE}(?:\s+\+)?\s*$$ -> Record
  ^. -> Error

@icarus747
Are you interested in working up a pull request (PR) to submit these changes to the project?

@icarus747
Copy link
Contributor Author

@mjbear
Yes I can get started on that.

@mjbear
Copy link
Contributor

mjbear commented Dec 6, 2024

@mjbear Yes I can get started on that.

@icarus747
Great.
I'd be glad to review it.
Please drop me a note here when you have the PR ready for review. Thank you!

@icarus747
Copy link
Contributor Author

@mjbear

Here you go! #1928
Let me know if I need to change anything. First time doing a pull request this way!

jmcgill298 pushed a commit that referenced this issue Dec 6, 2024
Co-authored-by: Kyle Phillipson <phillik747@gmail.com>
Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants