Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 do not really consider myself a newbie anymore when it comes to Linux however there are some weird things going on with my little test environment that I cannot fully explain and I was hoping someone here might have some feedback as it is annoying and time consuming to deal with.
I have a test environment with one linux laptop that connects wirelessly to my VMs on my other laptop so basically it looks like the below network design.
Laptop 1 --> VM1 --> VM2 --> VM3
The VMs are using Virtualbox internal networks. Anyhow, no matter how I setup my routes on the VMs Laptop 1 can only send traffic to the other VMs if the other VMs first connect to Laptop 1 first. It is almost like the VMs tell the Laptop 1 what the routes are going to be.
Anyhow, hopefully I have made this problem clear enough and maybe someone has some ideas why I am seeing this behavior? I tried setting up routes every way I could think of and I even turned off network manager on Laptop 1 but nothing seems to work.
Sounds like your system is using nat. In that case on laptop 2, you would have to enable port forwarding and has to forward conections to each vm.
I always find it easiest to create virtual networks and bridge them with physical adapters or pass a physical adapter directly to a vm. The later not really being a consideration for a laptop though.
That being said, if you can show us the networking options virtual box gives you and your current config. That would be nice.
I never tried virtual box for these things as kvm gives me everything i could want, but i am sure there must be similarities in terms of network setup.
I thought that 'internal' kept it all *within one PC* (Laptop 2[?]),
but I've heard of tricks where -like- Laptop1 won't -broadcast- arp request
(depending on its routing table: netstat -rn) but learns when it hears...
(look at / maybe post before&after: arp -a) p.s. myBlogFYI nictrace->.pcap!
Just to clarify.
All VMs are on laptop 2
My laptop(1) ----- connects -- VM1 ----------- VM2 ----------- VM3 --------------- VM4 (target node)
(Uses Wifi ) (bridged) (internal 1) (internal 2) (internal 3)
192.168.1.0/24 172.20.1.0/24 10.100.0.0/16 192.168.3.0/24
I have used KVM before but I don't have a lot of experience and with virtual box I find to be more intuitive and more cross-platform as my laptop is mac and I always assumed KVM was meant more for linux which I could be wrong.
Hopefully the diagram makes more sense. Like I said as long as I first ping first from my VMs to laptop 1 then laptop 1 can ping back.
I find it strange I have to first ping from VM2, VM3 and VM4 to get my laptop 1 to send packets to VM1. On my laptop 1 the default route is set to VM1 which is in bridged mode.
Thanks again for your help...its a simple fix but I find it annoying and time consuming to first ping from all my VMs to the laptop to get it to connect or see my other VMs.
Thanks for the reply back, it was an interesting read. As far as I can tell I still have the problem. However, as annoying as it is I feel I can just deal with it using scripts to just ping from the other VMs and just basically automate the ping until "if" I need to upgrade my test environment I will look into it again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.