VMware Communities
Nordqvist
Enthusiast
Enthusiast
Jump to solution

Network configuration when only one mac address is allowed

Hello Forum,

 

To begin with I'm not an IT or VMware expert so sorry if my question is a real easy one or not fully understandable.

My problem is this,
I've a customer which only allow one unique mac address connection for each port in the network switch(if they detect multiple mac addresses the shut down the port which devices are connected to). This cause problems for me because when I connect my PC with virtual machine running the port in the switch shuts down and blocks in/outgoing traffic so I cant communicate with my equipment.
I'm guessing when running a virtual machine I get multiple mac addresses and the switch sees these mac addresses and that's causing this.
Does someone has a solution to this or some tip on where to look for an solution?

I'm using VmWare workstation Pro V15.5

Thanks in  advance.

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

It appears the guest interface is not getting an IP address.  DHCP must be enabled on the guest interface.  Also, you must edit the VM Settings of the guest and assign VMnet3 to the network adapter.

View solution in original post

10 Replies
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

 

Try creating a NAT "bridge" by going to "Edit->Virtual Network Editor".   Select "Add Network" and use the next available name (in my case VMnet2).  Click the button that says NAT (share host IP address...).   Next, edit the VM's Network Adapter settings and set it to use the name of the network you just created.  

Ray_CJ_0-1607960021999.png

 

Ray

Nordqvist
Enthusiast
Enthusiast
Jump to solution

Hello Ray_CJ,

Thanks for answer,
I've tried to follow your advices, I feel I'm almost there but cant make it work on the Guest.
I can ping devices from my host at the moment but not from the guest.
The IP scope for my devices on network are 10.179.89.xxx
Se current setup

NetConfig1.PNGNetConfig2.PNG

 

IPconfig on the host from command prompt
One further note, my costumer have DHCP enabled on the network so I receive a IP-address but I can also set a static one.

HostIP_Config.PNG

 Is it something I'm missing?

0 Kudos
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

On the guest operating system, go to the IPV4 settings on the local interface and make sure DHCP is enabled.  

On the guest operating system, what is the output of "ipconfig /all" ?

 

 

 

Ray_CJ
Enthusiast
Enthusiast
Jump to solution

I just noticed one more thing...  On the network Editor, I think you changed the subnet IP to the same as your host network.   That is not going to work.  NAT needs to translate across unlike subnets.  On the network configuration, don't make the subnet IP on the same as the host network.   Make it something like 10.179.254.0 (notice 3rd number in bold) with a mask of 255.255.255.0 or use the value that the Network Editor suggests the first time you open it.   Don't use 10.179.89.0.   

 

Ray_CJ_0-1607985367877.png

 

With NAT (Network Address Translation) the guest VM will be able to send data out and responses can come back.  You will have "full duplex" communication provided your guest VM initiates the communication.  If some other computer in your network happens to know the name or IP address of your guest VM, that computer will not likely be able to communicate with your guest VM in an unsolicited manner.  This is because the guest VM is "hiding" behind a different subnet and the VM's host is doing the NAT conversion.  You could probably install a route in your host OS to point to your guest VM but, I suspect the owner of 10.179.89.0 will either not like that or will ignore the route because they are not running a routing protocol at that level of the network.

 

 

0 Kudos
Nordqvist
Enthusiast
Enthusiast
Jump to solution

Hello,

Thanks for your feedback.

Tried your suggestions but still having problems with this NAT functionality.
Entered the IP range you suggested.

NetConfig3.PNG

Did a ipconfig/all on the Guest.

Nordqvist_0-1608023833750.png

It does not look like the NAT connects with my Guest?

0 Kudos
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

It appears the guest interface is not getting an IP address.  DHCP must be enabled on the guest interface.  Also, you must edit the VM Settings of the guest and assign VMnet3 to the network adapter.

Nordqvist
Enthusiast
Enthusiast
Jump to solution

Thank you so much for the help with this, would like to mark every one of your post as the correct answer.
Now it works, the final problem was that I hadn't selected the right setting in the settings for the guest.
I had to set it to Custom and then select my NAT connection(VMnet3).

Nordqvist_0-1608039216212.png

 

How does the "NAT" selection in the Guest settings work? What's it for?

 

Thanks again for the help 🙂

 

0 Kudos
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

It's great to hear this is working now.  Sadly, I've only been using VMware for a few weeks myself and therefore am not accustomed to giving exact "step-by-step" instructions on how to set the parameters.  It's great that you persisted and figured it out. 

NAT stands for Network Address Translation.  Virtually all home gateway routers use this (very old and established) technique to connect your home Internet Service Provider to the computers in your home.

In your case, the host computer has an IP address that is officially assigned through DHCP by the network operators.  Your Guest OS is sitting inside (and hidden by) the Host OS.  Your Guest OS is given a totally different IP address that is not consistent with, or recognized by the network operators.  When your Guest OS wants to send something, it sends the IP packets to the NAT software.  The NAT software modifies the outgoing packets and puts the IP address of the host in the source address field of all the packets.  This way, the rest of network thinks your Host OS is the one that's sending the packets.  This makes your network operators happy.  When the response from other computers come back to the Host, the NAT software keeps track if the packet really needs to go back to the Guest OS and send it there if needed.   How the NAT software keeps track of the packets and if they belong to the Host or Guest is part of the stateful nature of it's job.  It's actually called NATP (P=Port Translation).     If someone on the outside network sends unsolicited packets to the Host that are intended for the Guest, the NAT software won't know if it belongs to the Host or Guest.  For this reason, NAT can only keep track of the packets that are initially sent by your Guest OS.

Suggest you do Internet search on NATP and NAT to get greater insight.

Regards

Ray

PS:  If this is worth clicking the Kudo's check box, please do so...

Nordqvist
Enthusiast
Enthusiast
Jump to solution

Ok thanks for the detailed explanation, so much to learn in this field.

You mentioned if someone would send package from outside the network intended for the Guest the NAT wont know it is intended for the Guest.

If I have have devices in the network that initiate connection with the virtual machine, can I somehow forward this to the virtual machine?

I see under NAT settings I can add ports to a Guest static(?) Ip address, is this something I can use to enable this? Let say we have a html5 based application on a device in the network, it sends a package request to the Guest IP address with https so I add port 8433 in NAT network settings to a guest Ip-address. Would this work? 

0 Kudos
Ray_CJ
Enthusiast
Enthusiast
Jump to solution

If any host in the network sends packets to the Guest, the network will not know which host is responsible for that Guest.   Any/all packets in your network must be addressed to the hosts that your network operator recognizes.

I assume the Port features in the VMware NAT setup process will do what you want but, will forward any and ALL traffic sent to the host with that port number to the Guest.   The problem here, is that your host could be receiving 8443 traffic for many other valid reasons.  The host will not receive the packets truly intended for it.   People sometimes do things like this but, by convention, they will force the various endpoints to use non-standard (and agree-upon) port numbers. 

What you are trying to accomplish is a form of "tunneling" and for that, you are best off using Tunneling software (aka VPN software) on the hosts that are hiding the guests.  I'm not too familiar with Window's-based VPN solutions and don't know if that will work on hosts that have only one interface.

 

Regards

Ray