Do you know PLINK?

The last week I need to run a some commands on a lot of APs and output. Today mostly all customer use controllers and don’t need to connect to each ap. But as I learned last week there are still some commands, you can’t run through the controller CLI on all APs :/

For one of my open cases with a vendor I need to run a command on 100+ APs. It was not possible to perform this action from the controller CLI. I need to connect to each AP via ssh, login, run the command and copy the output… Or I use Plink.exe with a simple batch file like in the older days. Plink is a application from PuTTY.

For this job I use 3 files and the Plink application. Let me describe the single files:

command.txt

This file include the commands we need to run. It’s important to include a command that terminate the session and a carriage return at the end to execute the last command. For my small test, I just use „show version“ and „exit“ to terminate the session.

show version
exit

 

host.txt

For the host’s I use a file that also include username and password. It’s also possible create just a list of all host’s and static place the username and password in the batch script. All entries are separated with a , to exclude a line I use the ;

;HOST,USER,PASS
10.10.20.100,admin,12345678
10.10.20.101,admin,12345678

 

run.bat

The last part is the batch script to run the commands on all devices and document the output.

@echo off
echo Start Script > log.txt
for /f „eol=; tokens=1,2,3 delims=,?“ %%a in (host.txt) do (
echo ————————— >> log.txt
echo Host: %%a >> log.txt
echo User: %%b >> log.txt
echo %TIME% >> log.txt
echo ————————— >> log.txt
plink.exe -ssh -l %%b -pw %%c %%a < command.txt >> log.txt
)

 

I’ll now describe the batch file line by line for a easy understanding and quick changes:

echo Start Script > log.txt
Write the first line into log.txt, the > overwrite the last log.txt file

for /f „eol=; tokens=1,2,3 delims=,?“ %%a in (host.txt) do (
this starts the loop and run the following commands for each line added in host.txt. The eol=; is used to mark the ; as symbol to exclude a line, tokens are used for the three options: host,user,pass.

echo ————————— >> log.txt
add a line of – to the log.txt, >> is used to add the information to the log.txt

echo Host: %%a >> log.txt
add the address of the host %%a means first information from the line

echo User: %%b >> log.txt
add the user of the host, %%b used for second information from the line

echo %TIME% >> log.txt
add the time to the log.txt

echo ————————— >> log.txt
add again a line of – to the log.txt

plink.exe -ssh -l %%b -pw %%c %%a < command.txt >> log.txt
-ssh
use ssh for the connection
-l %%b
add the user, %%b is the second option from the line
–pw %%c
add the password, %%c is the third option from the line
%%a
add the host, %%a is the second option from the line
< command.txt
include the commands for the ssh connection
>> log.txt
add the output include commands to the log.txt

)
End the loop.

The result

The result looks like the following:

Start Script
—————————
Host: 10.10.20.100
User: admin
22:27:58,17
—————————
show version
exit
vx9000-01*>show version
VX9000 version 5.8.4.0-034R
Copyright (c) 2004-2016 Symbol Technologies, Inc. All rights reserved.
Booted from secondary because of fallback!
vx9000-01 uptime is 0 days, 00 hours 29 minutes
CPU is Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
Base ethernet MAC address is *****
System serial number is *****
Model number is VX-9000-DEMO-WR
vx9000-01*>
vx9000-01*>exit
Using username „admin“.
Start Script
—————————
Host: 10.10.20.101
User: admin
22:27:58,17
—————————
show version
exit
vx9000-02*>show version
VX9000 version 5.8.4.0-034R
Copyright (c) 2004-2016 Symbol Technologies, Inc. All rights reserved.
Booted from secondary because of fallback!
vx9000-02 uptime is 0 days, 00 hours 25 minutes
CPU is Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
Base ethernet MAC address is *****
System serial number is *****
Model number is VX-9000-DEMO-WR
vx9000-02*>
vx9000-02*>exit
Using username „admin“.

 

You can find more information in the PuTTY manual.

Ekahau Customer Report Template – Loops & APs

Visualization SN SNR Final

Let’s start with the second part of my Ekahau Customer Report Template tutorial.

We know already from the first post, how to create heat maps and show the requirements. As you maybe already notice, the heat map is generated for one floor. If you have more than one floor, you need a loop or just the first floor is shown.

You can generate loops of different kinds. As first loop we’ll use the “floors” loop.

Here is our last code:

Signal strength: <#${req-value-sig-strength}#> dBm
SNR: <#${req-value-snr}#> dB
5 GHz signal strength for my access points
<#”visualization”:{“heatmap”:{“type”: “sig-strength”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}},“aps”:{“show-name”: “true”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}}}#>
<#”visualization-legend”: {}#>
5 GHz SNR for all access points
<#”visualization”:{“heatmap”:{“type”:“snr”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}},“aps”:{“show-name”:“true”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}}}#>
<#”visualization-legend”:{}#>

The result you can see in this PDF file, v1.pdf.

Create a loop

This works fine with a one floor project. To use it with multiple floors we need a loop and show the floor name:

Signal strength: <#${req-value-sig-strength}#>
dBm SNR: <#${req-value-snr}#> dB
<#“loop-start”: {“type”: “floors”}#>
Floor: <#${floor-name}#>
5 GHz signal strength for my access points
<#”visualization”:{“heatmap”:{“type”: “sig-strength”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}},“aps”:{“show-name”: “true”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}}}#>
<#”visualization-legend”: {}#>
5 GHz SNR for all access points
<#”visualization”:{“heatmap”:{“type”:“snr”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}},“aps”:{“show-name”:“true”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}}}#>
<#”visualization-legend”:{}#>
<#“loop-end”: {“type”: “floors”}#>

This loop will walk throw all floors and generate all heat maps on a per floor base. The result looks like:

Signal strength: XX dBm
SNR: XX dB
Floor: Floor 1
5 GHz signal strength for my access points
HEAT MAP Signal Strength 5GHz, my aps
5 GHz SNR for all access points
HEATMAP SNR 5GHz, all aps
Floor: Floor 2
5 GHz signal strength for my access points
HEATMAP Signal Strength 5GHz, my aps
5 GHz SNR for all access points
HEATMAP SNR 5GHz, all aps

I add the PDF file, Loop-v2.pdf.

You can also create two loops, if you’ll first show the signal strength of each floor and then show the SNR of each floor.

Signal strength: <#${req-value-sig-strength}#> dBm
SNR: <#${req-value-snr}#> dB
<#“loop-start”: {“type”: “floors”}#>
<#${floor-name}#> – 5 GHz signal strength for my access points
<#”visualization”:{“heatmap”:{“type”: “sig-strength”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}},“aps”:{“show-name”: “true”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}}}#>
<#”visualization-legend”: {}#>
<#“loop-end”: {“type”: “floors”}#>
<#“loop-start”: {“type”: “floors”}#>
<#${floor-name}#> – 5 GHz SNR for all access points
<#”visualization”:{“heatmap”:{“type”:“snr”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}},“aps”:{“show-name”:“true”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}}}#>
<#”visualization-legend”:{}#>
<#“loop-end”: {“type”: “floors”}#>

This loop will walk throw the heat map type and generate it per floor. The result looks like:

Signal strength: XX dBm
SNR: XX dB
Floor 1 – 5 GHz signal strength for my access points
HEATMAP Signal Strength 5GHz, my aps
Floor 2 – 5 GHz signal strength for my access points
HEATMAP Signal Strength 5GHz, my aps

Floor 1 – 5 GHz SNR for all access points
HEATMAP SNR 5GHz, all aps
Floor 2 – 5 GHz SNR for all access points
HEATMAP SNR 5GHz, all aps

I add the PDF file, Loop-v3.pdf.

Show AP information

Now we can create heat maps of different types for different floors. But it’s usually needed to create a list of my access points. For this, we’ll work again with a loop. But now the type is “aps”.

Do show you the easy way, I don’t use the created template with the heat maps. We’ll start with a new file.

<#“loop-start”: {”type”: ”aps”}#>
<#${ap-name}#>
<#“loop-end”: {“type”: “aps”}#>

This show you the names of all access points in your file.

v4

We can now filter to show just our own access points.

<#“loop-start”: {”type”: ”aps”,
“filter”: {
“include”:{
“owner”:”my”
}}
}#>
<#${ap-name}#>
<#“loop-end”: {“type”: “aps”}#>

Take a look to the second result, the „Not my AP“ is missing:

v5

The access point information’s are Data Tags. You can see the different values in the User Guide. You can also create a template for site survey and a second on for simulation. In the simulation template you can show the „tx power“ and „antenna height“ from the simulation.

All in one report

In the last step we’ll now merge all this information to one report. I’ll use the sample where I show all information per floor. We’ll now also include the AP loop inside of the floor loop. This will show the APs on a per floor base.

Signal strength: <#${req-value-sig-strength}#> dBm
SNR: <#${req-value-snr}#> dB
<#“loop-start”: {“type”: “floors”}#>
Floor: <#${floor-name}#>
Access Points Name:
<#“loop-start”: {”type”: ”aps”,“filter”: {“include”:{“owner”:”my”}}}#>
<#${ap-name}#>
<#“loop-end”: {“type”: “aps”}#>
5 GHz signal strength for my access points
<#”visualization”:{“heatmap”:{“type”: “sig-strength”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}},“aps”:{“show-name”: “true”,“filter”: {“include”: {“owner”: “my”, “band”: “5”}}}}#>
<#”visualization-legend”: {}#>
5 GHz SNR for all access points
<#”visualization”:{“heatmap”:{“type”:“snr”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}},“aps”:{“show-name”:“true”,“filter”:{“include”:{“owner”:“my”,“band”:“5”}}}}#>
<#”visualization-legend”:{}#>
<#“loop-end”: {“type”: “floors”}#>

The final report you can see as PDF file, FINAL.pdf.

Summary – Ekahau Customer Report Template

I show you some functions of the Ekahau Customer Report Template. But there is a lot more you can do with. The best of all, you can combined almost every loop, filter and information. As I show you, we use the same loop for the AP name. But it show us different information, because we use it in the final version inside a floor loop.

And now some tips from me:

  1. Read the user manual, it shows you all information
  2. Begin with small templates (the only bad part of this report function, debugging is not so easy)
  3. Try different report templates

Also read the different details:

Loops
Data Tags
Visualization Tags

If you are looking for more information or have different questions, feel free to enter it as comment!

Follow me on twitter: dot11_de

Ekahau Customer Report Template – Let’s start

Visualization SN SNR Final

Hello,

I know that a lot of companies use Ekahau as preferred tool for Site Surveys, Simulation and Validation. The last years I do a lot of troubleshooting. During this I check the original Site Survey documentation and realize how many companies use the default template!

I also see people doing a one day site survey and need 1-2 days for documentation. For 3-5 days they need 2-3 days documentation, copy & paste images from the default report to the customize report…

This is the reason why I choose the customer report feature from Ekahau for my first blog post. I hope it’ll help some people to stop wasting time!

Weiterlesen