Use vmware to configure centos 6.0 + Network Problems and Solutions

Source: Internet
Author: User

Use vmware to configure the centos 6.0 + network to solve various problems. First, we will introduce two common network connection methods and differences for VMS. 1. Bridging Network: In this mode, the operating system virtualized by VMWare is like an independent host in the LAN, which can access any machine in the network. In the bridge mode, you need to manually configure the IP address and subnet mask for the virtual system, and also need to be in the same network segment as the host machine, so that the virtual system can communicate with the host machine. At the same time, After configuring the gateway and DNS address, you can access the Internet through the LAN gateway or router. 2. nat network: The NAT mode enables the virtual system to use the NAT (Network Address Translation) function to access the public network through the network of the host machine. That is to say, you can use the NAT mode to access the Internet in a virtual system. In NAT mode, the TCP/IP configuration information of the virtual system is provided by the DHCP server of the VMnet8 (NAT) Virtual Network and cannot be modified manually, therefore, the virtual system cannot communicate with other real hosts in the local area network. The biggest advantage of using the NAT mode is that it is very simple for a virtual system to access the Internet. You only need the host machine to access the Internet. You do not need to configure IP addresses, subnet masks, and gateways, however, the DNS address must be specified based on the actual situation. In addition to entering the DNS address in the NIC attribute, you can also click Edit in the NAT tab of the virtual network editor in the virtual machine. If you only allow virtual machines to access the Internet in either of the two modes, you can use bridging as long as you have a valid address in the LAN. For example, your ADSL cat has a routing function, if it is in the Organization, it is necessary for the network administrator to give you a valid IP address (now the company is bound to mac and ip addresses ). Now the host and virtual machine are interconnected. If your adsl has the routing function, disable dhcp for the virtual machine, select bridging, check whether the two machines are allocated IP addresses in the same network segment, and disable the firewall. If you replace it with yourself, bridging is equivalent to a virtual machine, which has its own IP address. NAT is used to share the ip address of the host machine to access the network. The host computer can access the network. 2. First install centos to configure network a, use bridging to connect to the network (suitable for users with routes and switches), and configure static IP addresses to access the Internet, LAN communication vim/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = "eth0" BOOTPROTO = none HWADDR = "00: 23: 54: DE: 01: 69 "ONBOOT =" yes "TYPE =" Ethernet "USERCTL = no route 6init = no PEERDNS = yes NETMASK = 255.255.255.0 IPADDR = 192.168.1.110 GATEWAY = 192.168.1.1 DNS1 = 8.8.8.8 HWADDR, IPADDR, GATEWAY, DNS1 the actual configuration also requires you to configure B according to your network environment and use NAT to configure the network vim/etc/sysconfig/network-scripts/ifcfg -Eth0DEVICE = "eth0" HWADDR = "08: 00: 27: BE: 80: A6" NM_CONTROLLED = "yes" ONBOOT = "yes" BOOTPROTO = "dhcp" BOOTPROTO: set the way for the NIC to obtain the IP address. The possible options are static, dhcp, or bootp, which correspond to the IP address specified by the static state. The IP address obtained through the dhcp protocol is obtained through the bootp protocol. Reboot # After restart, the system can access the Internet normally. 2. clone a system configuration Network Environment clone means to copy the same system from the original system, but we want to connect the clone system to the Internet, you need to make some adjustments to the network environment. When we use service network restart, an error message will be prompted: Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED] vim/etc/udev/rules. d/70-persistent-net.rules record the MAC address of eth1 # PCI device 0x1022: 0x2000 (pcnet32) SUBSYSTEM = "net", ACTION = "add ", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 96: 50: 1e ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0" # PCI device 0x1022: 0x2000 (pcnet32) SUBSYSTEM = "net", ACTION = "add ", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: d5: 65: 00 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1" then we need to modify vim/etc/sysconfig/network-scripts/ifcfg-eth0 to change the original DEVICE eth0 to eth1 and the corresponding MAC address DEVICE = "eth1" HWADDR =" 00: 0C: 29: d5: 65: 00 "NM_CONTROLLED =" yes "ONBOOT =" yes "BOOTPROTO =" dhcp "service network restartping www.baidu.com can be pinged, indicating that the network is connected

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.