PDA

View Full Version : Load Balancing



galson
29-08-2005, 10:11 AM
Các bạn cho mình hỏi thắc mắc này nhé. Swich học địa chỉ các máy bằng frame in. tức là khi có 1 gói tin đến thì Swich sẽ học được địa chỉ MAC của nó để sau đó khi có gói tin khác trả lại thì nó sẽ foward lại cho địa chỉ MAC đã học đươc. Vậy trong trường hợp LOAD BALANCING (2 card mạng). 1 card A gửi và 1 card B nhận . Khi Card A gửi đi thì Switch sẽ học được địa chỉ MAC của card Ạ Vậy khi nhận gói tin trở về máy thì làm sao Switch biết được địa chỉ MAC của card B để gửi về? Mình đọc trong sách không thấy nói gì về nguyên lý hoạt động này. Switch sẽ học địa chỉ MAC của card B thế nào để khi foward gói tin trở về thì nó foward về card B. :?:

changchancuucodon
11-09-2005, 12:47 PM
bạn có thể chỉ ra nguồn gốc của tài liệu mà bạn mô tả quá trình load balancing như trên không?

nesysen
22-09-2005, 10:54 PM
Theo mình, khi máy bạn chạy Load Balancing, tức là bản thân các packet gửi đi từ máy bạn đến SW đã được tách ra, gửi qua 2 card mạng, do đó, SW đã học được 2 Mac Address của 2 card mạng của máy ban.
Khi nhận các packet và gửi về máy bạn, thì các packet này được gửi theo MAC của các card mạng riệng
Không biết có đúng theo ý bạn ko?
Mong các bạn bàn thêm.

chitrung8324
17-10-2005, 12:44 PM
Theo minh nghi truong hop load balancing nhhu ban Galson noi thi khi may gui tin ra Switch no se chia ra gui tren 2 card mang do luon,chu khong phai la 1 gui va 1 nhan.Vi the Switch se hoc duoc 2 Mac Add cua ca 2 card mang.Mot truong hop nua la khi may cua ban dung 2 card mang thi se phai ton 2 port tren switch,vi the viec Switch muon chuyen goi tin toi card mang B thi cung la viec binh thuong nhu chuyen toi cac may khac trong mang.Hy vong la dung the y ban hoi.Bye

rosekiller
19-10-2005, 08:54 PM
1 câu hỏi hay! Mình nghĩ nó sẽ chỉ gửi và nhận từ 1 Card mạng thôi còn việc load-balancing sau đó sẽ do ta cấu hình trên Layer 3!

Có ý kiến nào làm rõ operation này không nhỉ?

tsani
20-10-2005, 12:49 AM
Đã là LoadBalancing thì sao có cái "vụ" một card nhận một card gữi???

viva
06-11-2005, 02:16 PM
Theo minh chia lam hai truong hop:
1. neu 2 card mang noi toi 2 port cua Switch thi don gian thoi: Neu chua biet card B no se food ra tat ca cac port
2. Neu 2 card mang noi toi 1 hub truoc roi noi toi Switch thi co ve don gian hon via hub tu dong truyen goi tin toi card B

Con viec hoc cua switch van nhu truyen thong cu cua no

finish

trung tam kn
08-11-2005, 10:58 PM
việc load balancing trên 2 port của switch sẽ diễn ra không như ý kiến là phân mảnh frame rồi gửi trên hai card mạng (tức hai port của switch). Thuật toán load balancing thực ra sẽ dựa trên kết quả của phép hashing (băm) hai MAC address (hoặc giữa source IP/Dest IP..). Nếu kết quả phép hash là 0, link thứ nhất được dùng, nếu kết quả là 1, link thứ hai được dùng.

Các vị nên xem lại sách CCNP Switching, chương 8.

Distributing Traffic in EtherChannel
Traffic in an EtherChannel is distributed across the individual bundled links in a deterministic fashion; however, the load is not necessarily balanced equally across all the links. Instead, frames are forwarded on a specific link as a result of a hashing algorithm. The algorithm can use source IP address, destination IP address, or a combination of source and destination IP addresses, source and destination MAC addresses, or TCP/UDP port numbers. The hash algorithm computes a binary pattern that selects a link number in the bundle to carry each frame.

If only one address or port number is hashed, a switch forwards each frame by using one or more low-order bits of the hash value as an index into the bundled links. If two addresses or port numbers are hashed, a switch performs an exclusive-OR (XOR) operation on one or more low-order bits of the addresses or TCP/UDP port numbers as an index into the bundled links.

For example, an EtherChannel consisting of two links bundled together requires a 1-bit index. If the index is 0, link 0 is selected; if the index is 1, link 1 is used. Either the lowest-order address bit or the XOR of the last bit of the addresses in the frame is used as the index. A four-link bundle uses a hash of the last 2 bits. Likewise, an eight-link bundle uses a hash of the last 3 bits. The hashing operation's outcome selects the EtherChannel's outbound link. Table 8-2 shows the results of an XOR on a two-link bundle, using the source and destination addresses.

Table 8-2. Frame Distribution on a Two-Link EtherChannel Binary Addresses
Two-Link EtherChannel XOR and Link Number

Addr1: ... xxxxxxx0

Addr2: ... xxxxxxx0
... xxxxxxx0: Use link 0

Addr1: ... xxxxxxx0

Addr2: ... xxxxxxx1
... xxxxxxx1: Use link 1

Addr1: ... xxxxxxx1

Addr2: ... xxxxxxx0
... xxxxxxx1: Use link 1

Addr1: ... xxxxxxx1

Addr2: ... xxxxxxx1
... xxxxxxx0: Use link 0