Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running vmware (workstation) on my Win 10 host machine, and set up centos 7 vm with NAT configuration.
For the last 2 weeks, I am running into problems with a network of the VM, which is being lost from time to time.
While there are no network problems on the (physical) router, and my host machine operates just fine, I was unable to find a clue what might cause it. Until today...
I found out that I am losing connection after I connect to vm by ssh from my host machine.
I ran ping 8.8.8.8, which was working fine, but once I ssh to it, it all stopped.
Firewall (on vm) is down, iptables and ip6tables down as well. I switched off Win 10 firewall (both private and public).
I am not a linux admin, but I have used VMs before, and it seemed like a straight forward to set up NAT network, etc.. (on my vmware, I have set up NAT network, but I am connecting directly to VMNet2, which is NAT, but not NAT). Also, I am not using dhcp, but a static configuration
I found out that I am losing connection after I connect to vm by ssh from my host machine.
I ran ping 8.8.8.8, which was working fine, but once I ssh to it, it all stopped.
Can you be a bit more precise?
You ssh from the host to the guest. Then you lose connection - which connection? From the host to the guest, from the guest to the host, from the host to 8.8.8.8, from the guest to 8.8.8.8, something else?
You ran ping 8.8.8.8 where? On the guest, in the console? Or in another ssh session?
What stopped? Can you still use a shell in the console, has the guest crashed?
When you terminate the ssh connection that makes everything stop, does everything go back to normal?
If you still have a shell on the guest, you can start by exploring your network setup, e.g. listing all interfaces and IP addresses.
Last edited by berndbausch; 11-11-2019 at 07:29 AM.
I am ssh from my host OS to my VM. I have 2 open consoles within my VM, one is pinging my vmware nat gateway, another one is pinging 8.8.8.8
After I log in to my vm from my host, the one that pings 8.8.8.8 loses connection to 8.8.8.8
Anything else works fine, including my ssh session.
After I leave the session, network is still lost. It only gets fixed after I reboot the vm (centos 7)
Whenever I try to ping 8.8.8.8 from my host OS, it is possible
Since I can't comment on the VMware network setup, let's assume that the problem is in the guest.
To summarize the problem: Guest's internet connection seems to be interrupted when you ssh into the guest from the host. Rebooting the guest fixes the problem. Guest's connection from and to the host is fine.
Baffling. I am in the dark and can only offer a few steps to take.
On the guest, I would first look at network parameters before and after the problem occurs. That is, run
Code:
ip address
ip route
before and after the connection gets interrupted, then compare the output.
I would also use Wireshark to trace both the VMware interface and the external interface for ICMP traffic to/from the guest. The goal is to find out at which point echo requests or replies disappear.
If there are alternatives for accessing the guest over the network, I would also try them out. How do you ssh into it - from the Powershell command line, using a tool like Putty or MobaXterm? Can you use another tool? Enable telnet (I know it's not secure, but this is for testing) and see if telnetting into the guest has the same effect.
And of course, check if anything changes in the VMware network configuration. Unfortunately I don't know what to check for here. Can you set up a bridged connection instead of NAT and see what happens then?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.