LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-06-2019, 10:01 AM   #1
LBM
Member
 
Registered: Aug 2010
Location: Denmark
Distribution: Debian
Posts: 114

Rep: Reputation: 1
VLAN Filter ?


Hi,

Im trying to create an VLAN on an KVMGuest, using vlan filters.
Its for testing purposes only, to get familiar with other ways of doing VLAN bridges.

On the switch I have
port:8 tagged VLAN200, KVM host NIC enp2s0f1 server plugged into here
port:7 untagged VLAN200,PVID200 IOT device.

On the KVM host I have done the following:
Code:
ip link add name br200 type bridge
ip link set dev br200 up
ip link set dev enp2s0f1 master br200
ip link set dev br200 type bridge vlan_filtering 1
Added VLAN200 to the bridge
Code:
bridge vlan add vid 200 dev enp2s0f1

bridge vlan show dev enp2s0f1
port	vlan ids
enp2s0f1	 1 PVID
	 200
From the VMGuest, I have the following defined (the bridge adapter)
from the KVM guest
Code:
   <source bridge='br200'/>
The VMGuest, has the interface configured like so.
Code:
auto eth0.200
iface eth0.200 inet static
 	address 192.168.200.5
	netmask 255.255.255.0
If I try to ping IOT device, from this VMGuest, I get timeouts.

If I on the KVM host, tcpdump the new virtual interface, I can see the vlan traffic. But NOT on br200, or the physical interface, I guess I should at least be able to on the physical interface ?

Shows VLAN tags!
Code:
tcpdump -nn -i vnet14  -e  vlan
Does NOT show VLAN tags!
Code:
tcpdump -nn -i br200  -e  vlan
tcpdump -nn -i enp2s0f1  -e  vlan
 
Old 11-07-2019, 01:49 AM   #2
LBM
Member
 
Registered: Aug 2010
Location: Denmark
Distribution: Debian
Posts: 114

Original Poster
Rep: Reputation: 1
I found the problem. The vnet adapter for the VM needs to have the VLAN as well, as the physical interface, like so:
Code:
bridge vlan add vid 200 dev enp2s0f1 <- if not already done.
bridge vlan add vid 200 dev vnet14
And I can now see the VLAN traffic on the physical NIC with tcpdump, as I expected.
 
  


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
[SOLVED] Creating a VLAN interface on top of another VLAN interface jbbroccard2 Linux - Networking 1 05-22-2013 01:25 AM
Route non-vlan packet to a vlan interface mic.sed Linux - Networking 2 04-23-2010 02:39 AM
VLan help on Cisco 870 to Linux vlan spide21 Linux - Networking 4 07-30-2009 08:20 AM
DHCP Config for VLAN's using 1NIC and non VLAN router. scottgutman Linux - Networking 1 07-22-2009 01:41 AM
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:18 PM.

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