· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Á¨Åõ¸®´ª½º¿¡¼­ÀÇ IP bonding±¸Ãà

Á¨Åõ¸®´ª½º¿¡¼­ÀÇ IP bonding±¸Ãà

  • ÀÛ¼ºÀÚ
    Á¶ÀçÇõ(Mminzkn@minzkn.com)

  • °íÄ£°úÁ¤
    2008³â 4¿ù 30ÀÏ : óÀ½¾¸

IP bonding À̶õ?

°£·«È÷ ¼³¸íÇÏÀÚ¸é ¿©·¯ÀåÀÇ NIC¸¦ ¸¶Ä¡ ÇϳªÀÇ NIC·Î ¹­¾î¼­ ¸ðµç Æ®·¡ÇÈÀ» °¢ NIC¿¡ ±ÕµîÇÏ°Ô ÀÏÁ¤ÇÑ ±ÔÄ¢¿¡ ÀÇÇؼ­ ºÐ»ê½ÃÅ°´Â °ÍÀ» ¸»ÇÕ´Ï´Ù.

Kernel ¼³Á¤

¿ì¼± ÀúÀÇ Gentoo Linux ȯ°æ¿¡¼­ Linux kernel 2.6.12ÀÌÇϹöÁ¯¿¡¼­´Â IP bonding À» »ç¿ëÇÏ¸é ½Ã½ºÅÛÀÌ ±²ÀåÈ÷ ºÒ¾ÈÇØÁ³½À´Ï´Ù. ÀÌ¿¡ ´ëÇؼ­ Á»´õ ¸íÈ®È÷ ¸»¾¸µå¸®°í ½ÍÁö¸¸ Á¤½Å°Ç°­À» À§Çؼ­ 2.6.14 ÀÌ»óÀÇ ¹öÁ¯¿¡¼­ ±¸ÃàÇϽñ⸦ ±ÇÀåÇÕ´Ï´Ù. Kernel¿¡¼­ ´ÙÀ½ÀÇ ¿É¼ÇÀÌ Module ·Î ¼³Á¤µÇ¾î ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
Device Drivers/Network device support/Bonding driver support [M]


IP bonding ¿¡ ´ëÇÑ Ä¿³Î¹®¼­´Â Ä¿³Î¼Ò½º¿¡¼­ "Documentation/networking/bonding.txt" À§Ä¡¿¡ ÀÖÀ¸´Ï ÇѹøÂë Àо½Ã¸é ÁÁ°Ú½À´Ï´Ù. Ä¿³ÎÀ» ºôµåÇϸé "bonding.ko" ¸ðµâÀÌ »ý°åÀ»°Ì´Ï´Ù. Á¤»óÀûÀ¸·Î Gentoo ¸¦ ¼³Ä¡ÇÏ¿© »ç¿ëÁßÀ̶ó¸é Ưº°È÷ "/etc/modules.autoload.d/kernel-2.6" ¿¡ Ãß°¡ÇØÁÙÇÊ¿ä´Â ¾øÀ»°Ì´Ï´Ù. ÇÏÁö¸¸ ¸¸¾à bonding ¸ðµâÀÌ ÀÚµ¿À¸·Î ¿Ã¶ó°¡Áö ¾ÊÀ¸¸é Ãß°¡ÇØÁÖ½Ã¸é µÇ°Ú½À´Ï´Ù. ±×¸®°í bonding ¿¡ ´ëÇÑ Á¤Ã¥ÀÌ ¿©·¯°¡Áö°¡ Àִµ¥ bonding ¸ðµâÀ» ¿Ã¸±¶§ ÀÌ·¯ÇÑ ¿É¼ÇÀ» ÁöÁ¤ÇØÁÙ¼ö ÀÖ½À´Ï´Ù.

±âº» bonding ó¸® Á¤Ã¥À» ¼¼¹ÐÇÏ°Ô ¼³Á¤ÇÏ°í ½ÍÀ¸½Ã´Ù¸é "/etc/modules.d/bond"(ÆÄÀÏÀÌ ¾ø´Ù¸é ¾Æ·¡¿Í °°ÀÌ ÆÄÀÏÀ» ¸¸µå½Ã¸é µË´Ï´Ù.)¿¡ ÀûÀýÈ÷ module optionÀ» ¼³Á¤ÇϽðí "/sbin/update-modules"À» ½ÇÇà½ÃÄÑÁØÈÄ¿¡ ½Ã½ºÅÛÀ» ÀçºÎÆà ÇÏ½Ã¸é µË´Ï´Ù. ÁÖ·Î ±âº»Á¤Ã¥À» ¼³Á¤ÇÏ´Â mode¿Í °¨½ÃÁֱ⸦ ¼³Á¤ÇÏ´Â miimon°ªÀ» ¸¹ÀÌ ´Ù·ç°Ô µÇ´Âµ¥ ¿©±â¼­ mode´Â º¸Åë 0¶Ç´Â 1À» ¸¹ÀÌµé »ç¿ëÇÏ´Â°Í °°½À´Ï´Ù. 0Àº ±ÕµîÇÏ°Ô ¹èºÐÇÏ¿© »ç¿ëÇÏ´Â ¹æ½ÄÀ¸·Î ¿î¿ëµÇ¸ç 1Àº Çϳª¸¸ ¾²´Ù°¡ NIC°¡ »ç¿ëºÒ´ÉÀÌ µÇ¸é ´Ù¸¥ NIC·Î ¹Ù²ã »ç¿ëÇÕ´Ï´Ù.
# read /usr/src/linux/Documentation/networking/bonding.txt for help!

alias bond0 bonding
options bond0 mode=0 miimon=100
#alias bond1 bonding
#options bond1 -o bonding1 arp_interval=200 arp_ip_target=10.0.0.1

# Parameters:
# arp_interval:arp interval in milliseconds (int)
# arp_ip_target:arp targets in n.n.n.n form (array of charp)
# arp_validate:validate src/dst of ARP probes: none (default), active, backup or all (charp)
# downdelay:Delay before considering link down, in milliseconds (int)
# lacp_rate:LACPDU tx rate to request from 802.3ad partner (slow/fast) (charp)
# max_bonds:Max number of bonded devices (int)
# miimon:Link check interval in milliseconds (int)
# mode:Mode of operation : 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp)
# primary:Primary network device to use (charp)
# updelay:Delay before considering link up, in milliseconds (int)
# use_carrier:Use netif_carrier_ok (vs MII ioctls) in miimon; 0 for off, 1 for on (default) (int)
# xmit_hash_policy:XOR hashing method: 0 for layer 2 (default), 1 for layer 3+4 (charp)


ifenslave ¼³Ä¡

´ÙÀ½°ú °°ÀÌ ÇÏ¿© ifenslave ¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
bash# emerge ifenslave


¶Ç´Â Ä¿³Î¼Ò½º¿¡ º¸½Ã¸é "Documentation/networking/ifenslave.c" ¼Ò½º°¡ Àִµ¥ ÀÌ°ÍÀ» Á÷Á¢ ÄÄÆÄÀÏÇÏ¿© "/sbin/ifenslave" ¿¡ ÀúÀåÇϼŵµ µË´Ï´Ù.

Network configuration

"/etc/conf.d/net" ¿¡¼­ ¾Æ·¡ÀÇ ¿¹Á¦¸¦ ÂüÁ¶ÇϽþî ÀûÀýÈ÷ ¼öÁ¤ÇÏ½Ã¸é µË´Ï´Ù. ¾Æ·¡ÀÇ ¿¹Á¦´Â eth0 °¡ master°¡ µÇ°í eth1 ÀÌ slave °¡ µÇ¾î 192.168.xx.xx ·Î bond0 ¸¦ ¸¸µé¾î ¹­´Â °ÍÀÔ´Ï´Ù. À̶§ eth0¿Í eth1Àº º¸Åë "null" À» ÁÖ½Ã¸é ¹«³­ÇÒ°Ì´Ï´Ù.
config_eth0=("null")
config_eth1=("null")

slaves_bond0="eth0 eth1"
config_bond0=("192.168.xx.xx broadcast 192.168.xx.xx netmask 255.255.255.0")
routes_bond0=("default gw 192.168.xx.1")

depend_bond0() {
need net.eth0 net.eth1
}


IP bonding À» »ç¿ëÇغ¸°í¼­

¿ì¼± eth0 ¶Ç´Â eth1 ¾î´ÀÇÑÂÊÀÇ LAN cable À» »Ì¾Æµµ ¸ðµç Network Àº Á¤»óÀûÀ¸·Î ¿¬°áÀÌ À¯ÁöµÇ´Â°ÍÀ» º¸¿´½À´Ï´Ù. ÇÏÁö¸¸ °æ¿ì¿¡ µû¶ó¼­´Â ping ÀÇ °æ¿ì ¾à°£ÀÇ loss°¡ ÀϽÃÀûÀ¸·Î ¹ß»ýÇÑ °æ¿ì°¡ ÀÖ±â´Â ÇÕ´Ï´Ù. ±×¸®°í ¿©·¯ È£½ºÆ®¿¡ ¿¬°áÇÏ¿© ¸¹Àº Æ®·¡ÇÈÀ» »ç¿ëÇÒ¶§ ¾à°£ÀÇ Ã¼°¨¼Óµµ°¡ »¡¶óÁ³½À´Ï´Ù. ÇÏÁö¸¸ 1:1 È£½ºÆ®°£ÀÇ Æ®·¡ÇÈ Çâ»óÀº ¾ø¾ú½À´Ï´Ù. Áï, 1 vs ´Ù¼öÀÇ host ¿¬°á½Ã¿¡ ²Ï ÁÁÀº ¼º´ÉÀ» ´À³¥¼ö ÀÖ¾ú½À´Ï´Ù. Á¤»óÀûÀ¸·Î ¼³Ä¡°¡ µÇ¾úÀ¸¸é ifconfig ¸í·ÉÀ¸·Î ´ÙÀ½°ú °°ÀÌ ³ª¿À´Â°ÍÀ» È®ÀÎÇÒ¼ö ÀÖÀ»°Ì´Ï´Ù. bond0, eth0, eth1 ÀÇ MAC ÁÖ¼Ò°¡ ¸ðµÎ °°°Ô ³ª¿À´Â°Íµµ Èï¹Ì·Î¿î ºÎºÐÀÔ´Ï´Ù.
bond0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.xx.xx Bcast:192.168.xx.xx Mask:255.255.255.0
inet6 addr: fe80::20e:cff:fe5a:c405/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:10428636 errors:0 dropped:0 overruns:0 frame:0
TX packets:8704619 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1987897250 (1895.8 Mb) TX bytes:1630747353 (1555.2 Mb)

eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::20e:cff:fe5a:c405/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:5612670 errors:0 dropped:0 overruns:0 frame:0
TX packets:4352310 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1033339780 (985.4 Mb) TX bytes:2955265436 (2818.3 Mb)

eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::20e:cff:fe5a:c405/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:4815966 errors:0 dropped:0 overruns:0 frame:0
TX packets:4352309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:954557470 (910.3 Mb) TX bytes:2970449213 (2832.8 Mb)
Interrupt:10



ID
Password
Join
A man who turns green has eschewed protein.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-10-02 10:03:20
Processing time 0.0039 sec