Fwd: Need some info on 802.1q layer interation with bridge in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
     Inline with my earlier mail below, I am able to extract some
info on the interaction with bridging and vlan module through
eb_tables...the module ebt_vlan.c
But still I have no clue about the earlier 2 points that I had
expalined below. Any pointers will be of great help.

Thanks,
Pranjal



---------- Forwarded message ----------
From: Pranjal Kumar Dutta <pranjalkumardutta@xxxxxxxxx>
Date: May 19, 2006 12:04 PM
Subject: Need some info on 802.1q layer interation with bridge in Linux
To: kernelnewbies@xxxxxxxxxxxx


Hi All,
            I need some clarifications on the vlan layer (802.1q) in
Linux Kernel.
I have the following problems in understanding the codes.

1. In linux 802.1q code a vlan is characterised as a generic
net_device. Every real net_device (Ethernet NICs e.g) has a vlan_group
attached to it to identify the port/ifs membership of vlans. A
vlan_group contains an array of pointers to all vlan_devices (in the
form of net_devices) to which the real device is member of. As per my
understanding goes here whenever a vlan is atatched to a interface
through

static struct net_device *register_vlan_device(const char *eth_IF_name,

unsigned short VLAN_ID)
Inside this function I could see that a new net_device is created for
the corresponding vlan attched to it. So that means a VLAN domain in
the box is NOT represented by a single net_device, rather it is
interface specific. Then how the vlan layer glues all the vlan_devices
(in the form of net_devices) for a particular vlan X into a domain?

2. My second question is the forwarding path in vlan, that is

int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
                       struct packet_type* ptype)
To me this function seems to be disconnected to the bridging module, because
there is another handler handle_bridge called by netif_receive_skb
that handles bridging. And the bridge handler has no consideration of
vlan_devices. I am utterly confused here on the issue that how both
the brdging and vlan modules interacts in MAC learning. Because the
br_fdb (MAC database per bridge) should have vlan specific learning
and brfdb_entry doesn't have any reference to vlans.

let's say I am making my Linux machine a Layer 2 switch with multiple
interfaces
as follows:

eth0 in vlan 10
eth1 in vlan 20
eth3 in vlan 10
eth4 in vlan 20

In the above configuration the box needs to bridged the packets
between eth0 and eth3. Similiarly between eth1 and eth4.

By looking at the code I am not able to find out how linux achives
this. I am sure I am missing something and need help/explanation on
how the bridging module and vlan modules interacts in linux. My kernel
is 2.6.15.6

Any other pointers of info will be very helpful.

Thanks in advance,
Pranjal

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux