Host (Windows 10) Virtual Machine (ubuntu18) arm plate (linux3.4) ping each other

In practice a virtual machine installed on the host computer, and debugging arm connecting plate on the host via the network cable.

Host with a network cable and arm plate direct physical connection, and the host and the arm must be in the same network segment . (We know the host of the network card as a router)

Wherein the arm plate IP address has been set, arm plate according to the present embodiment is ip address to 192.168.3.123 (can be changed by uboot). arm plate friendly arm of Smart4418

The best PC with Ethernet interface and a wireless network interface cards (easy to test).

1. Turn off the Win10 firewall

"Control Panel \ System and Security \ Windows Defender Firewall" turn off the firewall.
Preferably in an acknowledged and the network port are normal network cable.

2 virtual machines configured according to different connection

2.1 Bridge Mode

Bridge mode principle is to build a virtual switch , master card, network card while the virtual machine is connected to the virtual switch. Because without router physically, so we want to Ping pass each other only through the broadcast switch principle, that the host card, the virtual machine network card must be in the same network segment . Their equivalent diagram is as follows:

Setting Ethernet IPV4 addresses in "Control Panel \ Network and Internet \ Network Connections". Be careful not to set network address (0) and broadcast address (255) up.

View Host ip addressing cases

VMware open virtual network interface editor, and an increase VMnet0 custom network, which is arranged bridging mode. Bridged to Ethernet interfaces.

Make sure the Ethernet port

And set interface selection setting - Network Adapter - Custom -VMnet0.

Configuring network in a virtual machine, make sure ipv4 address and host virtual machines on the same network segment .

View the virtual machine ip addressing cases

Ping host virtual machines:

Ping host virtual machine:

The host Ping arm:

Virtual Machine Ping arm:

Tips: In the case of your laptop can connect to the Internet via wifi, according to the principle of equivalence diagram, the virtual machine is unable to Ping through external network, and the host can, try to go through the actual true.

2.2NAT mode

NAT mode principle is to build a virtual NAT routing , master card, the virtual machine network adapter is connected to both virtual NAT routing. Hosts, virtual machines can access the Internet via the virtual NAT routing, due to the presence of NAT, host adapters, and virtual machine network card does not need to be in the same segment , they are transparent for the Internet. Their equivalent diagram is as follows:

As the host network card and arm must be in the same network segment , if not already set the settings, if not set set up in accordance with 2.1. View the next NAT ip host configuration:

VMware open virtual network interface editor, select the VMnet8, first the hook block must be on the hook, and not otherwise connected to this host NAT (self-test).

And set interface selection setting - Network Adapter - Custom -VMnet8 (NAT mode).

Configure the network in the virtual machine, using the DHCP server automatically obtain ip address.

View the virtual machine ip address setting case, you can see because the ip address assigned automatically by the DHCP, the virtual machines and virtual NAT in the same network segment.

At this point the host ping arm, the virtual machine ping arm, the virtual machine host ping, ping host virtual machines can ping, the picture is no longer listed.

Tips: Since the virtual NAT router having a routing characteristic, then the virtual machine and the host can be networked ~

Toss it day, we want to help ^ ^

Guess you like

Origin www.cnblogs.com/czjk/p/11699198.html