CentOS ifcfg-eth0 configuration in VMWare for CentOS

Source: Internet
Author: User

CentOS ifcfg-eth0 configuration in VMWare for CentOS

These configurations are based on VMware Network Adapter VMnet8. Assume that my VMware Network Adapter VMnet8 IP address is 192.168.106.1.

For example:

Then my ifcfg-eth0 file configuration is as follows:

[Plain] view plaincopy
  1. DEVICE = eth0
  2. TYPE = Ethernet
  3. UUID = f9f0898c-bf2c-4183-857a-eab291cd904d
  4. ONBOOT = yes
  5. NM_CONTROLLED = yes
  6. BOOTPROTO = static
  7. IPADDR = 192.168.106.130
  8. NETMASK = 255.255.255.0
  9. BROADCAST = 192.168.106.255
  10. GATEWAY = 192.168.106.2
  11. DNS1 = 114.114.114.114
  12. DNS2 = 8.8.8.8
  13. DEFROUTE = yes
  14. 20174_failure_fatal = yes
  15. IPV6INIT = no
  16. NAME = "Systemeth0"
  17. HWADDR = 00: 0C: 29: 22: D2: 64
  18. PEERDNS = yes
  19. PEERROUTES = yes
  20. LAST_CONNECT = 1456741165
I set my CentOS IPaddress to 192.168.106.130 and VMware Network Adapter VMnet8 in the same Network segment.

Note: The Path to the ifcfg-eth0 file in CentOS is:/etc/sysconfig/network-scripts/ifcfg-eth0

After modifying the file, run the command # service network restart or #/etc/init. d/network restart to make the modification take effect.

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.