Ask your boss, younger brother, who has just started to access the kernel. Now he is looking at the implementation of VLAN in Linux.

Source: Internet
Author: User
Tags cisco switch

Ask your boss, younger brother, who has just started to access the kernel. Now he is looking at the implementation of VLAN in Linux.

1. Where can I find information about VLAN implementation?
All the information I have here is about bridge. I have little knowledge about VLAN. Can anyone with information share it? Thank you :)

2. Relationship between VLAN and bridge implementation
I understand that we should first run vlan_skb_recv () and then send it to the bridge or IP layer for processing. But in kernel 2.6.16.20, [size = 10.5pt] netif_receive_skb () [/size] First runs handle_bridge (),
When is the VLAN checked?

3. Cross-VLAN implementation
Is cross-VLAN implementation in Linux combined with cross-bridge implementation? For layer-3 switching, you should configure an IP address in vlanif (VSI) and index the IP address to the output interface VLAN.
But these operations are not seen in the Code. How does Linux implement layer-3 switching? Is it related to br_pass_frame_up () of bridge?

Let's discuss it together. Thank you!

Qtdszws
It seems that you think of Linux as an operating system in a Cisco switch. Linux cannot afford it.

> 1. Where can I find information about VLAN implementation?

Isn't the Code already given?

> 2. Relationship between VLAN and bridge implementation

In net_rx

> 3. Cross-VLAN implementation

Not Implemented

 

 

Implementation of VLAN in Linux
In Linux, VLAN implementation is very simple, that is, the VLAN package into vlan_skb_recv attempts to break down to the corresponding ethx. in the y device (if the corresponding VLAN device is not found, packet loss occurs), then let SKB-> Dev point to the VLAN device, and finally call netif_rx.

 

 

 

Bridge and VLAN config Tool
Bridge config tool: bridge-utils
Http://www.linux-foundation.org/en/Net:Bridge
 
VLAN config tool: vconfig
Http://www.candelatech.com /~ Greear/VLAN

 

Http://wenhsuanhack.spaces.live.com/blog/cns! C4f9ed7d9a48c253! 196. Entry

 

Http://www.huihoo.org/joyfire.net/8-1.html#Content

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.