In this quick post, I’ll address an external connectivity issue on UNetLab
pnet networks that I’ve stumbled upon recently and how you can fix it, in case you’re running VMware Workstation on Linux. Specifically, the problem has to do with the fact that you can’t ping from UNetLab nodes to your Linux host, or vice versa, even though all nodes are connected to
pnet1 (in my case), which in turn, is connected to
vmnet1 on VMware Workstation.
Long story short, the problem has to do with Linux access permissions on
vmnet* network adapters. In my case, I setup Workstation as a systemd service. So, whenever my Linux host boots up all vmware daemons are started accordingly. As a result, all vmware network adapters
vmnet* are owned by the root user, which turns out to be a problem because this adapter needs to be set in promiscuous mode in execution time, and since I’m running workstation with my standard user I’m not allowed to so.
As you’ll see shortly, I decided to work around this by changing the ownership of
/dev/vmnet1 to my standard user, since this is my personal laboratory this solution is totally acceptable. Before I show you the final solution, let me walk you through the problem. Initially,
/dev/vmnet1 is owned by the root user:
If you were to verify L3 reachability, you’d notice that you couldn’t ping between your host machine and UNL nodes even though ARP resolution was successful. For example, my Linux host running VMware Workstation, has the IP
192.168.99.1 set on
vmnet1 and one of the UNL nodes, a Juniper vMX, has the IP set as
On, vMX1, it’s possible to see the ping fails, but ARP resolution works as expected:
If you were to trace where the ICMP packets were being dropped, you’d see that it would be on vmnet1. On UNL,
pnet1 bridge was bridging ICMP packets as expected:
In order to fix the permissions on
/dev/vmnet1, since I run vmware on systemd, I decided to
/dev/vmnet1 to my standard user in the end of the start function in the
/etc/init.d/vmware script. Consequently, whenever the service is started my standard user will get ownership of
/dev/vmnet1 and I’ll be able to run VMware Workstation without being root and I’ll be able to use this adapter in promiscuous mode:
Now, you simply have to restart
vmware service, and
/dev/vmnet1 will be owned by your standard user,
arcanjo in my particular example.
If I were to test L3 reachability again, it works perfectly:
From vMX1’s (UNL node) perspective:
In conclusion, the external connectivity issue had nothing to do with UNL itself and was just a specific detail with Linux permissions and the way VMware Workstation is setup by default on Linux. So, I decided to write this post mentioning UNL just to facilitate for Linux users who might face this problem of
pnet networks and bridging
vmnet on VMware Workstation. I hope you guys enjoyed this post.