how to save network settings in linux permanently?

Viewed 22

I am working system programming with c language in linux and want to edit ip settings by programming. i want change ip settings in linux such as ip address, netmask or gateway or change ip mode such as static or dynmaic. I want to take effect these changes and save in the configuration file (/etc/network/interfaces) to be take affect by network manager at next book time automaticly by the kernel.

  1. how can I change ip settings in linux by c language in efficient and appropriate way?
  2. how can i save network settings for a interface to able use by kernel and network manager in next time width boots 3.how can i understand ip mode of the a interface like eth0. I want to know that ip mode is static or dynamic
0 Answers
Related