CN103634190B - A kind of method of the Ethernet interface data packet with VLAN ID - Google Patents
A kind of method of the Ethernet interface data packet with VLAN ID Download PDFInfo
- Publication number
- CN103634190B CN103634190B CN201310533785.4A CN201310533785A CN103634190B CN 103634190 B CN103634190 B CN 103634190B CN 201310533785 A CN201310533785 A CN 201310533785A CN 103634190 B CN103634190 B CN 103634190B
- Authority
- CN
- China
- Prior art keywords
- vlan
- data packet
- port
- kernel modules
- sent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A kind of method of the Ethernet interface data packet with VLAN ID.Step 1:Vlan information is arranged in application call VLAN application interface modules;Step 2:Vlan information is sent to VLAN kernel modules by the VLAN application interface modules;Step 3:The VLAN kernel modules judge whether source data packet port is allowing to set in the port list of VLAN;Step 4:If source data packet port is allowing to set in the port list of VLAN, VLAN ID are added in the data packet and are sent to trawl performance by the VLAN kernel modules.After the method for the present invention, Ethernet interface data packet band VLANID is realized by way of pure software, it is not need to rely on specific hardware platform, it can avoid different vendor that from must realizing functionality of vlan in such a way that register is set, with higher generally applicable property and portability, research and development of software speed can also be improved and reduce repetitive operation.
Description
Technical field
The present invention relates to router technology fields, more particularly to a kind of method of the Ethernet interface data packet with VLAN ID.
Background technology
Current numerous router vendors, in order to meet the different business demand of terminal device, it is sometimes necessary to Ethernet
Mouth takes different VLAN ID, and to distinguish different business, data packet is then uploaded to upper layer device.
Mode of the traditional ethernet mouth with VLAN ID is realized by the way that the register value of exchange chip is arranged, this side
Method depends on specific hardware, therefore does not have portable and reusability, when we need the chip in another money different manufacturers
When the upper demand for realizing Ethernet with VLAN ID, relevant databook must be just read again, could realize function.
Invention content
As stated in the background art, existing Ethernet interface band VLAN ID realize do not have portability dependent on particular hardware
And reusability.
Based on this, it is necessary to a kind of method of the Ethernet interface data packet with VLAN ID is provided, including:
Step 1:Vlan information is arranged in application call VLAN application interface modules;
Step 2:Vlan information is sent to VLAN kernel modules by the VLAN application interface modules;
Step 3:The VLAN kernel modules judge whether source data packet port is allowing to set in the port list of VLAN;
Step 4:If source data packet port is allowing to set in the port list of VLAN, the VLAN kernel modules are by VLAN
ID is added in the data packet and is sent to trawl performance.
Preferably, the vlan information includes VLAN ID, allows the port list for setting VLAN.
Preferably, further include:
If source data packet port is not allowing to set in the port list of VLAN, the VLAN kernel modules will directly count
It is sent to trawl performance according to packet.
Preferably, if the source data packet port is when allowing to set in the port list of VLAN, in the VLAN kernels mould
VLAN ID are added in the data packet and further include before being sent to trawl performance by block:
VLAN kernel modules judge whether source data packet port opens functionality of vlan;
If VLAN ID are added to the data by source data packet port open functionality of vlan, the VLAN kernel modules
In packet and it is sent to trawl performance.
Preferably, further include:
If source data packet port is not turned on functionality of vlan, the VLAN kernel modules directly deliver a packet to net
Card driving.
After the method for the present invention, Ethernet interface data packet band VLAN ID are realized by way of pure software, it need not be according to
Rely in specific hardware platform, can avoid different vendor that from must realizing functionality of vlan in such a way that register is set, have
Higher generally applicable property and portability can also improve research and development of software speed and reduce repetitive operation.
Description of the drawings
Fig. 1 is the flow chart of one embodiment provided by the invention.
Specific implementation mode
In order to make the objectives, technical solutions, and advantages of the present invention more clearly, with reference to the accompanying drawings and embodiments, to this
Invention is further described.It should be appreciated that described herein, specific examples are only used to explain the present invention, is not used to limit
The fixed present invention.
Refering to fig. 1, the Ethernet interface data packet of one embodiment provided by the invention is with the method for VLAN ID, including:
Vlan information is arranged in step S10, application call VLAN application interface modules;
Applied layer interface module(Proc file system interfaces)Mainly interface being provided to developer, vlan information is set,
Vlan information includes VLAN ID, allows the port list for setting VLAN.
Vlan information is sent to VLAN kernel modules by step S20, VLAN application interface module;
Vlan information, i.e. VLAN ID are allowed the port list for setting VLAN to be sent to VLAN by VLAN application interface modules
Kernel module.
Step S30, VLAN kernel module judges whether source data packet port is allowing to set in the port list of VLAN;
If source data packet port is not allowing to set in the port list of VLAN, VLAN kernel modules directly send out data packet
It is sent to trawl performance and skips to step S60.
Step S40 judges that VLAN kernel modules judge whether source data packet port opens functionality of vlan;
Even if in step s 30, source data packet port is allowing to set in the port list of VLAN, if data source port does not have
There is unlatching functionality of vlan, Ethernet interface band VLAN ID is not realized, to different to distinguish by different VLAN ID yet
Business demand, such as IPTV service.
If source data packet port is not turned on functionality of vlan, VLAN kernel modules directly deliver a packet to network interface card drive
It is dynamic to skip to step S60.
Step S50, if source data packet port is allowing to set in the port list of VLAN and data source port open
Functionality of vlan, then VLAN ID are added in data packet and are sent to trawl performance by VLAN kernel modules skips to step S60.
It will be appreciated, of course, that method of the Ethernet interface data packet with VLAN ID directly skips to the step by step S30, i.e.,
Do not judge whether data source port opens functionality of vlan by VLAN kernel modules.In the case of no step S40, i.e., by step
When rapid S30 jumps directly to the step, then step S50 is:If source data packet port is allowing to set in the port list of VLAN,
VLAN ID are added in data packet and are sent to trawl performance by VLAN kernel modules skips to step S60.At this moment, data source
Mouth is not turned on functionality of vlan, as long as source data packet port is allowing to set in the port list of VLAN, then VLAN kernel modules will
VLAN ID are added in data packet, since source data packet port is not turned on functionality of vlan, even if it is also on foot to increase VLAN ID
Labor can not distinguish different business demands by the VLAN ID.
Step S60, sends data packets to trawl performance.
No matter whether increasing VLAN ID in the packet in preceding step, trawl performance is all sent data to.Such as
Fruit source data packet port is allowing to set in the port list of VLAN and data source port open functionality of vlan, then is sent to net
Blocking in the data packet of driving and increases VLAN ID, user can distinguish different business demands by different VLAN ID,
Such as IPTV service.As long as one of them is ineligible by step S30 or step S40, data packet will not pass through VLAN kernels and exist
The step of increasing VLAN ID in data packet, directly delivers a packet to trawl performance.
After the method for the present invention, Ethernet interface data packet band VLAN ID are realized by way of pure software, it need not be according to
Rely in specific hardware platform, can avoid different vendor that from must realizing functionality of vlan in such a way that register is set, have
Higher generally applicable property and portability can also improve research and development of software speed and reduce repetitive operation.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
Cannot the limitation to the scope of the claims of the present invention therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (4)
1. a kind of method of the Ethernet interface data packet with VLAN ID, which is characterized in that including:
Step 1:Vlan information is arranged in application call VLAN application interface modules;
Step 2:The vlan information is sent to VLAN kernel modules by the VLAN application interface modules;
Step 3:The VLAN kernel modules judge whether source data packet port is allowing to set in the port list of VLAN;
Step 4:If the source data packet port is allowing to set in the port list of VLAN, the VLAN kernel modules are by VLAN
ID is added in the data packet and is sent to trawl performance;
The vlan information includes VLAN ID, allows the port list for setting VLAN.
2. method of the Ethernet interface data packet with VLAN ID according to claim 1, which is characterized in that further include:
If source data packet port is not allowing to set in the port list of VLAN, the VLAN kernel modules directly send out data packet
It is sent to trawl performance.
3. method of the Ethernet interface data packet with VLAN ID according to claim 1, which is characterized in that if the data
VLAN ID are added to the data packet by packet source port when allowing to set in the port list of VLAN, in the VLAN kernel modules
In and be sent to before trawl performance and further include:
VLAN kernel modules judge whether source data packet port opens functionality of vlan;
If VLAN ID are added in the data packet by source data packet port open functionality of vlan, the VLAN kernel modules
And it is sent to trawl performance.
4. method of the Ethernet interface data packet with VLAN ID according to claim 3, which is characterized in that further include:
If source data packet port is not turned on functionality of vlan, the VLAN kernel modules directly deliver a packet to network interface card drive
It is dynamic.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310533785.4A CN103634190B (en) | 2013-10-31 | 2013-10-31 | A kind of method of the Ethernet interface data packet with VLAN ID |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310533785.4A CN103634190B (en) | 2013-10-31 | 2013-10-31 | A kind of method of the Ethernet interface data packet with VLAN ID |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103634190A CN103634190A (en) | 2014-03-12 |
CN103634190B true CN103634190B (en) | 2018-09-28 |
Family
ID=50214836
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310533785.4A Active CN103634190B (en) | 2013-10-31 | 2013-10-31 | A kind of method of the Ethernet interface data packet with VLAN ID |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103634190B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1852218A (en) * | 2006-04-19 | 2006-10-25 | 华为技术有限公司 | Method for configurating VLANtag |
CN101127598A (en) * | 2006-08-18 | 2008-02-20 | 华为技术有限公司 | A method and system for 802.1x authentication in passive optical network |
CN101227477A (en) * | 2008-02-01 | 2008-07-23 | 中兴通讯股份有限公司 | Method for implementing subscriber terminal access authentication |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7624431B2 (en) * | 2003-12-04 | 2009-11-24 | Cisco Technology, Inc. | 802.1X authentication technique for shared media |
-
2013
- 2013-10-31 CN CN201310533785.4A patent/CN103634190B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1852218A (en) * | 2006-04-19 | 2006-10-25 | 华为技术有限公司 | Method for configurating VLANtag |
CN101127598A (en) * | 2006-08-18 | 2008-02-20 | 华为技术有限公司 | A method and system for 802.1x authentication in passive optical network |
CN101227477A (en) * | 2008-02-01 | 2008-07-23 | 中兴通讯股份有限公司 | Method for implementing subscriber terminal access authentication |
Also Published As
Publication number | Publication date |
---|---|
CN103634190A (en) | 2014-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11893409B2 (en) | Securing a managed forwarding element that operates within a data compute node | |
US11782868B2 (en) | Methods and systems to achieve multi-tenancy in RDMA over converged Ethernet | |
US11095758B2 (en) | Methods and apparatus for virtualized hardware optimizations for user space networking | |
US11196654B2 (en) | System for aggregating statistics associated with interfaces | |
CN113934660B (en) | Accelerating network packet processing | |
CN102255903B (en) | Safety isolation method for virtual network and physical network of cloud computing | |
TWI453624B (en) | Information security protection host | |
US8174984B2 (en) | Managing traffic on virtualized lanes between a network switch and a virtual machine | |
US20170111382A1 (en) | Technologies for distributed detection of security anomalies | |
CN103354530A (en) | Virtualization network boundary data flow gathering method and apparatus | |
CN109981403A (en) | Virtual machine network data traffic monitoring method and device | |
CN107070765A (en) | Virtual client end equipment | |
US20160261418A1 (en) | Power over ethernet (poe) powered network adapter incorporating open vswitch (ovs) and fabric attach (fa) capabilities | |
CN105141637A (en) | Transmission encryption method taking flows as granularity | |
US20180123914A1 (en) | Searchable Best Fit Abstraction Framework for Catalog Driven Service Delivery | |
CN106169048B (en) | File delet method, device and electronic equipment | |
CN103634190B (en) | A kind of method of the Ethernet interface data packet with VLAN ID | |
CN112887199A (en) | Gateway, cloud platform, configuration method and device thereof, and computer-readable storage medium | |
WO2017070965A1 (en) | Data processing method based on software defined network and related device | |
CN110099011A (en) | A kind of method and system of entity gateway accessing virtual home gateway | |
CN113453278B (en) | TCP packet segmentation packaging method based on 5G UPF and terminal | |
CN115022424A (en) | Virtual control method, system, equipment and medium for network card of hydroelectric LCU controller | |
Blanco et al. | One firmware to monitor’em all | |
CN113014507B (en) | Traffic processing method, device, system and computer readable storage medium | |
CN108268306A (en) | Virutal machine memory isolation technology based on internet |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201119 Address after: 221700 4-1-110-shop, Nanyuan new town, Fengxian County, Xuzhou City, Jiangsu Province Patentee after: Song Yixiao Address before: 201616 Shanghai city Songjiang District Guangfulin Road No. 4855 Building No. 90 big industry territory Patentee before: Phicomm (Shanghai) Co.,Ltd. |
|
TR01 | Transfer of patent right |