The acquisition of dynamic IP address of Linux system and configuration of static IP address

Source: Internet
Author: User


The acquisition of dynamic IP address of Linux system and configuration of static IP address

Today, after installing the virtual machine and Linux system, the following experiments have been done in this experiment, the knowledge points and the experimental process are as follows

#-  .   protocol Options  
BROADCAST   Specify the   for sending broadcast messages; IP  address. Use local  , Address and subnet mask create a default broadcast address. The subnet mask indicates which part   Address recognition network which part identifies the host

#-2 . dhclient get IP address with i fconfig-a commands to view

. Etho represents 1 nic eth1 representing 2 network cards

. Lo represents a loopback address

#- 3. Use vi to open the configuration file command as follows

The following configuration file appears after

Modifying a configuration file

* * * to modify the configuration file inside first Press the A key You can then modify the file

1. no random start-up start-up to start the network card will be changed to Onboot=no onboot=yes

2. means how to obtain IP in this case, the dynamic use of DHCP to obtain the IP to change to static is used static with IP Subnet mask gateway DNS

after editing is complete, use ESC key to exit edit the above for static IP address configuration method.

3 . Enter then enter Wq or, after pressing the ESC key, enter Wq

4. Restart the Network Service , command --service network restart

5. access to extranet success

#-   &NBSP, 4. turn on the NIC eth0, ifup  eth0  turn on the NIC eth0, 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 commands to shut down the Linux System after the experiment is complete reboot Restart the command.

—————————————————————————————————————————————————————————————————————————————— @^@ , we're done with this class today, and learn some interesting commands .

1. easy to use calculator BC ;

2. Display the date and time of the command date;

3. commands for displaying calendars : cal;


This article from "11075742" blog, declined reprint!

The acquisition of dynamic IP address of Linux system and configuration of static IP address

Related Article

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.