LinuxQuestions.org
Visit Jeremy's Blog.
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-21-2016, 04:36 PM   #1
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
Unhappy VLAN interfaces, TAP adapter, and bridges oh my!


OK so I've never had a need to setting up VLANs in Linux before, but I do now. I am running Debian 8 primarily as a OpenVPN server. I have a bridged VPN working fine at the moment with OpenVPN bridge scripts creating the tap adapter and bridge interfaces and bridging the NIC and tap adapter under the bridge interface.

What I would like to do in my giant plan is have multiple OpenVPN instances running all on their own bridged adapter so that an AD server can hand out the DHCP leases and update the AD DNS, I do not want to use tunneling and use the OpenVPN server as a router.

Now I have one external interface, and one internal interface to the LAN. I want to tag VLAN traffic on the internal interface connected to a Catalyst 2960 and then bridge those VLAN interfaces to TAP adapters and create multiple bridges. (Perhaps someone can think of a better way to do these bridged VPNs with OpenVPN, please suggest if you ahve a better idea)

Anyways I followed the steps to create a tagged VLAN interface in Debian using the /etc/network/interfaces file, and have also configured the CISCO switch already for trunking on that port, as well as the Native VLAN for any untagged traffic. The interfaces come up fine, but when trying to network using the VLAN interface I get no connectivity to the LAN at all, and the firewall seems to block all traffic (even allowed traffic) to the external interface, although I can get out to the Internet from the box.

I tried changing the MAC address of teh VLAN interface (as per a post where this resolved someone's issue) but it did not work. Could anyone guide me through setting these up or make a suggestion as to where it might be going wrong or how to diagnose what the issue might be?

I actually think I've figured out a better way, at least partially, I'll VLAN the TAP interfaces and need only one bridge and the original ethernet adapter. Regardless I digress I'm adding configs here for help with it.

Quote:
/etc/network/interfaces

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto eth0.1 #Internal Interface
allow-hotplug eth0.1
iface eth0.1 inet static
#pre-up ifconfig NIC hw ether 99:54:AE:54:1D:AF #Fake MAC in an attempt to get VLAN working
post-up iptables-restore < /etc/iptables.up.rules
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
# gateway xxx.xxx.xxx.xxx
vlan-raw-device eth0

auto eth1
allow-hotplug eth1
iface eth1 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
up route add default gw xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
And this is the switchport config
Quote:
interface FastEthernet0/36
description TES-MCT-UAG G1
switchport trunk allowed vlan 1,2,20,30,40
switchport mode trunk

Port Mode Encapsulation Status Native vlan
Fa0/36 on 802.1q trunking 1

Last edited by scheidel21; 01-22-2016 at 10:12 AM. Reason: Add additional info
 
Old 01-28-2016, 01:36 PM   #2
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Original Poster
Rep: Reputation: 100Reputation: 100
OK, well further testing revealed that the issue was the VLAN tagging of VLAN 1 as soon as I tagged the non native vlan it started working.
 
Old 01-28-2016, 03:07 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Good job and well done. Oh my!
 
  


Reply

Tags
cisco, network bridge, networking, tap adapter, vlan


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
iptables multiple interfaces same subnet to multiple vlan interfaces krobinson Linux - Server 3 04-22-2015 05:25 AM
KVM networking - using VLAN and Bridges on Debian/Ubuntu nicolasdiogo Linux - Virtualization and Cloud 10 05-13-2014 03:04 PM
same vlan on two different interfaces jagdip Solaris / OpenSolaris 9 02-11-2013 12:43 PM
iptables NAT and tun/tap interfaces j-osh Linux - Networking 0 06-30-2009 02:20 PM
Performance issue with VLAN + Bridge + TAP AFI Linux - Networking 3 08-14-2008 09:37 PM

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

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