tools for linux
we use netgear switch gs108t in our LINUX solutions
at customer site the netgear switch will get a IP adress through DHCP of the customer
I need to know this IP address for internal usage (watchdog functionality)
how can I discover this address?
I know that there is a netgear tool running on windows and MAC which can discover netgear switches by MAC address -- but I cannot use this (because [a] it must run under linxu and [b] it ust be a batchable program and not a GUI)
is there any solution from the community or even better from netgear to help me?
I know there is a public program called psl-cli.py which should do this, but unfortunate it seems that this can not handle the GS108T swicth ....
Re: tools for linux
Adding a DHCP reservation is going to give you the most reliable results since the switch will get the same address after reboots. Second option would be to set a fixed IP which is still in the subnet but outside of the pool of IPs served by the DHCP server.
So long as your Linux box is on the same subnet, you could use nmap to do a ping scan which should populate the arp cache. If you noted the MAC address previously, you should be able to read the arp cache and grep for the Switch's MAC address to find its IP. But it remains a hack to be honest. If the DHCP server doesn't respond in a timely manner, the switch might end up self-assigning an IP and remain on it even after the DHCP server has become responsice again.