LinuxQuestions.org
Review your favorite Linux distribution.
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 04-15-2005, 08:19 AM   #1
syl20
Member
 
Registered: Aug 2003
Posts: 65

Rep: Reputation: 15
VLANs on my slackware box.


Hi,
I've got a network in a single range of IP address (192.168.3.0/24) and I will create 5 vlan (I've got switches 3Com 4400).
Every PC use my gw (192.168.3.1) to reach the Internet.
How can my gw become the Vlan manager, to route traffic between different vlans?
Has anybody an experience in this domain?
For interested people, this link seems to be helpfull http://marc.theaimsgroup.com/?m=105098558615614

I read that I have to patch the kernel and use vconfig, but it seems that the module is experimental.

Last question : is it possible that one of the both network card can make troubles (unable to read tagged ip traffic for example)?

Thx
 
Old 04-16-2005, 02:33 AM   #2
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 16
my experience with vconfig and 2.4.14 -> 2.6.x kernels has been all good and highly stable, and looks like the 3Com 4400's support port based 802.1q so you should have no problems setting this up - infact it's almost too easy
 
Old 04-16-2005, 06:36 AM   #3
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

when you'll configure vlans, they will be considered by Linux as logical interfaces. Then enabling forwarding (echo 1 > /proc/sys/net/ipv4/ip_forward) will automatically enable routing between vlans. Last step using iptables to limit the different access.
 
Old 04-18-2005, 01:50 AM   #4
syl20
Member
 
Registered: Aug 2003
Posts: 65

Original Poster
Rep: Reputation: 15
Hi angrybeaver & fr_laz,
thx for u answers.
I will recompile my kernel and install these vlans.
I will create virtual interfaces for each vlan on my gw, but which IP@ have I to give to my eth0? (an IP @ of the vlan servers in which is gw?)
Has anybody info about this :
Is it possible that a network card can make troubles (unable to read tagged ip traffic for example)? Or : Can any network card be uncompatible with 8021Q?
 
Old 04-18-2005, 02:50 AM   #5
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

as for eth0 config, you can do a ifconfig eth0 0.0.0.0, which will set up eth0 without giving it an IP... that's ok in your case since you'll use only the virtual interfaces.
as for hardaware that wouldn't support 802.1Q, I just don't know
 
Old 04-18-2005, 06:43 AM   #6
syl20
Member
 
Registered: Aug 2003
Posts: 65

Original Poster
Rep: Reputation: 15
Some questions :
eth0 0.0.0.0 with which netmask?
Can it be a hole of security?

I use slackware 10.0 (unofficial version because Serial ATA is supported on it) with kernel 2.4.26.
The last slackware is based on 2.4.29.
Do you think I should recompile my kernel (2.4.26), compile with 2.4.29 or compile with the last kernel from kernel.org (2.6.11.7)?
 
Old 04-18-2005, 08:27 AM   #7
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 875

Rep: Reputation: 184Reputation: 184
I've had a play with this and it works fine (on SUSE 9.0 at least).

Remember that 802.1q has what is known as a "native vlan" which is _not_ tagged. So basically your eth0 ip address represents the untagged or native vlan and anything that you shove into a sub-interface comes out tagged with the .x number.

Also don't forget that as the native vlan is untagged each device will be configured locally for what it thinks is the native vlan. By default they will all probably be vlan 0 but if you change one device remember to change em all or you will get very confused at a later date
 
Old 04-20-2005, 02:33 AM   #8
syl20
Member
 
Registered: Aug 2003
Posts: 65

Original Poster
Rep: Reputation: 15
I use kernel 2.4.26 and I saw that 8021Q was compiled as a module.
I just have to download vconfig with :
- export CVSROOT=server:anonymous@ns1.wanfear.com:/home/cvs/vlan
- cvs login (PASSWORD: anonymous)
- mkdir vlan; cd vlan; cvs -z3 checkout vlan
-modprobe 8021Q

and I use vconfig. That's only what I have to do?
 
Old 04-20-2005, 04:07 AM   #9
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

ifconfig eth0 0.0.0.0 will just deconfigure the IP on eth0, it doesn't need a netmask.
This wont disable you to use the eth0 on the network (but not eth0.x of course).

I think you did all things that you needed...

baldy3105 :
You're right if only the Linux box manages Vlans... but if they're defined on a switch, then the ethernet frames are tagged when they enter one of the switch's interfaces, and so one doesn't have to know in which vlan his workstation is.
 
Old 04-20-2005, 04:42 AM   #10
syl20
Member
 
Registered: Aug 2003
Posts: 65

Original Poster
Rep: Reputation: 15
I use 3COM 4400 on which I assign Vlan/port.
Ports of Vlan are untagged except for port on which my gw is connected to (one tag per vlan on the same port)
So traffic is tagged when it comes in gw, but not tagged for PCs on the same vlan.

I download, thx to cvs, last candelatech package for vlan, I just type 'make' and I get an error when trying to compile macvlan_config.c. It comes from the if_macvlan.h which is not found (on /root/linux/include by default, and with 'locate' no more if_macvlan.h was found)
Does anybody get this error? I found nothing interesting on google.

It's not really a pbl because vconfig is now OK, but I don't like get errors when compiling...
 
Old 04-20-2005, 09:59 AM   #11
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 875

Rep: Reputation: 184Reputation: 184
fr_laz , what you are talking about is implicit tagging associated with a member port, which is not what you want here.

If you are running tagged interfaces on your linux box then the switch interface you connect to must be configured to be an 802.1q trunk.

If you leave it as a member port then any tagged packets you send the port will be discarded as errors and only the native untagged traffic you send will be accepted and then implicitly tagged by the switch as being in the vlan the port is a member of.
 
Old 09-24-2006, 01:26 PM   #12
amateen
LQ Newbie
 
Registered: Dec 2004
Posts: 16

Rep: Reputation: 0
salam,
I am getting strange results can anybody tell me My eth0.0 is not receving anything though I have enabled ip forwarding with
echo 1>/proc/sys/net/ipv4/ip_forward.
can anybody explain to me.
 
  


Reply

Tags
slackware, 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
Inetrnet connection sharing between a Slackware box and windows box planetsheinker Slackware 10 09-23-2006 11:53 PM
Arpwatch across VLANS? TotalDefiance Linux - Software 0 09-15-2005 10:19 AM
Filtering Bridge with VLANs whirlpool78 Linux - Networking 6 02-22-2005 07:51 AM
creation of vlans Kike Linux - Networking 2 04-15-2004 02:12 AM
DHCP, VLANs and Linux cestor Linux - Networking 5 06-02-2002 03:19 PM


All times are GMT -5. The time now is 06:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration