At least on Linux, you could use capabilities to allow the program to do a limited set of things as if it had root privileges.
The relevant capability seems to be this:
CAP_NET_ADMIN Perform various network-related operations: * interface configuration; * administration of IP firewall, masquerading, and accounting; [...]
And you can set the capability with setcap:
setcap cap_net_admin+ep /path/to/my_ifconfig
The alternative, of course would be to make the program setuid root (chmod u+s), which would allow it to do anything root can do. That's obviously more risky, but should work on other systems too, not just Linux.
You may want to limit which users can execute the file with extra permissions with the usual file permission bits, for example to only allow members of the netadmins group to run it:
chown root.netadmins /path/to/my_ifconfig chmod 0710 /path/to/my_ifconfig