This article solves the following problems:
1. Why use NAT for Internet access?
2. How to configure Win7 and VM for Internet access?
3. How to configure FreeBSD, you can use DHCP to automatically obtain the IP address and DNS
Process:
For more information about the network modes that can be used by VMS, see the relationship between the virtual network card and the host network card. To facilitate business trips or solve the problem of VM Internet access when the company uses IP/MAC binding conditions, the Host_only and Bridge methods cannot solve the above problems, so the NAT solution is adopted.
Configuration process:
The following work should be done on the basis of understanding NAT:
1. Set the VMnet8 IP Address
2. Set the VMnet1 IP Address
3. Configure the Virtual Network of the VM.
4. Configure FreeBSD
Specific work:
1. Set the VMnet8 IP Address
2. Set VMnet1
Configure the VM1 adapter mode VMnet1-> Property-> share
Note: In the above process, if the system prompts to force an IP address of 192.168.137.1 or another type, use the prompt forced IP address. When I used it for the first time, I found that I could not run normally after I didn't use a forced IP address. However, after I changed the IP address, I thought it would work normally.
3. Configure the Virtual Network of the VM.
The following nat ip address must be in the same CIDR block as VMnet8.
NAT Setting:
As long as the Gatway IP address is not the same as VMnet8
4. Change FreeBSD to DHCP mode.
Command mode: # ee/etc/rc. conf
You can restart the NIC in the following ways:
Method 1: # sh/etc/rc
Method 2: #/etc/netstart
Method 3: restart the machine
Check the IP configuration again:
# Netstat-rn
Test again:
The network is already available, so you can perform various tests later, and you don't have to worry about the troubles caused by business trips.