centos6.5 graphical interface networkmanager configuring IP file location

Source: Internet
Author: User

Ask a question about the network configuration,


The network connection graphical interface has 2 configurations, where system eth0 has the corresponding profile/etc/sysconfig/network-scripts/ifcfg-eth0, but ZHOUCF this configuration is I manually added in the graphical interface,  Where is the corresponding configuration file for it? I want to initialize Linux has a pure network configuration, with the command line to delete the above image of the ZHOUCF configuration what to do? ----------------------------- find/root-type f-name "*" | xargs grep "ZHOUCF"  Find/root/.gconf/system/networking/connections/2/connection/%gconf.xml: <stringvalue>zhoucf22</ Stringvalue>/root/.gconf/system/networking/connections/1/connection/%gconf.xml: &LT;STRINGVALUE&GT;ZHOUCF </stringvalue>    The numbers 1 and 2 in the path represent the 1th and 2nd manually configured network settings, and the entry folder 1,ll display reads as follows: [[email protected]desktop]# CD/ROOT/.GCONF/SYSTEM/NETWORKING/CONNECTIONS/1
[[email protected]1]# LL
Total 16
DRWX------. 2 root root 4096 Sep 7 17:11 802-3-ethernet
DRWX------. 2 root root 4096 Sep 7 17:11 Connection
-RW-------. 1 root root 0 Sep 7 16:48%gconf.xml
DRWX------. 2 root root 4096 Sep 7 17:11 IPv4
DRWX------. 2 root root 4096 Sep 7 17:11 IPv6 which The Link's name ID, uuid, type, and so on are configured in Connection/%gconf.xml, with the following content:XML code
  1. <? XML version="1.0"?>
  2. <gconf>
  3. <entry name="timestamp" mtime="1410081115" type="string">
  4. <stringvalue>1410081115</stringvalue>
  5. </Entry>
  6. <entry name="type" mtime="1410081115" type="string">
  7. <stringvalue>802-3-ethernet</stringvalue>
  8. </Entry>
  9. <entry name="uuid" mtime="1410081115" type="string">
  10. <stringvalue>c0a50c06-f281-48ca-b1d5-6499ffb98b48</stringvalue>
  11. </Entry>
  12. <entry name="id" mtime="1410081115" type="string">
  13. <stringvalue>ZHOUCF</stringvalue>
  14. </Entry>
  15. <entry name="name" mtime="1410081115" type="string">
  16. <stringvalue>connection</stringvalue>
  17. </Entry>
  18. </gconf>
 ipv4/ The IP address, DNS, and so on are configured in/%gconf.xml, where the address is represented numerically in reverse IPXML code
  1. <? XML version="1.0"?>
  2. <gconf>
  3. <entry name="routes" mtime="1410081115" type="list" ltype="int" >
  4. </Entry>
  5. <entry name="address-labels" mtime="1410081115" type= "list" ltype=" String ">
  6. <li type="string">
  7. <stringvalue></stringvalue>
  8. </li>
  9. </Entry>
  10. <entry name="addresses" mtime="1410081115" type= "list" ltype="int ">
  11. <li type="int" value=" -939415360"/>
  12. <li type="int" value="/> "
  13. <li type="int" value="16885952"/>
  14. </Entry>
  15. <entry name="DNS" mtime="1410081115" type="list" ltype="int" >
  16. <li type="int" value="16885952"/>
  17. </Entry>
  18. <entry name="method" mtime="1410081115" type="string">
  19. <stringvalue>manual</stringvalue>
  20. </Entry>
  21. <entry name="name" mtime="1410081115" type="string">
  22. <stringvalue>ipv4</stringvalue>
  23. </Entry>
  24. </gconf>
  Java COMPUTE Code:Java code
  1. Public class Iplong {
  2. /** 
  3. * The IP address turns into an integer.
  4. * @param IP
  5. * @return
  6. */
  7. public static long ip2long (String IP) {
  8. string[] ips = Ip.split ("[.]");
  9. Long num = 16777216l*long.parselong (ips[0]) + 65536l*long.parselong (ips[1]) + 256*long.parselong (ips[  2]) + Long.parselong (ips[3]);
  10. return num;
  11. }
  12. /** 
  13. * integers are converted to IP addresses.
  14. * @param iplong
  15. * @return
  16. */
  17. public static String Long2ip (long Iplong) {
  18. //long iplong = 1037591503;
  19. long mask[] = {0x000000ff,0x0000FF00,0x00ff0000,0xff000000};
  20. Long num = 0;
  21. StringBuffer ipinfo = new StringBuffer ();
  22. For (int i=0;i<4;i++) {
  23. num = (Iplong & Mask[i]) >> (i*8);
  24. if (i>0) Ipinfo.insert (0,".");
  25. Ipinfo.insert (0,long.tostring (num,10));
  26. }
  27. return ipinfo.tostring ();
  28. }
  29. public static void Main (string[] args) {
  30. //system.out.println (Ip2long ("219.239.110.138"));
  31. System.out.println (Ip2long ("192.168.1.200")); 3232235976
  32. System.out.println (Ip2long ("200.1.168.192")); 3355551936
  33. System.out.println (Long2ip (16885952)); 16885952 configuration of DNS in Ipv4//%gconf.xml
  34. ///Printed results: -56.1.168.192
  35. System.out.println (Long2ip (-939415360)); 939415360 configuration of addresses in Ipv4//%gconf.xml
  36. //Print result -56.1.168.192 (where 256-56=200) is calculated by 200.1.168.192
  37. }
  38. }
  Summary: 1, configuration Linuxip time, set ifcfg-eh0 on the line, this is the system level, in the graphical interface manually configured IP settings, is user-level, and reboot, the system will first load the system-level configuration 2, in the analysis process to find the command is not: grep "ZHOUCF"-rl/root and the find/root-type f-name "*" | xargs grep "ZHOUCF" 3, Know NetworkManager is how to store IP configuration, you can be assured that the configuration of Ifcfg-ech0 to configure the network settings

centos6.5 graphical interface networkmanager configuring IP file location

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.