VMware CentOS Network Configuration

Source: Internet
Author: User

This method uses bridging so that dynamic IP can be fixed to a static IP to connect to the intranet or to the extranet

1:

View own host IP cmd under input ipconfig

2:

Execute sequentially

where the 5th step of the drive gets the MAC address of the virtual machine

3: Start the virtual machine and use the root permission setting

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

Device= "Eth0"
bootproto= "Static" #设置静态IP
ipaddr=192.168.1.111 #此处字段必须与主机ip一致, last Custom
netmask=255.255.255.0 #子网掩码与主机一致
gateway=192.168.1.1 #网关与主机一致
dns1=192.168.1.1
Hwaddr= "00:0c:29:07:04:13" #此处为虚拟机的MAC地址
Ipv6init= "No"
Nm_controlled= "Yes"
Onboot=yes #开机启动
Type= "Ethernet"

4: Perform service network restart restart

5: Try to connect the external ping www.baidu.com

Try to connect to the intranet ping 192.168.2.1

It all comes back and succeeds.

VMware CentOS Network Configuration

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.