One of the CentOS 6.5 configuration IP addresses in the virtual machine manually set

Source: Internet
Author: User

One of the CentOS 6.5 configuration IP addresses in the virtual machine manually set

1. Manual Setup

(methods that do not use virtual machines to obtain IP automatically), the manual configuration method is as follows:

the System input command in the virtual machine is Sudu or administrative.

#vi/etc/sysconfig/network-scripts/ifcfg-eth0 Comment: VI edit the configuration file of the network card

Enter the above command after the return, open the configuration file, use the arrow keys to move the cursor to the last line, press the letter key "i", enter the editing mode, enter the following content:

ipaddr=192.168.10.11 #注释: IP address

netmask=255.255.255.0 #注释: Mask

gateway=192.168.10.254 #注释: Gateway

onboot=No change to onboot=Yes

bootproto=DHCP changed to bootproto=none

when you're done, press the ESC key in the upper-left corner of the keyboard, enter: Wq in the lower left of the screen, enter to save the configuration file.


the network service needs to be restarted after the command is

#Service network restart

after the network restarts, the eth0 IP is in effect, using the command #ifconfig eth0 to view or ifconfig

Normally, virtual machines can be connected to physical machines.

The physical machine is detected with the command ping 192.168.10.11, and the ping pass indicates that the IP is configured correctly.

The solid-machine segment is a 192.168.10.X network segment. To your own circumstances, you can set your own, to ensure that virtual machines and physical machines in the same network segment can be.

One of the CentOS 6.5 configuration IP addresses in the virtual machine manually set

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.