Posted on June 24, 2021 11:07 am
 |  Asked by Peter Vine
 |  142 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hi guys,

Trying to run multiple commands on a single line on an Arista switch running 4.22.6M. I followed this – https://eos.arista.com/forum/executing-multiple-commands-on-one-line/ but this is for a newer software version. Is this functionality available for 4.22.6M?

Upgrading the firmware is not an option as 4.22.6M is the optimal version for our needs as a business at the moment.

Thanks in advance.

0
Answered on June 24, 2021 4:05 pm

Hi Peter,

Thanks for reaching out.

Running Multiple commands on a single line using run command is not supported in 4.22.6M EOS version.I have tested this in lab for 4.22.6M and I could see the command not working.

switch(config)#run show ip interface brief ; show lldp neighbor
% Invalid input

As per https://eos.arista.com/forum/executing-multiple-commands-on-one-line/ we have support for multi-command feature starting from 4.24.2F and later versions.

https://eos.arista.com/eos-4-24-2f/multi-command/

 

Thanks,

Bhavana.

0
Posted by Shawn Rogers
Answered on June 24, 2021 6:01 pm

Hi Peter,

Although the multi-command feature is not available in EOS version 4.22.6M, you can use Fastcli to accomplish similar behavior. The example below uses Fastcli to run the command show vrf, followed by show clock, if you would like to add a 3rd command we simply need to add n followed by the new command. For example, I have added show ver bash FastCli -p 15 -c $'show vrfnshow clocknshow ver'

bash FastCli -p 15 -c $'show vrfnshow clock'
Maximum number of vrfs allowed: 2047
Vrf RD Protocols State Interfaces
--------- --------------- --------------- -------------------- ----------
aa <not set> ipv4,ipv6 v4:no routing,
v6:no routing

Thu Jun 24 17:58:02 2021
Timezone: UTC
Clock source: NTP server (10.90.20.122)

 

Thank you

Shawn Rogers

0
Posted by Cosmin
Answered on June 25, 2021 12:14 pm

Hi Peter.

Another option is to use the alias feature. Here is a simple demo:

Arista(config)#alias commands
Arista(config-alias-commands)#1 show version
Arista(config-alias-commands)#2 show clock
Arista(config-alias-commands)#exit
Arista(config)#exit
Arista#commands
Arista DCS-7260QX-64-F
Hardware version: 05.01
Serial number: ZZZ99999999
System MAC address: 001c.4567.8901

Software image version: 4.22.6M
Architecture: i686
Internal build version: 4.22.6M-17208915.4226M
Internal build ID: 51f0f486-d525-4596-b6f4-0926aec53851

Uptime: 3 weeks, 2 days, 11 hours and 43 minutes
Total memory: 8177392 kB
Free memory: 6455060 kB

Fri Jun 25 12:11:35 2021
Timezone: UTC
Clock source: NTP server (10.90.20.122)
Arista#

Take care

Post your Answer

You must be logged in to post an answer.