Set up a Direct Network between Host and Guest VMWare - networking

I have a Soft PLC running inside a VMWare environment (Guest - Windows 8).
I want to connect to it from the Host (Windows 10) using the internal connections without having to set up a physical network switch.
My understanding of the documentation states that this should be achieved by Host only networking
https://docs.vmware.com/en/VMware-Workstation-Player-for-Windows/15.0/com.vmware.player.win.using.doc/GUID-93BDF7F1-D2E4-42CE-80EA-4E305337D2FC.html
And I've my PC Set up as:
The Network card in the Guest is set up as 192.168.0.244
On the Host, the network VMNet1 (Should be the DHCP Server) is Dynamic (DHCP) and resolved to 192.168.67.1 and VMNet8 (Should be the connection to the Guest) is also DHCP and has resolved to 192.169.73.1
All subnet masks are at 255.255.255.0 (DHCP defined?)
Even if I assign VMNet8 or VMNet1 to physical IP at 192.169.0.1 or 192.169.0.244 or 192.169.0.1 or even 192.168.0.12, I cannot ping the network card inside the host.
Am I missing something here with my setup? What am i doing wrong or has anyone got a step by step process for setting up a direct network connection between the Guest and host for testing communications without an external switch?
(I've disabled teh network connections between each setting change)

Found the issue.
The VM should have been set to NAT
The Network address of the adapter Inside the Guest set to the IP address I'm looking for
On my Host - VMNet 1 left alone as this is the DHCP Server
And set the VMNet 8 (Bridged connection between Guest and Host) to an IP address within a range of the subnet
And after disabling and re-enabling the connections, I can ping the PLC (192.168.0.1) running in simulation on the Guest from outside in the Host.
(Allows me to test node-red on the host connecting via OPC to PLCSim Advanced running on the Guest).

Related

Accessing connected devices to a local network wirelessly

Hello Everyone!
I want to know that is there any way to access a photocopier machine which is connected to a computer through Ethernet wire and that computer is connected to my WiFi network?
P.S: What if I don't know the IP assigned to that Photocopier machine?
If the wireless network is part of the wired network you should have any problem reaching the photocopier.
If you don't know the IP address, you can reach it by host name if the DHCP and DNS are working properly. If you are on an Active Directory infrastructure and DHCP and DNS are integrated it should be transparent.
If you are on your home with a "home" router they usually do the hostname to IP resolve (DNS).
You can nslookup hostname in your machine to see if your dns is resolving the ip address. you can also ping hostname or ping ip address to test that you can reach the desired host. Some hosts block ping (ICMP) requests, please note that ping is ping does not respond is not a definitive solution.
Please note that in your home router you should use your router or default gateway to be the DNS also, and then add the google public DNS or your ISP.
Also when connecting the access point to an existing network you may have 2 DHCP servers providing IP addresses to hosts, you should disable DHCP on the Access Point and connect the AP to the network using the switch port and not the WAN port (the WAN port will try to do NAT and assign a different set of IP addresses).

I can't assign an IP address to vmware VM from DHCP pool

In GNS3, I have configured the DHCP pool on the router R1, and I have a vmware VM (Ubuntu 16.04), another router R2 and VPCs are connected to R1. The R2 and VPC can get their IP address without a problem, however, the vmwareVM can't receive the IP address.
Note that:
the station is configured as host-only
the connect a host virtual adapter to this network is checked
the VMware Workstation DHCP Server is turned OFF
No configuration on my local PC Network Connections (DHCP)
Once I type the command dhclient eth0 to get the IP address from dhcp, it freezes and returns nothing and no IP address is assigned.
I want to know what is the problem that causes that issue and how to solve it.
Thank you.
My mistake was in the configuration of my VMware network adapter (VMnet2) in my network adapter in my host.
so in order to get the IP address from the DHCP router: I did the following steps:
Create a virtual network (VMnet2) in the virtual network editor
of VMware.
I checked the "Host-only" option
I checked the
"connect a host virtual adapter to this network" option
Uncheck the "use local DHCP service to distribute IP address to VMs".
Do not change the default configuration of the VMnet from your
network connexion options.
I hope that will help someone has the same issue as me

How to setup a bridge connection with vbox/vmware using a second wan ip on a dedicated server

I am using a dedicated server with a certain wan ip / netmask / gateway / nameservers.
I got a second wan ip to use with virtualbox i installed on the server.
I want to use bridge connection in virtualbox because i use some "servers" in it and want them to be able to be seen from internet .
I created a virtual network interface on the server and assigned the second ip to it.
It works , meaning i can ping that ip from outside.I setup virtualbox to bridge to that interface but i am stuck at what settings i have to set up in the virtual guest so everything will work.
Second ip has netmask 255.255.255.255 so i assume its a single ip situation and probably using gateway and nameservers of the server because i was given none of them with it.
I have to mention that first ip and second ip are not in the same subnet , nor is the gateway (e.g. XX.YY.ZZ.WW , ZZ is different between first , second and gateway ip)
Thanks in advance.
You have to unbind TCP and all other protocols and services on the hosts NIC that you want to use in VBox. After that, you can configure a bridged network connection using that interface. After that, you can set the IP and network settings in your virtual system. This has also been addressed in this post: https://serverfault.com/questions/136969/dedicate-a-nic-to-a-virtualbox-vm

How can a VM work out the address of the host node?

How can a Linux VM work out the IPaddress of the host node?
I need to connect to the IP address of the host node. I also need to know when it changes as it could be a dynamic IP. I need it to connect to a service there.
Is there some way to check this, irregardless of the type of VM, VMWare, Xen, Virtual Box?
It needs to be a Linux script, and should work regardless of the host operating system, whether Linux or Windows
My solution is to bridge a network adapter in the VM with one on the host, making it a dymanic IP address. As such it will always be on the subnet as the host adapter.
Next thing is to run an HTTP service on the host IP, that the VM will scan its network range on. The IP the service responds on will be the IP of the host. Having an IP service on the host is not ideal, but it is the best I can come up with.

How to access loopback adapter from another PC on my LAN

I have installed MS Loop-back adapter and have given it a static IP: 10.10.10.9
my laptop is configured as 10.10.10.30 , and my gateway is 10.10.10.1
i can ping the loop-back NIC from my laptop, but not from any other machine on the LAN. i am trying to beat the 65k port limitation by seeing if i can have virtual IP addresses on one machine and each can then give me 65k ports
thanks.
By very definition, you CANNOT talk to a loopback adapter from any other machine but your own.
If on Linux, you could bridge it to a physical adapter, such as eth0, but why would you want to do that?
Take a look here for setting up IP alias on Windows (disclaimer - I don't own any windows machines, so can't really verify this).
You can ping your Loopback interface from LAN by installing Remote and Routing Access role on the server. After installing the R&S role on the server , configure LAN routing feature. It will start pinging from LAN. I have done this practically in my environment.

Resources