Ó²ÅÌÊý¾Ý»Ö¸´µ¼º½
RAIDÊý¾Ý»Ö¸´µ¼º½
 | ÍøÕ¾Ê×Ò³ | Êý¾Ý»Ö¸´×ÊÁÏ | Êý¾Ý»Ö¸´Èí¼þ | ×ÉѯÁôÑÔ | Êý¾Ý»Ö¸´²©¿Í | Êý¾Ý»Ö¸´ÂÛ̳ | 
Êý¾Ý»Ö¸´Èí¼þÏÂÔØ
¹«Ë¾¼ò½é Êý¾Ý»Ö¸´³É¹¦°¸Àý Êý¾Ý»Ö¸´±¨¼Û Êý¾Ý»Ö¸´Åàѵ Êý¾Ý»Ö¸´¼¼ÊõÎÄÕ Êý¾Ý»Ö¸´¿Í·þÖÐÐÄ Êý¾Ý»Ö¸´·þÎñÁªÏµ·½Ê½
ÄúÏÖÔÚµÄλÖ㺠±±ÑÇÊý¾Ý»Ö¸´¼¼ÊõÕ¾ >> Êý¾Ý»Ö¸´×ÊÁÏ >> Ïà¹Ø±à³Ì×ÊÁÏ >> ÎÄÕÂÕýÎÄ
ÔÚLINUXÖÐʵÏÖÁ÷Á¿¿ØÖÆÆ÷            ¡¾×ÖÌ壺С ´ó¡¿
ÔÚLINUXÖÐʵÏÖÁ÷Á¿¿ØÖÆÆ÷
×÷ÕߣºÎ´Öª    ÎÄÕÂÀ´Ô´£ºÍøÂç    µã»÷Êý£º    ¸üÐÂʱ¼ä£º2009-5-21
Linux´Ókernel 2.1.105¿ªÊ¼Ö§³ÖQOS£¬²»¹ý£¬ÐèÒªÖØбàÒëÄںˡ£ÔËÐÐ 'make config'ʱ½« EXPERIMENTAL¡¡_OPTIONS ÉèÖÃ³É 'y'£¬²¢ÇÒ½« Class Based Queueing (CBQ), Token Bucket Flow, Traffic Shapers ÉèÖÃΪ 'y' £¬ÔËÐÐ 'make dep; make clean; make bzilo'£¬Éú³ÉеÄÄںˡ£
¡¡¡¡ÔÚLinux²Ù×÷ϵͳÖÐÁ÷Á¿¿ØÖÆÆ÷(TC)Ö÷ÒªÊÇÔÚÊä³ö¶Ë¿Ú´¦½¨Á¢Ò»¸ö¶ÓÁнøÐÐÁ÷Á¿¿ØÖÆ£¬¿ØÖƵķ½Ê½ÊÇ»ùÓÚ·ÓÉ£¬Ò༴»ùÓÚÄ¿µÄIPµØÖ·»òÄ¿µÄ×ÓÍøµÄÍøÂçºÅµÄÁ÷Á¿¿ØÖÆ¡£Á÷Á¿¿ØÖÆÆ÷TC£¬Æä»ù±¾µÄ¹¦ÄÜÄ£¿éΪ¶ÓÁС¢·ÖÀàºÍ¹ýÂËÆ÷¡£LinuxÄÚºËÖÐÖ§³ÖµÄ¶ÓÁÐÓУ¬Class Based Queue £¬Token Bucket Flow £¬CSZ £¬First In First Out £¬Priority £¬TEQL £¬SFQ £¬ATM £¬RED¡£ÕâÀïÎÒÃÇÌÖÂ۵ĶÓÁÐÓë·ÖÀ඼ÊÇ»ùÓÚCBQ(Class Based Queue)µÄ£¬¶ø¹ýÂËÆ÷ÊÇ»ùÓÚ·ÓÉ(Route)µÄ¡£
¡¡¡¡ÅäÖúÍʹÓÃÁ÷Á¿¿ØÖÆÆ÷TC£¬Ö÷Òª·ÖÒÔϼ¸¸ö·½Ã棺·Ö±ðΪ½¨Á¢¶ÓÁС¢½¨Á¢·ÖÀà¡¢½¨Á¢¹ýÂËÆ÷ºÍ½¨Á¢Â·ÓÉ£¬ÁíÍ⻹ÐèÒª¶ÔÏÖÓеĶÓÁС¢·ÖÀà¡¢¹ýÂËÆ÷ºÍ·ÓɽøÐмàÊÓ¡£

¡¡¡¡Æä»ù±¾Ê¹Óò½ÖèΪ£º
¡¡¡¡1) Õë¶ÔÍøÂçÎïÀíÉ豸(ÈçÒÔÌ«Íø¿¨eth0)°ó¶¨Ò»¸öCBQ¶ÓÁУ»
¡¡¡¡2) ÔڸöÓÁÐÉϽ¨Á¢·ÖÀࣻ
¡¡¡¡3) Ϊÿһ·ÖÀཨÁ¢Ò»¸ö»ùÓÚ·ÓɵĹýÂËÆ÷£»
¡¡¡¡4) ×îºóÓë¹ýÂËÆ÷ÏàÅäºÏ£¬½¨Á¢Ìض¨µÄ·ÓÉ±í¡£

ÏȼÙÉèÒ»¸ö¼òµ¥µÄ»·¾³£¬ÈçÏÂͼËùʾ£º

¡¡¡¡



¡¡¡¡Á÷Á¿¿ØÖÆÆ÷ÉϵÄÒÔÌ«Íø¿¨(eth0) µÄIPµØַΪ192.168.1.66£¬ÔÚÆäÉϽ¨Á¢Ò»¸öCBQ¶ÓÁС£¼ÙÉè°üµÄƽ¾ù´óСΪ1000×Ö½Ú£¬°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬¿É½ÓÊÕ³åÍ»µÄ·¢ËÍ×°üÊýĿΪ20×Ö½Ú¡£
¡¡¡¡¼ÙÈçÓÐÈýÖÖÀàÐ͵ÄÁ÷Á¿ÐèÒª¿ØÖÆ:
¡¡¡¡1) ÊÇ·¢ÍùÖ÷»ú1µÄ£¬ÆäIPµØַΪ192.168.1.24¡£ÆäÁ÷Á¿´ø¿í¿ØÖÆÔÚ8Mbit£¬ÓÅÏȼ¶Îª2£»
¡¡¡¡2) ÊÇ·¢ÍùÖ÷»ú2µÄ£¬ÆäIPµØַΪ192.168.1.26¡£ÆäÁ÷Á¿´ø¿í¿ØÖÆÔÚ1Mbit£¬ÓÅÏȼ¶Îª1£»
¡¡¡¡3) ÊÇ·¢Íù×ÓÍø1µÄ£¬Æä×ÓÍøºÅΪ192.168.1.0£¬×ÓÍøÑÚÂëΪ255.255.255.0¡£Á÷Á¿´ø¿í¿ØÖÆÔÚ1Mbit£¬ÓÅÏȼ¶Îª6¡£

1. ½¨Á¢¶ÓÁÐ
¡¡¡¡Ò»°ãÇé¿öÏ£¬Õë¶ÔÒ»¸öÍø¿¨Ö»Ð轨Á¢Ò»¸ö¶ÓÁС£

¡¡¡¡½«Ò»¸öcbq¶ÓÁа󶨵½ÍøÂçÎïÀíÉ豸eth0ÉÏ£¬Æä±àºÅΪ1:0£»ÍøÂçÎïÀíÉ豸eth0µÄʵ¼Ê´ø¿íΪ10 Mbit£¬°üµÄƽ¾ù´óСΪ1000×Ö½Ú£»°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬×îС´«Êä°ü´óСΪ64×Ö½Ú¡£
¡¡¡¡¡¤tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit avpkt 1000 cell 8 mpu 64

2. ½¨Á¢·ÖÀà
¡¡¡¡·ÖÀཨÁ¢ÔÚ¶ÓÁÐÖ®ÉÏ¡£Ò»°ãÇé¿öÏ£¬Õë¶ÔÒ»¸ö¶ÓÁÐÐ轨Á¢Ò»¸ö¸ù·ÖÀ࣬ȻºóÔÙÔÚÆäÉϽ¨Á¢×Ó·ÖÀà¡£¶ÔÓÚ·ÖÀ࣬°´Æä·ÖÀàµÄ±àºÅ˳ÐòÆð×÷Ó㬱àºÅСµÄÓÅÏÈ£»Ò»µ©·ûºÏij¸ö·ÖÀàÆ¥Åä¹æÔò£¬Í¨¹ý¸Ã·ÖÀà·¢ËÍÊý¾Ý°ü£¬ÔòÆäºóµÄ·ÖÀ಻ÔÙÆð×÷Óá£

1£© ´´½¨¸ù·ÖÀà1:1£»·ÖÅä´ø¿íΪ10Mbit£¬ÓÅÏȼ¶±ðΪ8¡£
¡¤tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit maxburst 20 allot 1514 prio 8 avpkt 1000 cell 8 weight 1Mbit

¡¡¡¡¸Ã¶ÓÁеÄ×î´ó¿ÉÓôø¿íΪ10Mbit£¬Êµ¼Ê·ÖÅäµÄ´ø¿íΪ10Mbit£¬¿É½ÓÊÕ³åÍ»µÄ·¢ËÍ×°üÊýĿΪ20×Ö½Ú£»×î´ó´«Êäµ¥Ôª¼ÓMACÍ·µÄ´óСΪ1514×Ö½Ú£¬ÓÅÏȼ¶±ðΪ8£¬°üµÄƽ¾ù´óСΪ1000×Ö½Ú£¬°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬ÏàÓ¦ÓÚʵ¼Ê´ø¿íµÄ¼ÓȨËÙÂÊΪ1Mbit¡£

2£©´´½¨·ÖÀà1:2£¬Æ丸·ÖÀàΪ1:1£¬·ÖÅä´ø¿íΪ8Mbit£¬ÓÅÏȼ¶±ðΪ2¡£
¡¤tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 8Mbit maxburst 20 allot 1514 prio 2 avpkt 1000 cell 8 weight 800Kbit split 1:0 bounded

¡¡¡¡¸Ã¶ÓÁеÄ×î´ó¿ÉÓôø¿íΪ10Mbit£¬Êµ¼Ê·ÖÅäµÄ´ø¿íΪ 8Mbit£¬¿É½ÓÊÕ³åÍ»µÄ·¢ËÍ×°üÊýĿΪ20×Ö½Ú£»×î´ó´«Êäµ¥Ôª¼ÓMACÍ·µÄ´óСΪ1514×Ö½Ú£¬ÓÅÏȼ¶±ðΪ1£¬°üµÄƽ¾ù´óСΪ1000×Ö½Ú£¬°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬ÏàÓ¦ÓÚʵ¼Ê´ø¿íµÄ¼ÓȨËÙÂÊΪ800Kbit£¬·ÖÀàµÄ·ÖÀëµãΪ1:0£¬ÇÒ²»¿É½èÓÃδʹÓôø¿í¡£

3£©´´½¨·ÖÀà1:3£¬Æ丸·ÖÀàΪ1:1£¬·ÖÅä´ø¿íΪ1Mbit£¬ÓÅÏȼ¶±ðΪ1¡£
¡¤tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 1Mbit maxburst 20 allot 1514 prio 1 avpkt 1000 cell 8 weight 100Kbit split 1:0

¡¡¡¡¸Ã¶ÓÁеÄ×î´ó¿ÉÓôø¿íΪ10Mbit£¬Êµ¼Ê·ÖÅäµÄ´ø¿íΪ 1Mbit£¬¿É½ÓÊÕ³åÍ»µÄ·¢ËÍ×°üÊýĿΪ20×Ö½Ú£»×î´ó´«Êäµ¥Ôª¼ÓMACÍ·µÄ´óСΪ1514×Ö½Ú£¬ÓÅÏȼ¶±ðΪ2£¬°üµÄƽ¾ù´óСΪ1000×Ö½Ú£¬°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬ÏàÓ¦ÓÚʵ¼Ê´ø¿íµÄ¼ÓȨËÙÂÊΪ100Kbit£¬·ÖÀàµÄ·ÖÀëµãΪ1:0¡£

4£©´´½¨·ÖÀà1:4£¬Æ丸·ÖÀàΪ1:1£¬·ÖÅä´ø¿íΪ1Mbit£¬ÓÅÏȼ¶±ðΪ6¡£
¡¤tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 10Mbit rate 1Mbit maxburst 20 allot 1514 prio 6 avpkt 1000 cell 8 weight 100Kbit split 1:0

¡¡¡¡¸Ã¶ÓÁеÄ×î´ó¿ÉÓôø¿íΪ10Mbit£¬Êµ¼Ê·ÖÅäµÄ´ø¿íΪ 64Kbit£¬¿É½ÓÊÕ³åÍ»µÄ·¢ËÍ×°üÊýĿΪ20×Ö½Ú£»×î´ó´«Êäµ¥Ôª¼ÓMACÍ·µÄ´óСΪ1514×Ö½Ú£¬ÓÅÏȼ¶±ðΪ1£¬°üµÄƽ¾ù´óСΪ1000×Ö½Ú£¬°ü¼ä¸ô·¢Ë͵¥ÔªµÄ´óСΪ8×Ö½Ú£¬ÏàÓ¦ÓÚʵ¼Ê´ø¿íµÄ¼ÓȨËÙÂÊΪ100Kbit£¬·ÖÀàµÄ·ÖÀëµãΪ1:0¡£

3. ½¨Á¢¹ýÂËÆ÷
¹ýÂËÆ÷Ö÷Òª·þÎñÓÚ·ÖÀà¡£Ò»°ãÖ»ÐèÕë¶Ô¸ù·ÖÀàÌṩһ¸ö¹ýÂËÆ÷£¬È»ºóΪÿ¸ö×Ó·ÖÀàÌṩ·ÓÉÓ³Éä¡£

1£© Ó¦Ó÷ÓÉ·ÖÀàÆ÷µ½cbq¶ÓÁеĸù£¬¸¸·ÖÀà±àºÅΪ1:0£»¹ýÂËЭÒéΪip£¬ÓÅÏȼ¶±ðΪ100£¬¹ýÂËÆ÷Ϊ»ùÓÚ·ÓÉ±í¡£
¡¤tc filter add dev eth0 parent 1:0 protocol ip prio 100 route

2£© ½¨Á¢Â·ÓÉÓ³Éä·ÖÀà1:2, 1:3, 1:4
¡¤tc filter add dev eth0 parent 1:0 protocol ip prio 100 route to 2 flowid 1:2
¡¤tc filter add dev eth0 parent 1:0 protocol ip prio 100 route to 3 flowid 1:3
¡¤tc filter add dev eth0 parent 1:0 protocol ip prio 100 route to 4 flowid 1:4

4.½¨Á¢Â·ÓÉ
¸Ã·ÓÉÊÇÓëÇ°ÃæËù½¨Á¢µÄ·ÓÉÓ³ÉäÒ»Ò»¶ÔÓ¦¡£
1£© ·¢ÍùÖ÷»ú192.168.1.24µÄÊý¾Ý°üͨ¹ý·ÖÀà2ת·¢(·ÖÀà2µÄËÙÂÊ8Mbit)
¡¤ip route add 192.168.1.24 dev eth0 via 192.168.1.66 realm 2

2£© ·¢ÍùÖ÷»ú192.168.1.30µÄÊý¾Ý°üͨ¹ý·ÖÀà3ת·¢(·ÖÀà3µÄËÙÂÊ1Mbit)
¡¤ip route add 192.168.1.30 dev eth0 via 192.168.1.66 realm 3

3£©·¢Íù×ÓÍø192.168.1.0/24µÄÊý¾Ý°üͨ¹ý·ÖÀà4ת·¢(·ÖÀà4µÄËÙÂÊ1Mbit)
¡¤ip route add 192.168.1.0/24 dev eth0 via 192.168.1.66 realm 4

¡¡¡¡×¢£ºÒ»°ã¶ÔÓÚÁ÷Á¿¿ØÖÆÆ÷ËùÖ±½ÓÁ¬½ÓµÄÍø¶Î½¨ÒéʹÓÃIPÖ÷»úµØÖ·Á÷Á¿¿ØÖÆÏÞÖÆ£¬²»ÒªÊ¹ÓÃ×ÓÍøÁ÷Á¿¿ØÖÆÏÞÖÆ¡£ÈçÒ»¶¨ÐèÒª¶ÔÖ±Á¬×ÓÍøʹÓÃ×ÓÍøÁ÷Á¿¿ØÖÆÏÞÖÆ£¬ÔòÔÚ½¨Á¢¸Ã×ÓÍøµÄ·ÓÉÓ³ÉäÇ°£¬Ð轫ԭÏÈÓÉϵͳ½¨Á¢µÄ·ÓÉɾ³ý£¬²Å¿ÉÍê³ÉÏàÓ¦²½Öè¡£

5. ¼àÊÓ
¡¡¡¡Ö÷Òª°üÀ¨¶ÔÏÖÓжÓÁС¢·ÖÀà¡¢¹ýÂËÆ÷ºÍ·ÓɵÄ×´¿ö½øÐмàÊÓ¡£
1£©ÏÔʾ¶ÓÁеÄ×´¿ö

¼òµ¥ÏÔʾָ¶¨É豸(ÕâÀïΪeth0)µÄ¶ÓÁÐ×´¿ö
¡¤tc qdisc ls dev eth0
qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no-transmit

ÏêϸÏÔʾָ¶¨É豸(ÕâÀïΪeth0)µÄ¶ÓÁÐ×´¿ö
¡¤tc -s qdisc ls dev eth0
qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no-transmit
Sent 7646731 bytes 13232 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 31 undertime 0

¡¡¡¡ÕâÀïÖ÷ÒªÏÔʾÁËͨ¹ý¸Ã¶ÓÁз¢ËÍÁË13232¸öÊý¾Ý°ü£¬Êý¾ÝÁ÷Á¿Îª7646731¸ö×Ö½Ú£¬¶ªÆúµÄ°üÊýĿΪ0£¬³¬¹ýËÙÂÊÏÞÖƵİüÊýĿΪ0¡£

2£©ÏÔʾ·ÖÀàµÄ×´¿ö

¼òµ¥ÏÔʾָ¶¨É豸(ÕâÀïΪeth0)µÄ·ÖÀà×´¿ö
¡¤tc class ls dev eth0
class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
class cbq 1:1 parent 1: rate 10Mbit prio no-transmit #no-transmit±íʾÓÅÏȼ¶Îª8
class cbq 1:2 parent 1:1 rate 8Mbit prio 2
class cbq 1:3 parent 1:1 rate 1Mbit prio 1
class cbq 1:4 parent 1:1 rate 1Mbit prio 6

ÏêϸÏÔʾָ¶¨É豸(ÕâÀïΪeth0)µÄ·ÖÀà×´¿ö
¡¤tc -s class ls dev eth0
class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
Sent 17725304 bytes 32088 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 31 undertime 0
class cbq 1:1 parent 1: rate 10Mbit prio no-transmit
Sent 16627774 bytes 28884 pkts (dropped 0, overlimits 0)
borrowed 16163 overactions 0 avgidle 587 undertime 0
class cbq 1:2 parent 1:1 rate 8Mbit prio 2
Sent 628829 bytes 3130 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 4137 undertime 0
class cbq 1:3 parent 1:1 rate 1Mbit prio 1
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 159654 undertime 0
class cbq 1:4 parent 1:1 rate 1Mbit prio 6
Sent 5552879 bytes 8076 pkts (dropped 0, overlimits 0)
borrowed 3797 overactions 0 avgidle 159557 undertime 0

¡¡¡¡ÕâÀïÖ÷ÒªÏÔʾÁËͨ¹ý²»Í¬·ÖÀà·¢Ë͵ÄÊý¾Ý°ü£¬Êý¾ÝÁ÷Á¿£¬¶ªÆúµÄ°üÊýÄ¿£¬³¬¹ýËÙÂÊÏÞÖƵİüÊýÄ¿µÈµÈ¡£ÆäÖиù·ÖÀà(class cbq 1:0)µÄ×´¿öÓ¦Óë¶ÓÁеÄ×´¿öÀàËÆ¡£
¡¡¡¡ÀýÈ磬·ÖÀàclass cbq 1:4·¢ËÍÁË8076¸öÊý¾Ý°ü£¬Êý¾ÝÁ÷Á¿Îª5552879¸ö×Ö½Ú£¬¶ªÆúµÄ°üÊýĿΪ0£¬³¬¹ýËÙÂÊÏÞÖƵİüÊýĿΪ0¡£

ÏÔʾ¹ýÂËÆ÷µÄ×´¿ö
¡¤tc -s filter ls dev eth0
filter parent 1: protocol ip pref 100 route
filter parent 1: protocol ip pref 100 route fh 0xffff0002 flowid 1:2 to 2
filter parent 1: protocol ip pref 100 route fh 0xffff0003 flowid 1:3 to 3
filter parent 1: protocol ip pref 100 route fh 0xffff0004 flowid 1:4 to 4

ÕâÀïflowid 1:2´ú±í·ÖÀàclass cbq 1:2£¬to 2´ú±íͨ¹ý·ÓÉ2·¢ËÍ¡£

ÏÔʾÏÖÓзÓɵÄ×´¿ö
¡¤ip route
192.168.1.66 dev eth0 scope link
192.168.1.24 via 192.168.1.66 dev eth0 realm 2
202.102.24.216 dev ppp0 proto kernel scope link src 202.102.76.5
192.168.1.30 via 192.168.1.66 dev eth0 realm 3
192.168.1.0/24 via 192.168.1.66 dev eth0 realm 4
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.66
172.16.1.0/24 via 192.168.1.66 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 202.102.24.216 dev ppp0
default via 192.168.1.254 dev eth0

¡¡¡¡ÈçÉÏËùʾ£¬½áβ°üº¬ÓÐrealmµÄÏÔʾÐÐÊÇÆð×÷ÓõÄ·ÓɹýÂËÆ÷¡£

6. ά»¤
¡¡¡¡Ö÷Òª°üÀ¨¶Ô¶ÓÁС¢·ÖÀà¡¢¹ýÂËÆ÷ºÍ·ÓɵÄÔöÌí¡¢Ð޸ĺÍɾ³ý¡£
¡¡¡¡ÔöÌí¶¯×÷Ò»°ãÒÀÕÕ"¶ÓÁÐ->·ÖÀà->¹ýÂËÆ÷->·ÓÉ"µÄ˳Ðò½øÐУ»Ð޸Ķ¯×÷ÔòûÓÐʲôҪÇó£»É¾³ýÔòÒÀÕÕ"·ÓÉ->¹ýÂËÆ÷->·ÖÀà->¶ÓÁÐ"µÄ˳Ðò½øÐС£

1£©¶ÓÁеÄά»¤
Ò»°ã¶ÔÓÚһ̨Á÷Á¿¿ØÖÆÆ÷À´Ëµ£¬³ö³§Ê±Õë¶Ôÿ¸öÒÔÌ«Íø¿¨¾ùÒÑÅäÖúÃÒ»¸ö¶ÓÁÐÁË£¬Í¨³£Çé¿ö϶ԶÓÁÐÎÞÐè½øÐÐÔöÌí¡¢Ð޸ĺÍɾ³ý¶¯×÷ÁË¡£

2£©·ÖÀàµÄά»¤

ÔöÌí
ÔöÌí¶¯×÷ͨ¹ýtc class addÃüÁîʵÏÖ£¬ÈçÇ°ÃæËùʾ¡£

ÐÞ¸Ä
Ð޸Ķ¯×÷ͨ¹ýtc class changeÃüÁîʵÏÖ£¬ÈçÏÂËùʾ£º
¡¤tc class change dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 7Mbit maxburst 20 allot 1514 prio 2 avpkt 1000 cell 8 weight 700Kbit split 1:0 bounded
¶ÔÓÚboundedÃüÁîÓ¦É÷Óã¬Ò»µ©Ìí¼Óºó¾Í½øÐÐÐ޸ģ¬Ö»¿Éͨ¹ýɾ³ýºóÔÙÌí¼ÓÀ´ÊµÏÖ¡£

ɾ³ý
ɾ³ý¶¯×÷Ö»Ôڸ÷ÖÀàûÓй¤×÷Ç°²Å¿É½øÐУ¬Ò»µ©Í¨¹ý¸Ã·ÖÀà·¢Ë͹ýÊý¾Ý£¬ÔòÎÞ·¨É¾³ýËüÁË¡£Òò´Ë£¬ÐèҪͨ¹ýshellÎļþ·½Ê½À´Ð޸ģ¬Í¨¹ýÖØÐÂÆô¶¯À´Íê³Éɾ³ý¶¯×÷¡£

3£©¹ýÂËÆ÷µÄά»¤

ÔöÌí
ÔöÌí¶¯×÷ͨ¹ýtc filter addÃüÁîʵÏÖ£¬ÈçÇ°ÃæËùʾ¡£

ÐÞ¸Ä
Ð޸Ķ¯×÷ͨ¹ýtc filter changeÃüÁîʵÏÖ£¬ÈçÏÂËùʾ£º
¡¤tc filter change dev eth0 parent 1:0 protocol ip prio 100 route to 10 flowid 1:8

ɾ³ý
ɾ³ý¶¯×÷ͨ¹ýtc filter delÃüÁîʵÏÖ£¬ÈçÏÂËùʾ£º
¡¤tc filter del dev eth0 parent 1:0 protocol ip prio 100 route to 10

4£©Óë¹ýÂËÆ÷Ò»Ò»Ó³Éä·ÓɵÄά»¤

ÔöÌí
ÔöÌí¶¯×÷ͨ¹ýip route addÃüÁîʵÏÖ£¬ÈçÇ°ÃæËùʾ¡£

ÐÞ¸Ä
Ð޸Ķ¯×÷ͨ¹ýip route changeÃüÁîʵÏÖ£¬ÈçÏÂËùʾ£º
¡¤ip route change 192.168.1.30 dev eth0 via 192.168.1.66 realm 8

ɾ³ý
ɾ³ý¶¯×÷ͨ¹ýip route delÃüÁîʵÏÖ£¬ÈçÏÂËùʾ£º
¡¤ip route del 192.168.1.30 dev eth0 via 192.168.1.66 realm 8
¡¤ip route del 192.168.1.0/24 dev eth0 via 192.168.1.66 realm 4
ÎÄÕ¼È룺a    ÔðÈα༭£ºa 
  • ÉÏһƪÎÄÕ£º

  • ÏÂһƪÎÄÕ£º
  • ¡¾·¢±íÆÀÂÛ¡¿¡¾¼ÓÈëÊղء¿¡¾¸æËߺÃÓÑ¡¿¡¾´òÓ¡´ËÎÄ¡¿¡¾¹Ø±Õ´°¿Ú¡¿
    ÍøÓÑÆÀÂÛ£º£¨Ö»ÏÔʾ×îÐÂ10Ìõ¡£ÆÀÂÛÄÚÈÝÖ»´ú±íÍøÓѹ۵㣬Óë±¾Õ¾Á¢³¡Î޹أ¡£©
    ¹ØÓÚÎÒÃÇ | RAIDÊý¾Ý»Ö¸´ | ÓÑÇéÁ´½Ó | RSSÉú³É | XMLÉú³É | ÎÄÕÂHTMLµØͼ | ÏÂÔØHTMLµØͼ

    °æȨËùÓÐ ±±ÑÇÊý¾Ý»Ö¸´ÖÐÐÄ
    È«¹úͳһ¿Í·þµç»°:4006-505-808
    ±±¾©Êк£µíÇøÓÀ·á»ùµØ·á»ÛÖз7ºÅвÄÁÏ´´Òµ´óÏÃB×ù205ÊÒ
    ¾©ICP±¸05011939
    E&Ò69