LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-31-2017, 09:28 PM   #1
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Rep: Reputation: 1
Strange Linux Network Question


Hello,

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.

Thanks,
Joe
 
Old 01-31-2017, 09:40 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,976
Blog Entries: 28

Rep: Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067
More information would be useful. These questions come immediately to mind:

Just to clarify, the VMs are on Laptop 2, but are somehow connecting through Laptop 1?

In the VirtualBox settings for the VMs, are you using a "bridged" adapter or some other setting?

How are the routes on the VMs laptop to which you refer set up?
 
Old 02-01-2017, 12:10 AM   #3
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
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.
 
Old 02-01-2017, 01:01 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Here's a link that helped me fathom the tricks of VBox internal vs. bridged:
http://www.dedoimedo.com/computers/v...k-sharing.html (&VBox doc)

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!

Last edited by Jjanel; 02-01-2017 at 01:18 AM.
 
1 members found this post helpful.
Old 02-01-2017, 01:19 PM   #5
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Original Poster
Rep: Reputation: 1
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.

R
Joe
 
Old 02-01-2017, 04:28 PM   #6
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
That sounds like pf interfering. But here is an interesting link i found,

http://apple.stackexchange.com/quest...10-10-yosemite

It may get your foot in the door. Sorry. I have 0 experience on mac.

But yeah kvm is linux only.

The short of that article says not to use bridge but rather setup a bridge adapter.
 
Old 02-03-2017, 04:26 PM   #7
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Original Poster
Rep: Reputation: 1
ericson007,

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.

Thanks again for the help,

Joe
 
Old 02-03-2017, 06:54 PM   #8
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
One last thing. Did you set your main computer that host the machines' Interface card to promiscious mode?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Strange network traffic when I'm not using the network. Hungry ghost Linux - Security 14 02-07-2014 11:21 AM
Strange Network problem Only with some linux hosts circuit_PT Linux - Networking 9 09-02-2011 05:01 AM
Two network interfaces on Ubuntu 10.4.1 caused strange network problem iArash Linux - Networking 1 02-06-2011 04:07 AM
Strange Fedora Core 2 network ehavior question tomdkat Linux - Networking 1 12-22-2004 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration