LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-30-2009, 12:47 AM   #1
ashan
LQ Newbie
 
Registered: Apr 2007
Distribution: redhat, ubuntu
Posts: 8

Rep: Reputation: 0
VLAN trunk and loop


Hi, guys,

I am doing this to connect my home computer network to a VLANed network.

Code:
         eth0 |-------------| eth1         |---------|
ACC    =======| LinuxBox    |==============| Switch  |========PCs
              |_____________|              |_________|

I have the LINUX box with port eth0 and eth1. The setup is like follow:

1, eth0 connected to a network with three vlan: VID 1011, 1012, 1013
2, the eth1 is connected to my home network's switch-a soho switch without VLAN support

I'm tring to use the LinuxBox as a bridge to unTAG the VLAN thing, so I can use my pc to access the ACC network. I did the following but seems cause loop in the ACC end, any ideas?

Thanks,

-----------------------------------------------------------
#!/bin/sh

#eth0 and eth1 is in the bridge already
ifconfig br0 0.0.0.0
ifconfig eth0 192.168.2.10
brctl delif br0 eth0

# VLAN 1011
vconfig add eth0 1011
brctl addif br0 eth0.1011
ifconfig eth0.1011 0.0.0.0

#VLAN 1012
vconfig add eth0 1012
brctl addif br0 eth0.1012
ifconfig eth0.1012 0.0.0.0

#VLAN 1013
vconfig add eth0 1013
brctl addif br0 eth0.1013
ifconfig eth0.1013 0.0.0.0

# here we prevent 1013 data to be sent on the 1012 internet VLAN
ebtables -A FORWARD -i plc0.1013 -o plc0.1012 -j DROP

Last edited by acid_kewpie; 03-30-2009 at 05:23 AM.
 
Old 03-30-2009, 05:26 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
How / why are you bridging multiple vlan's? Either this doesn't make any sense or your network is hideously deformed and should be put out of its misery.
 
Old 03-31-2009, 12:45 AM   #3
ashan
LQ Newbie
 
Registered: Apr 2007
Distribution: redhat, ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

The VLAN thing coming from our data centre, there is not much we can do to change it. At the work location, we have one CAT5 cable in which is connected to eth0 of one of the computer. Other computers need to talk to all these three VLANs, so comes the posted diagram. That is: the linux box is used for attaching or removeing the tag to enable the access.

Thanks
 
Old 03-31-2009, 03:15 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
So these 3 vlans are the same subnet?? are you sure you shouldn't be routing???

And anyway, *if* you're causing a loop, then clearly they *ARE* connected already on L2 somewhere, so you only want one of them in the first place.

Last edited by acid_kewpie; 03-31-2009 at 03:27 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
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 02:51 AM
FreeBSD - need help making vlan for multi-port trunk.. BrianK *BSD 1 06-13-2006 01:48 PM
Asterisk@home - setting up a Trunk Mithrilhall Linux - Software 0 03-24-2006 12:37 PM
Linux VLAN Trunk? teamchachi Linux - Networking 1 07-28-2005 11:50 AM
trunk port in switch czezz Linux - Hardware 1 07-21-2005 02:34 AM

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

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