Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Serf

About ohm

  • Rank
  1. You faced similar problem that I wanted to solve. I searched a lot of web pages to find some script to do it and I realized I must to write it myself. I want to get information about interface IPs from switches/ routers in a format similar to a host file so it can be easily added to a host file. All devices are reachable through SNMP so I wrote a bash script for getting this information. I decided for bash because it is at almost every linux machine so it can be easily deployd. After adding the result to the host file a traceroute output shows hostname of the device and it name. Network prefix and interface description is added as a comment that it is not showed in traceroute but can be shown by searching the host file. Output from this script is in this format: A.B.C.D Device_hostname-Interface_name #/Prefix #Interface description router_R01-Gi1/0/2 #28 Beijing-router01-WAN-Tu611 #24 # Port to internet firewall2-eth5 #24 The script is available from http://network-linux.webnode.cz/news/bash-script-for-gathering-ip-addresses-of-interfaces-through-snmp.