คือตอนนี้จะทำโมดูล 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



=Read The Fxxx 

Posts: 1267
Joined: 12-05-2003