The usage seems mandatory to get ARP from Netscreen.
For JunOS and H3C data can be obtained (and faster in my tests) via
SNMP, so it's use is commented in Default.conf, uncommented if needed.
Only tested with IPv4, may not work as is with IPv6.
Tested on:
Netscreen -> Netscreen-5400 (juniper Ns5000).
JunOS -> Juniper Networks EX4550 (JunOS).
H3C -> HP A5500
Note: For H3C to work it a phrasebook needs to be added to
Net-CLI-Interact.
In my case:
/usr/share/perl5/auto/share/dist/Net-CLI-Interact/phrasebook/h3c/pb
Contents of
/usr/share/perl5/auto/share/dist/Net-CLI-Interact/phrasebook/h3c/pb:
prompt generic
match />\s*$/
prompt privileged
match /# ?$/
prompt configure
match /(config[^)]*)# ?$/
prompt user
match /[Uu]sername: ?$/
prompt pass
match /[Pp]assword: $/
# MACROS
macro paging
send screen-length disable
match generic
macro begin_privileged
send enable
match user or pass or privileged
macro end_privileged
send disable
match generic
macro begin_configure
send configure terminal
match configure
macro end_configure
send exit
match privileged
macro disconnect
send quit
match generic
# macro completion
# send ?
# for setting up automated reloading, requires argument N (minutes)
# note: if done as send-match sequence, then the 'has been modified' part
# is mandatory - but not all ios versions have that prompt...
# the follow...with construction on the other hand works with or without
# that step.
# note all lines that are matched against prompt or follow are STRIPPED from the response.
macro reload_in
send reload in %s
# match /System configuration has been modified. Save\? [yes\/no]:/
# send no
follow /System configuration has been modified. Save\? [yes\/no]:/ with no\n
match /Proceed with reload\? [confirm]/
send ''
match privileged
# no arguments. last match is pretty much a dud, the session will be gone.
macro reload
send reload
follow /System configuration has been modified. Save\? [yes\/no]:/ with no\n
match /Proceed with reload\? [confirm]/
send ''
match privileged
The usage seems mandatory to get ARP from Netscreen. For JunOS and H3C data can be obtained (and faster in my tests) via SNMP, so it's use is commented in Default.conf, uncommented if needed. Only tested with IPv4, may not work as is with IPv6.
Tested on: Netscreen -> Netscreen-5400 (juniper Ns5000). JunOS -> Juniper Networks EX4550 (JunOS). H3C -> HP A5500
Note: For H3C to work it a phrasebook needs to be added to Net-CLI-Interact. In my case: /usr/share/perl5/auto/share/dist/Net-CLI-Interact/phrasebook/h3c/pb Contents of /usr/share/perl5/auto/share/dist/Net-CLI-Interact/phrasebook/h3c/pb: prompt generic match />\s*$/
prompt privileged match /# ?$/
prompt configure match /(config[^)]*)# ?$/
prompt user match /[Uu]sername: ?$/
prompt pass match /[Pp]assword: $/
# MACROS
macro paging send screen-length disable match generic
macro begin_privileged send enable match user or pass or privileged
macro end_privileged send disable match generic
macro begin_configure send configure terminal match configure
macro end_configure send exit match privileged
macro disconnect send quit match generic
# macro completion # send ?
# for setting up automated reloading, requires argument N (minutes) # note: if done as send-match sequence, then the 'has been modified' part # is mandatory - but not all ios versions have that prompt... # the follow...with construction on the other hand works with or without # that step. # note all lines that are matched against prompt or follow are STRIPPED from the response. macro reload_in send reload in %s # match /System configuration has been modified. Save\? [yes\/no]:/ # send no follow /System configuration has been modified. Save\? [yes\/no]:/ with no\n match /Proceed with reload\? [confirm]/ send '' match privileged
# no arguments. last match is pretty much a dud, the session will be gone. macro reload send reload follow /System configuration has been modified. Save\? [yes\/no]:/ with no\n match /Proceed with reload\? [confirm]/ send '' match privileged