I'm auditing switch interface descriptions at work. I work nights and sometimes people during the day shut down their computers when they leave, so I don't see which computers are on interfaces when I'm not there.

I have a mix of Cisco 3500 and 3600 series switches where it's possible to use curl (then some grep statements)

curl -sS -u user:pass

curl -sS -u user:pass

curl -sS -u user:pass

to get the running config, MAC address table, interface descriptions, etc. I'm using this to generate reports of MAC address tables and int descriptions when I'm not at work so I can audit switch interfaces to see what phones and PCs are online when I'm not in. I have MAC addresses documented from machines when they are unboxed, so I can compare the MACs I have with the ones reported in the automated curl statements. This will also be used to see if anyone's violating the "Don't BYOD" policy.

This has worked flawlessly with the 3500s, 3550s, 3560s, and 3650s I have. I also have some sg300s that don't appear to be able to do that. Is that an accurate assumption?

  • If you have the ability/privileges to configure the sg300, see if configuring "ip http server" makes a difference.
    – mere3ortal
    Mar 2, 2018 at 6:12
  • I can already log in to the SG300s via HTTP, but the graphical interface is too "interactive", and may be more advanced than a simple curl statement can handle.
    – user208145
    Mar 2, 2018 at 6:21

1 Answer 1


If you can't get the result with Curl you have at least two other options:

  • Use SNMP to query the needed information
  • Use the CLI with a language like expect. Basically with expect you can simulate an interactive CLI session.
  • I was fearing an expect answer. Fiiiiiine, I'll learn it. Thanks.
    – user208145
    Mar 3, 2018 at 11:52
  • @user208145 well there's still SNMP (but I didn't check the MIB content)
    – JFL
    Mar 3, 2018 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.