Network Management

Reply
Highlighted
Moderator

AMP-Tip: 8.2.6 AMPCLI: Enter Commands #1: basic network troubleshooting

AMPCLI is good for security, but lacking for anyone who's ever experienced the full power of having the root shell, so I'm going to try to describe some of the debug troubleshooting we've added back into the system.

 

In 8.2.5.1, we introduced a new freeform CLI input more reminiscent of the open root shell with a set list of commands.  In 8.2.6 we added some more commands to that set list that targetted network troubleshooting commands.

 

Login to your CLI with your 'ampadmin' user account and load the Enter Commands (option 11):

AirWave Management Platform 8.2.6 on airwave.lab.com
1 Upload File
2 Download File
3 Delete File
4 Backup
5 Restore
6 Support
7 Upgrade
8 Advanced
9 Security
10 Custom Commands
11 Enter Commands
q >> Quit
Your choice: 11

Running Enter Commands

Type 'help' for the list of commands.
$

 

Here we have a bunch of tools which you can list out with 'help' or '?' - it'll spout the text into a repackaged 'less' output, so you'll want to 'q' to get out of the reader view, if you 'ctrl+c' it'll boot you back to the main menu prompt.  You can also do a '? <command>' to see a specific commands usage:

$ ? ping
ping args ... - see 'man ping'

$ ? help
help - Show this text in the 'less' pager.
The 'less' pager is used for other commands as well.
In 'less' type 'q' to exit or 'h' for help.
help <topic> - Show help just for the given topic

 

  1.  PING

You can now ping with all the options that you might need (see 'man ping')

$ ping gateway.lab.com

PING gateway.lab.com (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=0.696 ms
64 bytes from 10.10.10.1: icmp_seq=2 ttl=64 time=0.589 ms
64 bytes from 10.10.10.1: icmp_seq=3 ttl=64 time=0.745 ms

 

  2.  TRACEROUTE

You can now traceroute with all the options that you might need (see 'man traceroute')

$ traceroute google.com

traceroute to google.com (216.58.195.238), 30 hops max, 60 byte packets
1 gateway.lab.com (10.10.10..1) 0.984 ms 0.900 ms 0.873 ms
2 eqixsj-google-gige.google.com (206.223.116.21) 2.004 ms 1.789 ms 1.381 ms
3 108.170.242.225 (108.170.242.225) 1.948 ms * 2.720 ms

4 108.170.237.119 (108.170.237.119) 2.648 ms 108.170.237.9 (108.170.237.9) 2.659 ms 108.170.237.119 (108.170.237.119) 2.614 ms
5 sfo03s06-in-f238.1e100.net (216.58.195.238) 2.503 ms 2.491 ms 2.496 ms

 

  3.  NSLOOKUP

You can now nslookup with all the options that you might need (see 'man nslookup')

$ nslookup google.com
Server: 10.10.10.2
Address: 10.10.10.2#53

Non-authoritative answer:
Name: google.com
Address: 216.58.195.238

 

  4.  TCPDUMP

You can now tcpdump with all the options that you might need (see 'man tcpdump') with the added -o <filename> option if you want to capture the output

$ tcpdump -i eth0

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
10:02:22.656794 ARP, Request who-has test1.lab.com tell airwave-core1.corp.airwave.com, length 46
10:02:22.657767 ARP, Request who-has test2.lab.com tell airwave-core1.corp.airwave.com, length 46
10:02:22.658481 ARP, Request who-has 10.10.10.8 tell gateway.lab.com, length 46
10:02:22.692297 IP airwave.lab.com.ssh > 10.240.134.209.49667: Flags [P.], seq 4057593966:4057594174, ack 4127694006, win 83, length 208

30 packets captured
30 packets received by filter
0 packets dropped by kernel

$ tcpdump -i eth0 -o eth0dump

-this cmd will output the dump until you ctrl+c, then you can access the dumpfile from the 'download' menu option - here's a quick check if file is there before switching menus:

$ ls eth*
eth0dump 4,244 bytes 2018-02-27 10:10:04

-I can then quit (quit, q, exit, ctrl+c - they all work) from the Enter Commands back to the main menu to go into the download option:

AirWave Management Platform 8.2.6 on airwave.lab.com
1 Upload File
2 Download File
3 Delete File

Your choice: 2

Running Download File
Download File
1 .rnd 1,024 bytes 2017-10-24 11:45:24
2 eth0dump 4,244 bytes 2018-02-27 10:10:04
c >> Cancel
Your choice:

 

Stay tuned for other AMP-Tips - since I might be making a comeback.

 


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: