ต้องการความรู้เรื่อง load balance ครับ

รูปภาพของ ohno
ohno
Rating 10
Posts: 1267
Joined: 12-05-2003

คือตอนนี้จะทำโมดูล load balance อ่ะ แต่ว่า unknow มากๆ ครับ

พอดีไปเจอกระทู้ที่คุณจักรนันท์ คุยเรื่อง bonding คิดว่าน่าจะได้อ่านไปอ่านมาใช้ไม่ได้ครับ

ตามความเข้าใจของผม bonding มันเป็นเพิ่ม bandwidth หรือไม่ก็เป็น backup ครับ (ใช่ป่าวหว่า)

นั่งอ่านๆ ไปก็เจอนะครับ เกี่ยวกับ ip route แต่ลองๆ ดูคิดว่าคงเป็นแค่ static แต่ว่า static ก็โอนะลองก่อน

แต่ก็ยัง... พอนั่งทำไป ไม่เข้าใจว่า table ที่สร้างขึ้นเองในตาราง route นั้นมีไว้เพื่ออะไร (ใช่ทำเพื่อตั้งกฏหรือเปล่า)

ลองแล้วก็มี error บ้าง แต่สงสัยตรง route table นี่หล่ะใครกรุณาอธิบายหรือหา source ดีๆ ให้หน่อย หุหุหุ

linuxsis:~# IP1=10.226.38.193
linuxsis:~# IP2=192.168.212.200
linuxsis:~#
linuxsis:~# #ahora los Gateways
linuxsis:~# P1=10.226.38.1
linuxsis:~# P2=192.168.212.1
linuxsis:~#
linuxsis:~# #Las redes
linuxsis:~# P0_NET=192.168.1.0/24
linuxsis:~# P1_NET=10.226.38.0/23
linuxsis:~# P2_NET=192.168.212.0/24
linuxsis:~#
linuxsis:~# # NICs
linuxsis:~# IF1=eth1
linuxsis:~# IF2=eth2
linuxsis:~# ip route add default via $P1 table SIS6
Error: an inet address is expected rather than "table".
linuxsis:~# ip route add default via $P2 table SIS5
Error: an inet address is expected rather than "table".
linuxsis:~# ip route add $P1_NET dev $IF1 src $IP1
RTNETLINK answers: File exists
linuxsis:~# ip route add $P2_NET dev $IF2 src $IP2
RTNETLINK answers: File exists
linuxsis:~# ip rule add from $IP1 table SIS6
linuxsis:~# ip rule add from $IP2 table SIS5
linuxsis:~# ip route add $P0_NET dev $IF0 table SIS6
Error: either "to" is duplicate, or "SIS6" is a garbage.
linuxsis:~# ip route add $P2_NET dev $IF2 table SIS6
RTNETLINK answers: File exists
linuxsis:~# ip route add 127.0.0.0/8 dev lo table SIS6
linuxsis:~# ip route add $P0_NET dev $IF0 table SIS5
Error: either "to" is duplicate, or "SIS5" is a garbage.
linuxsis:~# ip route add $P1_NET dev $IF1 table SIS5
RTNETLINK answers: File exists
linuxsis:~# ip route add 127.0.0.0/8 dev lo table SIS5
linuxsis:~# route del -net 0.0.0.0 netmask 0.0.0.0 dev $IF1
linuxsis:~# ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1
Error: an IP address is expected rather than "dev"

 

 

/etc/iproute2/rt_table 

 # reserved values
#
255     local
254     main
253     default
0       unspec

#
# local
#
#1      inr.ruhep
2 SIS6
1 SIS5

 

รูปภาพของ taz
taz
Rating 10
Posts: 1165
Joined: 02-12-2002
ถามยังกะอ

ถามยังกะอ่านมาแค่ link ที่เราให้ไปอ่าน ลองไปหาอ่านเพิ่มดู bonding ทำได้มากกว่านั้นมันมีหลาย mode

http://unixfoo.blogspot.com/search/label/networking

http://www.cyberciti.biz/howto/question/static/linux-ethernet-bonding-dr...

http://tier.cs.berkeley.edu/wiki/HOWTO:Bonding

http://www.enterprisenetworkingplanet.com/nethub/article.php/3697756

http://www.linuxfoundation.org/en/Net:Bonding

backup มันเป็น mode 1 ของมัน มันมี mode อื่นที่เป็น balance แล้วมี balance หลายแบบด้วยไปอ่าน+ลองทำดู

แก้ไข.

อ่านกระทู้นี้ ประกอบความเข้าใจด้วยก็ดี

http://www.opentle.org/th/node/8468 

--

=Read The Fxxx Manual _| ̄|○

Don't Learn to HACK - Hack to LEARN

ถ้าไม่รู้ว่า RTFM คืออะไรให้ไปอ่าน ถามอย่างไรจึงจะได้คำตอบ

รูปภาพของ ohno
ohno
Rating 10
Posts: 1267
Joined: 12-05-2003
ส่ง 26
ส่ง 26 นี้แล้ว ..... ตกนรกแน่ T-T
Syndicate content