LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2014, 06:37 AM   #1
microgradient
LQ Newbie
 
Registered: Jan 2014
Posts: 1

Rep: Reputation: Disabled
Connectity issues between VM and HOST on multiple vlans


Good day!
Let me briefly desribe my topology::

Cisco switch (SW) -----------via trunk----------------host (Centos 6.5 x86_64)

About the switch:
On SW there are 2 vlans: 100 (172.16.100.0/24) and 1000 (192.168.1.0/24).
This switch passes vlan 100 with a tag, vlan 1000 untagged (native vlan) to the host machine.
Also on SW 2 vlan interfaces are configure: Vl100: 172.16.100.102, Vl1000: 192.168.1.102

About the host:
Code:
 Linux version 2.6.32-431.3.1.el6.x86_64 (mockbuild@c6b10.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Jan 3 21:39:27 UTC 2014
One phy. nic: eth0. Any security features are turned off (iptables, selinux, arptables, ebtables ....); Routing is on.

Network config (some output details are skipped):

Code:
br0      Link encap:Ethernet  HWaddr 00:22:15:06:47:6E                                                        
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          ...
br0.100   Link encap:Ethernet  HWaddr 00:22:15:06:47:6E
          inet addr:172.16.100.1  Bcast:172.16.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          ...
eth0    Link encap:Ethernet  HWaddr 00:22:15:06:47:6E
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
So there is a bridge br0 with eth0 on it + vlan interface br0.100.
Connectivity between SW and the host is OK, i.e. two sides can access each other on both vlans (tagged 100 and untagged 1000).

Now Virtualbox is installed (4.3.6 r91406) and with 1 vm on it (centos 6.5 x86 minimal with iptables, selinux turned off). VMs network (eth0) is in Bridged mode with br0 on the host.

Network on the VM:

Code:
eth0:      Link encap:Ethernet  HWaddr 08:22:27:F3:EB:85                                                        
          inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth0.100   Link encap:Ethernet  HWaddr 08:22:27:F3:EB:85                                                        
          inet addr:172.16.1.205  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
As you can see I pass vlans directly to the vm and I need to achieve connectivity between sw, host and vm on both 2 vlans

So far connectivity between (on both vlans) HOST<---->SW is OK; SW<----->VM is also OK.

The problem is that [U]HOST itself cannot access VM on a tagged vlan[U].
That is if I ping 192.168.1.1 (host) or 192.168.1.102 (sw) from 192.168.1.205 (vm) it works.
If I ping 172.16.100.102 (sw) from 172.16.100.205 (vm) it also works.
But if I ping 172.16.100.1 (host) from 172.16.100.205 (vm) it does not work.
Vm broadcasts arp request for 172.16.100.1, host receives it, replies to it, but the answer never gets to vm.
Code:
[root@srv network-scripts]#  tcpdump -ne -i br0.100 -xx
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0.100, link-type EN10MB (Ethernet), capture size 65535 bytes
15:39:17.862544 08:00:27:f3:eb:85 > Broadcast, ethertype ARP (0x0806), length 42: Request who-has 172.16.100.1 tell 172.16.100.111, length 28                                                                                 
        0x0000:  ffff ffff ffff 0800 27f3 eb85 0806 0001                                                       
        0x0010:  0800 0604 0001 0800 27f3 eb85 ac10 646f                                                       
        0x0020:  0000 0000 0000 ac10 6401                                                                      
15:39:17.862556 00:22:15:06:47:6e > 08:00:27:f3:eb:85, ethertype ARP (0x0806), length 42: Reply 172.16.100.1 is-at 00:22:15:06:47:6e, length 28                                                                               
        0x0000:  0800 27f3 eb85 0022 1506 476e 0806 0001                                                       
        0x0010:  0800 0604 0002 0022 1506 476e ac10 6401                                                       
        0x0020:  0800 27f3 eb85 ac10 646f
On vm
Code:
[root@localhost]#arp
...
172.16.100.1	ether 	incomplete		eth0.100
...
Clearly tagged vlan between host and vm is not passed.

What I have done so far:

1. Installed tap0, added to br0 in the network settings for vm selected tap0. Doing this vm can access host on both vlans, it can also sw on untagged vlan, but not tagged vlan. Again vm broadcasts arp request for 172.16.100.102 (sw), sw receives it and replies to it, but vm never gets that response. Wireshark on the host shows arp requests leaving eth0 (also br0), but no replies come in to even eth0 itself on the host, though debug on switch shows incoming arp requests and outgoing arp replies on vlan 100.

2. Chose different nic types on virtual box, but still no success.

Any ideas on how to achieve interconnectivity between se host and vm?
The issue is not related to VirtualBox only. The same is true with vmware or Gns3.
Thank you.

Last edited by microgradient; 01-26-2014 at 06:40 AM.
 
  


Reply



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
Multiple VLANs access a local HTTP server saifulmr Linux - Networking 4 08-13-2011 04:07 PM
1 DHCP server needs to serve multiple VLANs pridefc Linux - Networking 6 03-18-2010 11:32 AM
iptables NAT to multiple vlans? ACiD GRiM Linux - Server 0 03-26-2009 12:24 AM
creation of dhcp server with multiple vlans gannurajput Linux - Networking 1 01-02-2008 07:07 AM
Linux - multiple VLANS on eth0 john.morris Linux - Networking 3 12-10-2005 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:41 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