CN102843296B - A kind of method that in local area network (LAN), designated terminal accelerates and router - Google Patents

A kind of method that in local area network (LAN), designated terminal accelerates and router Download PDF

Info

Publication number
CN102843296B
CN102843296B CN201210309667.0A CN201210309667A CN102843296B CN 102843296 B CN102843296 B CN 102843296B CN 201210309667 A CN201210309667 A CN 201210309667A CN 102843296 B CN102843296 B CN 102843296B
Authority
CN
China
Prior art keywords
bandwidth
terminal
setting terminal
lan
setting
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
Application number
CN201210309667.0A
Other languages
Chinese (zh)
Other versions
CN102843296A (en
Inventor
郑明明
黄双榜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN201210309667.0A priority Critical patent/CN102843296B/en
Publication of CN102843296A publication Critical patent/CN102843296A/en
Application granted granted Critical
Publication of CN102843296B publication Critical patent/CN102843296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides the method and router of specifying terminal network speed in a kind of local area network (LAN), the method arranges rule by the tc in iproute2, makes kernel provide the predetermined network bandwidth to ensure according to the IP that the rule of specifying is setting.There is in this router the device realizing the method.The present invention is in the router or hub of local area network (LAN), utilize the tc in iproute2 that rule is set, ensure that setting terminal IP exclusively enjoys fractional bandwidth, when overcoming current bandwidth shared by free terminals all in local area network (LAN) competition, the deficiency of crucial terminal needs can not be met.

Description

A kind of method that in local area network (LAN), designated terminal accelerates and router
Technical field
The present invention relates to local area network technology field, particularly in local area network (LAN) for ensureing that the emphasis network terminal sets the method for designated terminal network speed and have the router of the device realizing the method.
Background technology
At present, home broadband or office's online, operator forms an internal lan often by hub or router, the bandwidth that operator distributes to user is shared by terminals all in local area network (LAN), if when now having some critical terminals to need to ensure in local, when other terminal uses, can not ensure that crucial terminal has enough bandwidth, and make user use inconvenience.
Summary of the invention
The whole bandwidth distributing to local is all shared for solving the inner all terminals of current local, can not ensure that the crucial terminal in this local area network (LAN) can enjoy the deficiency of necessary bandwidth, a kind of method of specifying terminal network speed in local area network (LAN) is provided, the bandwidth shared by key terminal can be ensured in a local network by the method.
The present invention in order to the technical scheme completing its technical purpose and adopt is: method and the router of specifying terminal network speed in a kind of local area network (LAN), the method arranges rule by the tc in iproute2, make kernel provide the predetermined network bandwidth to ensure according to the IP that the rule of specifying is setting, specifically comprise the following steps:
The bandwidth reserved of this terminal is given in the IP address of A, acquisition actual total bandwidth, setting terminal and planned assignment;
B, set up root qdisc queue;
C, foundation classification:
1) root is classified, minimum bandwidth and maximum bandwidth is set to respectively actual total bandwidth;
2) the IP subclassification of setting terminal, arranges minimum bandwidth and maximum bandwidth is set to planned assignment respectively to the bandwidth reserved of this terminal and actual total bandwidth, and priority is highest;
3) other IP subclassification in local area network (LAN), arrange minimum bandwidth and maximum bandwidth be set to respectively 0 and actual total bandwidth deduct planned assignment to the bandwidth reserved of this setting terminal, priority is the priority lower than setting terminal;
D, set up the sfq queue of setting terminal IP subclassification;
E, flag data bag, mark the packet of setting terminal IP address;
F, set up filter for setting terminal IP.
The present invention also provides a kind of router realizing the method that designated terminal accelerates in above-mentioned local area network (LAN), and this router comprises: the tc realized in iproute2 arranges the device of rule; The device that the described tc realized in iproute2 arranges rule comprises:
The device of the bandwidth reserved of this terminal is given in the IP address of acquisition actual total bandwidth, setting terminal and planned assignment;
Set up the device of tc root qdisc queue;
Set up the device of classification, also comprise in the device of described foundation classification:,
What minimum bandwidth and maximum bandwidth are set to respectively actual total bandwidth sets up root sort module;
Arrange minimum bandwidth and maximum bandwidth and be set to planned assignment respectively to the bandwidth reserved of this terminal and actual total bandwidth, priority is the five-star module setting up the IP subclassification of setting terminal;
Arrange minimum bandwidth and maximum bandwidth be set to respectively 0 and actual total bandwidth deduct planned assignment to the bandwidth reserved of this setting terminal, priority be lower than setting terminal priority set up other IP subclassification in local area network (LAN);
Set up the sfq queue of tc setting terminal IP subclassification, to ensure the device of the bandwidth of IP;
Flag data bag, uses the device that the packet of iptables to setting terminal IP address marks;
For setting terminal IP sets up tc filter, to the device that the packet of mark filters.
The present invention, in the router of local area network (LAN), utilizes the tc in iproute2 to arrange rule, ensures that setting terminal IP exclusively enjoys fractional bandwidth, when overcoming current bandwidth shared by free terminals all in local area network (LAN) competition, can not meet the deficiency of crucial terminal needs.
Below by with specific embodiments and the drawings, the present invention is further detailed.
Accompanying drawing explanation
Accompanying drawing 1 is the embodiment of the present invention 1 flow chart.
Embodiment
As shown in Figure 1, the present embodiment arranges rule by the tc in iproute2, makes kernel provide the predetermined network bandwidth to ensure according to the terminal IP (trust ip) that the rule of specifying is setting.
Take percentage according to the bandwidth total value arranged and trust ip, the minimum bandwidth arranging trust ip is that bandwidth total value is multiplied by and takies percentage, and maximum bandwidth is WAN mouth physics maximum rate; The maximum value bandwidth arranging non-trust ip is the minimum bandwidth that actual total bandwidth deducts trust ip, and minimum bandwidth is 60Kbps.Can ensure that the speed of trust ip can reach physics maximum rate like this, be unlikely to again other IP without flow.Flow chart is as shown in Figure 1:
1. obtain actual bandwidth (being assumed to be CKbps), trust ip(be assumed to be 192.168.1.99), reserved bandwidth (being assumed to be A Kbps, A<C)
2. set up root qdisc queue
tc qdisc add dev br0 root handle 1: htb default 21
3. set up classification
1) root classification, arranging minimum-rate is 100Mbit, and maximum rate is 100Mbit:
tc class add dev br0 parent 1: classid 1:1 htb rate 102400Kbit ceil 102400Kbit
2) Trust ip subclassification, arranging minimum-rate is user defined value A, and maximum rate is 100Mbit, and priority is the highest: tc class add dev br0 parent 1:1 classid 1:11 htb rate A ceil 102400Kbit prio 0
3) non-trust ip subclassification, arranging minimum-rate is 600Kbit, maximum rate is (C-A), and priority is slightly low: tc class add dev br0 parent 1:1 classid 1:21 htb rate 600Kbit ceil (C-A) prio 1
4. set up the sfq queue of trust ip subclassification.
tc qdisc add dev br0 parent 1:11 handle 11: sfq perturb 10
5. flag data bag.
iptables -t mangle -A POSTROUTING -m iprange --dst-range 192.168.1.99-192.168.1.99 -j MARK_and_DSCP --set-mark 0x65 --set-dscp 0x1
6. for trust ip sets up filter.
tc filter add dev br0 parent 1: protocol all handle 0x65 fw classid 1:11
Implementation effect
(total bandwidth is that 12Mbps, trust ip retains 6Mbps, uses same downloaded resources)
1. open before accelerating function
PC numbers 1 2 3 4
IP address 192.168.1.2 192.168.1.4 192.168.1.3 192.168.1.5
Trust ip No Be No No
Speed 4Mbps 2Mbps 3Mbps 2Mbps
Can find out from the graph before not opening acceleration function, there is no obvious strengths and weaknesses between 4 computers below router, namely belong to free competition state.
2. open after accelerating function
PC numbers 1 2 3 4
IP address 192.168.1.2 192.168.1.4 192.168.1.3 192.168.1.5
Trust ip No Be No No
Speed 1Mbps 8Mbps 1.2Mbps 0.3Mbps
After opening the acceleration function for specific IP, the speed of trust ip significantly improves.

Claims (2)

1. the method that in local area network (LAN), designated terminal accelerates, is characterized in that: the method arranges rule by the tc in iproute2, makes kernel provide the predetermined network bandwidth to ensure according to the IP that the rule of specifying is setting, specifically comprises the following steps:
The bandwidth reserved of this terminal is given in the IP address of A, acquisition actual total bandwidth, setting terminal and planned assignment;
B, set up tc root qdisc queue;
C, foundation classification:
1) root classification, is set to actual total bandwidth respectively by minimum bandwidth and maximum bandwidth;
2) the IP subclassification of setting terminal, arranges minimum bandwidth and maximum bandwidth is set to planned assignment respectively to the bandwidth reserved of this terminal and actual total bandwidth, and priority is highest;
3) other IP subclassification in local area network (LAN), arranges minimum bandwidth and maximum bandwidth is set to 600kbit respectively and actual total bandwidth deducts planned assignment to the bandwidth reserved of this setting terminal, and priority is the priority lower than setting terminal;
D, set up the sfq queue of tc setting terminal IP subclassification, to ensure the bandwidth of IP;
E, flag data bag, use the packet of iptables to setting terminal IP address to mark;
F, set up tc filter for setting terminal IP, the packet of mark is filtered.
2. the router of method that in local area network (LAN) according to claim 1, designated terminal accelerates, is characterized in that: described router comprises: the tc realized in iproute2 arranges the device of rule; The device that the described tc realized in iproute2 arranges rule comprises:
The device of the bandwidth reserved of this terminal is given in the IP address of acquisition actual total bandwidth, setting terminal and planned assignment;
Set up the device of tc root qdisc queue;
Set up the device of classification, also comprise in the device of described foundation classification:
What minimum bandwidth and maximum bandwidth are set to respectively actual total bandwidth sets up root sort module;
Arrange minimum bandwidth and maximum bandwidth and be set to planned assignment respectively to the bandwidth reserved of this terminal and actual total bandwidth, priority is the five-star module setting up the IP subclassification of setting terminal;
Minimum bandwidth and maximum bandwidth are set and are set to 600kbit respectively and actual total bandwidth deducts planned assignment to the bandwidth reserved of this setting terminal, priority be lower than setting terminal priority set up other IP subclassification in local area network (LAN);
Set up the sfq queue of tc setting terminal IP subclassification, to ensure the device of the bandwidth of IP;
Flag data bag, uses the device that the packet of iptables to setting terminal IP address marks;
For setting terminal IP sets up tc filter, to the device that the packet of mark filters.
CN201210309667.0A 2012-08-28 2012-08-28 A kind of method that in local area network (LAN), designated terminal accelerates and router Active CN102843296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210309667.0A CN102843296B (en) 2012-08-28 2012-08-28 A kind of method that in local area network (LAN), designated terminal accelerates and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210309667.0A CN102843296B (en) 2012-08-28 2012-08-28 A kind of method that in local area network (LAN), designated terminal accelerates and router

Publications (2)

Publication Number Publication Date
CN102843296A CN102843296A (en) 2012-12-26
CN102843296B true CN102843296B (en) 2015-08-26

Family

ID=47370369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210309667.0A Active CN102843296B (en) 2012-08-28 2012-08-28 A kind of method that in local area network (LAN), designated terminal accelerates and router

Country Status (1)

Country Link
CN (1) CN102843296B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245464A (en) * 2015-08-27 2016-01-13 北京华夏创新科技有限公司 Network acceleration method based on Android system
CN105915470B (en) * 2016-01-27 2019-05-21 无锡华云数据技术服务有限公司 A kind of elastic bandwidth configuration method based on Linux flow control

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960342A (en) * 2006-11-29 2007-05-09 杭州华为三康技术有限公司 Method for putting apart a bandwidth in advance, and equipment for implementing bandwidth put apart in advance
CN101127721A (en) * 2007-09-13 2008-02-20 杭州华三通信技术有限公司 Bandwidth control method and bandwidth control device
CN101599908A (en) * 2009-07-15 2009-12-09 杭州华三通信技术有限公司 A kind of auto-allocation method of bandwidth and equipment
CN101656662A (en) * 2008-08-22 2010-02-24 中国电信股份有限公司 Method and system for allocating network resources

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7460558B2 (en) * 2004-12-16 2008-12-02 International Business Machines Corporation System and method for connection capacity reassignment in a multi-tier data processing system network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960342A (en) * 2006-11-29 2007-05-09 杭州华为三康技术有限公司 Method for putting apart a bandwidth in advance, and equipment for implementing bandwidth put apart in advance
CN101127721A (en) * 2007-09-13 2008-02-20 杭州华三通信技术有限公司 Bandwidth control method and bandwidth control device
CN101656662A (en) * 2008-08-22 2010-02-24 中国电信股份有限公司 Method and system for allocating network resources
CN101599908A (en) * 2009-07-15 2009-12-09 杭州华三通信技术有限公司 A kind of auto-allocation method of bandwidth and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Linux2.4下的带宽(流量)控制功能;姚伯威 等;《计算机应用》;20010831;第21卷(第8期);第16-18页 *
基于Linux系统TC框架的带宽控制研究与在校园网中的应用;郭献力;《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》;20041215(第4期);摘要、第一章、第三章、第五章第1-3节 *

Also Published As

Publication number Publication date
CN102843296A (en) 2012-12-26

Similar Documents

Publication Publication Date Title
CN106961741B (en) A kind of uplink resource allocating method and device
US9294401B2 (en) Method and apparatus for data transfer in a peer-to-peer network
US8705363B2 (en) Packet scheduling method and apparatus
Gong et al. Fighting the bufferbloat: on the coexistence of AQM and low priority congestion control
CN104067588B (en) The system and method that network control is detected for business
US20150312801A1 (en) Mobile service routing in a network environment
CN109511169A (en) A kind of acquisition methods, device and system controlling resource collection
CN102469020A (en) Business control method and system, evolution base station, gateway of packet data network
CN109981488B (en) Scheduling method and device
US20150319092A1 (en) CONTENT AWARE WI-FI QoS
CN102711181B (en) A kind of mobile terminal utilizes multilink to realize the method for network shunt
CN101064637A (en) Method for guaranteeing quality of service of operation maintenance data stream
CN102843296B (en) A kind of method that in local area network (LAN), designated terminal accelerates and router
CN102802206A (en) Offload method and offload network element for wireless local area network (WLAN)
CN103701713A (en) QoS (Quality of Service) scheduling method based on WIFI (Wireless Fidelity) password of AP (Access Point) router
CN105745874B (en) Method and device for determining service function path
WO2017063511A1 (en) Sdn-based residential cell network control system
WO2022068244A1 (en) Network configuration sending method and apparatus, storage medium, and electronic device
Nakao et al. Application and device specific slicing for MVNO
CN103297312B (en) The cut-in method of a kind of MPLS VPN and device
CN103581046A (en) Method and device for achieving control of gateway service quality
CN102769922A (en) Service scheduling method in wireless communication system
CN107659514A (en) A kind of accelerated method applied under WiFi
CN104283812B (en) A kind of method and system for identifying user&#39;s access bandwidth
Huang et al. Bandwidth distribution for applications in slicing network toward SDN on vCPE framework

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant