I need a short perl script to run on a Linux server to gather information about all interfaces and ip addresses setup on the server.
It should gather up the information and put all data into an array called $network_info formatted as follows:
(note: array not formatting correctly in this preview... please see attached text file)
Array
(
[0] => Array
(
[name] => eth0
[mac_address] => aa:aa:aa:aa:aa:aa
[mtu] => 1500
[ip_addresses] => Array
(
[0] => 1.1.1.1
[1] => 1.1.1.2
[2] => 1.1.1.3
)
)
[1] => Array
(
[name] => eth1
[mac_address] => bb:bb:bb:bb:bb:bb
[mtu] => 9000
[ip_addresses] => Array
(
[0] => [login to view URL]
)
)
)
In summary, the array needs to contain each interface along with it's MTU and MAC address with each IP address setup on that interface in another array (eg using virtual interfaces such as eth0:1, eth0:2, etc).
The script cannot rely on any third party Perl modules but it is okay to use standard Linux utilities used on standard CentOS, Ubuntu and Debian installs.
Hello, Here is a senior Perl expert and I can do your project in a short time.
Please check my recent Perl job reviews.
I am clear what you want and I can start work right now on my CentOs server.
So I hope we can discuss your project via chat.
Thanks.