Within junos you can send cmds from a list via netconf . 1st thing you need to looking at the display xmk rpc out for the command and then use that in your file
Here's a "show system interface" in rpc syntax
supports-MacBook-Pro:~ ken$ cat sys
<rpc>
<get-system-information>
</get-system-information>
</rpc>
Here's a "show arp" in rpc syntax
supports-MacBook-Pro:~ ken$ cat arp
<rpc>
<get-arp-table-information/>
</rpc>
supports-MacBook-Pro:~ ken$
supports-MacBook-Pro:~ ken$ cat sys arp | ssh -6 root@2001:1258:727:12::1 -s netconf
The output will be dump back in xml format;
e.g
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/19.4R3/junos">
<system-information>
<hardware-model>mx104</hardware-model>
<os-name>junos</os-name>
<os-version>19.4R3-S11</os-version>
<serial-number>T623</serial-number>
<host-name>core1.usme</host-name>
</system-information>
</rpc-reply>
]]>]]>
<rpc-reply xmlns="urn
( output snipped )
No comments:
Post a Comment