¸®´ª½º¿¡¼ Æ®·¡ÇÈ Á¦¾îÇϱâ
¸®´ª½º Ä¿³ÎÀ» ÀÌ¿ëÇÑ Æ®·¡ÇÈ Bandwidth¸¦ ¼³Á¤ÇÏ´Â ¹æ¹ýÀÌ´Ù.
¿©±â¼´Â Outbound Æ®·¡ÇÈ¿¡ ´ëÇؼ¸¸ ´Ù·é´Ù. Inbound ´Â iptable °ú ÇÔ²² »ç¿ëÇÏ¿© ±¸¼ºÇÑ´Ù.
Ä¿³Î¿¡¼ ¾Æ·¡¿Í °°ÀÌ È°¼ºÈ µÇ¾îÀÖ¾î¾ß ÇÑ´Ù.
-*- Networking support --->
Networking options --->
[*] QoS and/or fair queueing --->
.config
#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_ATM=m
CONFIG_NET_SCH_PRIO=m
# CONFIG_NET_SCH_MULTIQ is not set
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_INGRESS=m
1. Download htb.init ½ºÅ©¸³Æ® http://sourceforge.net/projects/htbinit/
2 .½ÇÇà±ÇÇÑ
[root@mojily sbin]# mv htb.init-v0.8.5 htb.init
[root@mojily sbin]# chmod +x /sbin/htb.init
3. htb.init ¼³Á¤ µð·ºÅ丮¿Í cache µð·ºÅ丮 »ý¼º
[root@mojily sbin]# mkdir -p /etc/sysconfig/htb
[root@mojily sbin]# mkdir -p /var/cache/
4. Æ®·¡ÇÈÁ¦¾î ÆÄÀÏ ¼³Á¤ (/etc/sysconfig/htb)ÆÄÀϸíÀº ¾Æ·¡¿Í°°Àº Çü½ÄÀ¸·Î ÀúÀåÇÑ´Ù.
<ÀÎÅÍÆäÀ̽º À̸§>-<clsid>(:<clsid>).<¶óº§¼³¸í>
clsid ´Â Ŭ·¡½º ID·Î 16Áø¼öÀ̸ç 2ºÎÅÍ FFFF±îÁö ¹üÀ§¸¦ °¡Áø´Ù.
[root@mojily sbin]# cat /etc/sysconfig/htb/eth0
DEFAULT=30
R2Q=100
[root@mojily sbin]# cat /etc/sysconfig/htb/eth0-2.http
RATE=50Mbit
CEIL=50Mbit
BURST=5k
LEAF=sfq
RULE=*:80,
[root@mojily sbin]# cat /etc/sysconfig/htb/eth0-2.smtp
RATE=1Mbit
CEIL=1Mbit
BURST=1k
LEAF=sfq
RULE=*:25,
¡Ø ÀÚ¼¼ÇÑ ¿É¼ÇÀº ¾Æ·¡ DOC ¹®¼ÂüÁ¶
http://chonnom.com/bbs/board.php?bo_table=B16&wr_id=39¿©ÁØ´Ù.
5. ½ºÅ©¸³Æ® ½ÇÇà
[root@mojily sbin]# ./htb.init start
[root@mojily sbin]# watch -d ./htb.init stats
¡Ø Usage: htb.init {start|compile|stop|restart|timecheck|list|stats}
start : ½ºÅ©¸³Æ®¸¦ ½ÇÇà
compile : ½ÇÇàÀº ÇÏÁö¾Ê°í TC¸¦ ÀÌ¿ë htb.init ½ºÅ©¸³Æ®°¡ ¼³Á¤ÆÄÀÏ´ë·Î ¸¸µé¾î³½ ±¸¹®À» º¸¿©ÁÖ¸ç ½ºÅ©¸³Æ®°¡ ½ÇÁ¦·Î ¾î¶»°Ô ÀÛµ¿µÇ´ÂÁö ¾Ë ¼ö ÀÖ´Â ºÐ¼®¿¡ Æí¸®ÇÑ ¸í·É
stop : ½ºÅ©¸³Æ® ½ÇÇàÀ» ¸ØÃã
restart : ½ºÅ©¸³Æ® Àç½ÃÀÛ
timecheck : TIME ¸í·ÉÀ» ÁáÀ»¶§ ½ÇÇà
list : ½ÇÇàÇßÀ»¶§ µð¹ÙÀ̽º¿¡ ´ëÇØ Àû¿ëµÈ °¢Á¾ Ŭ·¡½º, ·êÀ» º¸¿©ÁÜ
stats : list¿Í ºñ½ÁÇÏ°Ô ÇöÀç »óŸ¦ ³ªÅ¸³»¸ç ÃÑ Æ®·¡ÇȾç°ú ¾ó¸¶³ª ÇÊÅ͸¦ Åë°úÇß´ÂÁö µî¿¡ ´ëÇغ¸¿©ÁÜ
<ÁÖÀÇ»çÇ×>
Queueing ´Â µ¥ÀÌÅ͸¦ º¸³»´Â ¹æ¹ý¸¸À» Á¤ÀÇÇÑ´Ù.
Áï ¼ÓµµÁ¦¾î´Â ÀÎÅÍÆäÀ̽º¿¡¼ ³ª°¡´Â Æ®·¡Çȸ¸ °¡´ÉÇÏ´Ù.
µé¾î¿À´Â Incomming Æ®·¡ÇÈÀ» Á¦¾îÇϱâ À§Çؼ´Â ºê¸®Áö·Î ¹¿©ÀÖ´Â ÀåÄ¡¸íÀ» ÅëÇØ IN / OUT À¸·Î ºÐ¸®Çؼ Á¦¾îÇÏ¸é µÈ´Ù.
eth1 / eth2 ¿¡ ´ëÇؼ ´Ù¿î·Îµå Æ®·¡ÇÈÀ» Á¦¾îÇÏ°Ô µÇ¸é ½ÇÁ÷ÀûÀ¸·Î ½Ã½ºÅÛ¿¡¼´Â ¾÷/´Ù¿î Æ®·¡ÇÈÀ» Á¦¾îÇϴ°Íó·³ ³ªÅ¸³´Ù.