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: vlan-bounces@xxxxxxxxxxxxxxx [mailto:vlan-bounces@xxxxxxxxxxxxxxx]On Behalf Of Peter Stuge Sent: Monday, May 30, 2005 4:06 PM To: vlan@xxxxxxxxxxxxxxx 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 Vlan@xxxxxxxxxxxxxxx http://www.lanforge.com/mailman/listinfo/vlan