Linux System Dynamics IP acquisition and Static of addresses IP configuration of the address
Today in Linux The system has done the following experiments in this experiment encountered in the knowledge points and the experimental process is as follows
#- 1 . Broadcast protocol options specify IP address. Use local IP IP
#-2 . dhclient Get IP Address with ifconfig-a commands to view
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/08/B6/wKiom1nl-gLA5w3dAABrCykGa3M077.png-wh_500x0-wm_ 3-wmp_4-s_3709620860.png "style=" Float:none; "title=" 1.png "alt=" Wkiom1nl-gla5w3daabrcykga3m077.png-wh_50 "/>
. Etho represents 1 a network card eth1 represents 2 a network card
. Lo represents a loopback address
#- 3 . with VI Open the configuration file command as follows
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/A7/65/wKioL1nl90zAABDCAAAjn_UTsY4727.png-wh_500x0-wm_ 3-wmp_4-s_3916023940.png "style=" Float:none; "title=" 2.png "alt=" Wkiol1nl90zaabdcaaajn_utsy4727.png-wh_50 "/>
The following configuration file appears after
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/08/B6/wKiom1nl-gKzc19fAAAZ2y7mOR4582.png-wh_500x0-wm_ 3-wmp_4-s_2815932499.png "style=" Float:none; "title=" 3.png "alt=" Wkiom1nl-gkzc19faaaz2y7mor4582.png-wh_50 "/>
Modifying a configuration file
*** to modify the configuration file inside, first press I Key You can then modify the file
1.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/A7/65/wKioL1nl90zwTdMTAAACB77NVW4937.png-wh_500x0-wm_ 3-wmp_4-s_4118584875.png "style=" Float:none; "title=" 4.png "alt=" Wkiol1nl90zwtdmtaaacb77nvw4937.png-wh_50 "/>
does not randomly start a boot to start the network card will be Onboot=no instead Onboot=yes
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/08/B6/wKiom1nl-gKQuDMHAAACpQ-uPGk461.png-wh_500x0-wm_ 3-wmp_4-s_2951056157.png "style=" Float:none; "title=" 5.png "alt=" Wkiom1nl-gkqudmhaaacpq-upgk461.png-wh_50 "/>
2.
650) this.width=650; "Src=" Https://s1.51cto.com/wyfs02/M00/A7/65/wKioL1nl902gPuEEAAAFh9ruGm4423.png-wh_ 500x0-wm_3-wmp_4-s_1516129695.png "title=" 6.png "alt=" wkiol1nl902gpueeaaafh9rugm4423.png-wh_50 "/>
means how to get dhcp dynamic get ip static followed by ip subnet mask Gateway dns
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A7/65/wKioL1nl902QuyV7AAAiEsSA85o018.png-wh_500x0-wm_ 3-wmp_4-s_2503338133.png "style=" Float:none; "title=" 7.png "alt=" Wkiol1nl902quyv7aaaiessa85o018.png-wh_50 "/>
after editing is complete, use ESC key exit edit above for static IP address configuration method.
3 . Enter then enter Wq or when you press ESC key to enter after Wq
4. Restart the Network Service , command --service network restart
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A7/65/wKioL1nl902QHFiaAAAkdlpc8fc396.png-wh_500x0-wm_ 3-wmp_4-s_3338052221.png "style=" Float:none; "title=" 9.png "alt=" Wkiol1nl902qhfiaaaakdlpc8fc396.png-wh_50 "/>
5. access to extranet success
650) this.width=650; "Src=" Https://s3.51cto.com/wyfs02/M00/08/B6/wKiom1nl-gOxdg5GAAAnYDuhUas845.png-wh_ 500x0-wm_3-wmp_4-s_2966681208.png "style=" Float:none; "title=" 10.png "alt=" Wkiom1nl-goxdg5gaaanyduhuas845.png-wh_ "/>";
#- 4. turn on the NIC eth0, command for ifup eth0 turn on network adapter eth0, command for ifdown eth0   .
#-5. ifconfig-a can view all the network cards that start or do not start ifconfig can only view the network card that is started and cannot see the network card that does not start.
#-6. Ctrl + C ends the command.
#-7. History command to view all commands that were previously lost.
#-8. Init 0 Close after the experiment is over Linux command of the system reboot Restart the command.
The acquisition of dynamic IP address of Linux system and configuration of static IP address