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

cisco_nxos_show_ip_bgp output misaligns for next-hop length >= 14 characters and no metric #1320

Open
chuckysap opened this issue Mar 13, 2023 · 2 comments

Comments

@chuckysap
Copy link

chuckysap commented Mar 13, 2023

ISSUE TYPE
  • Template Issue with error and raw data
TEMPLATE USING
Value STATUS ([bceEisS*>#?])
Value PATH_SELECTION ([bceEisS*>#? ])
Value ROUTE_SOURCE ([bceEisS*>#? ])
Value NETWORK (\S+)
Value NEXT_HOP (\S+)
Value METRIC (\S+)
Value LOCAL_PREF (\S+)
Value WEIGHT (\S+)
Value AS_PATH (.*?)
Value ORIGIN ([ie\?])

Start
  # Since using mostly position, play it safe and ensure we see header first
  ^AS Path Attributes.+ -> Bgp_table

Bgp_table
  # Example:
  # *     0.0.0.0/0           100.100.10.226   0       350     0       65000 65000 65000 64810 64800 i
  ^\s${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}\s+${NETWORK}\s+${NEXT_HOP}\s+${METRIC}\s+${LOCAL_PREF}\s+${WEIGHT}\s+${AS_PATH}\s+${ORIGIN}$$ -> Record

EOF
SAMPLE COMMAND OUTPUT

SUMMARY

Bug in show ip bgp textfsm template under very specific conditions (listed below).

BGP table entry that has a prefix with a next-hop length of more than 14 characters AND does NOT have a metric.

STEPS TO REPRODUCE
EXPECTED RESULTS
as_path: '65555 65554 65553'
local_pref: '100'
metric: ''
network: 0.0.0.0/0
next_hop: 10.255.255.254
origin: i
path_selection: ' '
route_source: l
status: ' '
weight: '0'
ACTUAL RESULTS
as_path: '65554 65553'
local_pref: '0'
metric: '100'
network: 0.0.0.0/0
next_hop: 10.255.255.254
origin: i
path_selection: ' '
route_source: l
status: ' '
weight: '65555'

@chuckysap chuckysap changed the title cisco_nxos_show_ip_bgp output misaligns for next-hop length >= 14 characters cisco_nxos_show_ip_bgp output misaligns for next-hop length >= 14 characters and no metric Mar 13, 2023
@mjbear
Copy link
Contributor

mjbear commented Jan 7, 2024

@chuckysap
I'm a community member volunteering to work on a solution for this. In order to solve for this specific condition, I need you to please provide sample output from the CLI (please include any sort of headers, but otherwise can be truncated to just the problematic BGP entry).

Thank you!

@mjbear
Copy link
Contributor

mjbear commented Feb 27, 2024

@chuckysap - Would you please provide sample output?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants