RE: vlan device & driver level study material

"sameer" <[email protected]>
Newsgroups gmane.linux.drivers.vlan
Message-ID <001a01c56508$9ad0dc10$7f2c7aa3@SameerDnD>
Hi,

Can someone suggest me links to device and driver level study
material(similar to that given below) for VLANs. Whatever I have searched so
far fetched me only material at concept level.

Thanks
Sameer

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Peter Stuge
Sent: Monday, May 30, 2005 4:06 PM
To: [email protected]
Subject: Re: [VLAN] vlans in socket progrmaming


Hi Stefan,

On Mon, May 30, 2005 at 10:37:56AM +0200, Stefan Linecker wrote:
> i'm searching for a code-snippet/faq/tutorial showing basic vlan
> things in socket programming, especially how to set and get the
> vlan-id in network packets.
>
> anybody out who can help? any hints welcome.

VLAN tags are assigned by the kernel depending on which interface
packets are sent out on. So the normal rules for routing applies even
with VLAN interfaces.

The vconfig administrative tool adds VLAN interfaces "onto" an
existing interface, either physical or virtual. (ie. eth0 and br0
both work as the "base" interface) The new interfaces are named like
eth0.4 by default, where 4 is the VLAN number as specified when
running vconfig.

Then, a network address is assigned to eth0.4, and when an
application bind():s to this address or if the default route is
through the eth0.4 interface, a VLAN tag of 4 is added to outgoing
packets by the kernel.

If you really want to construct VLAN packets in user-space you'll
need to use a raw socket and do all of the protocols on your own.


//Peter
_______________________________________________
Vlan mailing list
[email protected]
http://www.lanforge.com/mailman/listinfo/vlan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.