Skip to content

Commit

Permalink
ipv6 neighbor data gathering for junos
Browse files Browse the repository at this point in the history
Signed-off-by: Amy Liebowitz <[email protected]>
  • Loading branch information
amylieb committed Jan 27, 2025
1 parent ff56b88 commit b22197d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 17 deletions.
49 changes: 33 additions & 16 deletions suzieq/config/arpnd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,45 @@ apply:

junos-qfx:
version: all
command: show arp | display json | no-more
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
"mac-address/[0]/data: macaddr",
"ip-address/[0]/data: ipAddress",
"interface-name/[0]/data: oif",
"arp-table-entry-flags: flags",
"offload: remote?|False",
]'
command:
- command: show arp no-resolve | display json | no-more
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
"mac-address/[0]/data: macaddr",
"ip-address/[0]/data: ipAddress",
"interface-name/[0]/data: oif",
"arp-table-entry-flags: flags",
"offload: remote?|False",
]'
- command: show ipv6 neighbors | display json | no-more
normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[
"ipv6-nd-neighbor-address/[0]/data: ipAddress",
"ipv6-nd-neighbor-l2-address/[0]/data: macaddr",
"ipv6-nd-state/[0]/data: state",
"ipv6-nd-interface-name/[0]/data: oif",
]'

junos-ex:
copy: junos-qfx

junos-mx:
version: all
command: show arp no-resolve | display json | no-more
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
"mac-address/[0]/data: macaddr",
"ip-address/[0]/data: ipAddress",
"interface-name/[0]/data: oif",
"arp-table-entry-flags: flags",
"offload: remote?|False",
]'
command:
- command: show arp no-resolve | display json | no-more
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
"mac-address/[0]/data: macaddr",
"ip-address/[0]/data: ipAddress",
"interface-name/[0]/data: oif",
"arp-table-entry-flags: flags",
"offload: remote?|False",
]'
- command: show ipv6 neighbors | display json | no-more
normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[
"ipv6-nd-neighbor-address/[0]/data: ipAddress",
"ipv6-nd-neighbor-l2-address/[0]/data: macaddr",
"ipv6-nd-state/[0]/data: state",
"ipv6-nd-interface-name/[0]/data: oif",
]'


junos-es:
copy: junos-qfx
Expand Down
3 changes: 2 additions & 1 deletion suzieq/poller/worker/services/arpnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def _clean_junos_data(self, processed_data, _):
entry['remote'] = True
if entry['oif']:
entry['oif'] = re.sub(r' \[.*\]', '', entry['oif'])
entry['state'] = 'reachable'
if not entry.get('state', None):
entry['state'] = 'reachable'
if not entry.get('macaddr', None):
entry['macaddr'] = '00:00:00:00:00:00'

Expand Down

0 comments on commit b22197d

Please sign in to comment.