Bridge ethernet su stessa lan, load balancing possibile?

Tutto quello che ha a che fare con GNU/Linux, soprattutto in ambito sistemistico.

Moderatore: Federico.Lagni

Rispondi
Ir0nfl4m3
Cisco fan
Messaggi: 62
Iscritto il: mar 14 feb , 2006 3:39 pm
Contatta:

Ciao a tutti,
ho un pc linux debian con 2 schede di rete, ho creato un bridge con questo script

Codice:
#!/bin/bash
brctl addbr br0
brctl stp br0 on
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
ifconfig br0 192.168.1.1 up
route add default gw 192.168.1.100


e il bridge funziona correttamente, guardando però il traffico delle schede mi accorgo che praticamente ne usa solo una

Codice:
eth0 Link encap:Ethernet HWaddr 00:10:A7:17:78:0E
inet6 addr: fe80::210:a7ff:fe17:780e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:218835 errors:0 dropped:0 overruns:0 frame:0
TX packets:227314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:163924449 (156.3 MiB) TX bytes:141688541 (135.1 MiB)
Interrupt:12 Base address:0xd400

eth1 Link encap:Ethernet HWaddr 00:08:A1:27:6B:FF
inet6 addr: fe80::208:a1ff:fe27:6bff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1862 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:59 dropped:0 overruns:0 carrier:59
collisions:0 txqueuelen:1000
RX bytes:119117 (116.3 KiB) TX bytes:60 (60.0 b)
Interrupt:10 Base address:0xd000




E' possibile effettuare sul bridge un load balancing?

Grazie
Guide e howto su sistemi operativi linux e windows e apparati
http://www.betacrew.org
Guadagna con Fid€liux
Avatar utente
andrewp
Messianic Network master
Messaggi: 2199
Iscritto il: lun 13 giu , 2005 7:32 pm
Località: Roma

Beh, no, non è possibile...si chiama "bonding" e non "bridging" quello che vuoi fare...cerca info sul primo :wink:

Ciao.
Manipolatore di bit.
Ir0nfl4m3
Cisco fan
Messaggi: 62
Iscritto il: mar 14 feb , 2006 3:39 pm
Contatta:

Grazie Andrea,
ti farò sapere!

:P
Guide e howto su sistemi operativi linux e windows e apparati
http://www.betacrew.org
Guadagna con Fid€liux
Ir0nfl4m3
Cisco fan
Messaggi: 62
Iscritto il: mar 14 feb , 2006 3:39 pm
Contatta:

Allora mi sono documentato e sono riuscito a fare il bonding,
ora sorge un problema, ho notato facendo dei ping che perdo il 50% dei pacchetti :shock: a cosa può essere dovuto?
Guide e howto su sistemi operativi linux e windows e apparati
http://www.betacrew.org
Guadagna con Fid€liux
Avatar utente
andrewp
Messianic Network master
Messaggi: 2199
Iscritto il: lun 13 giu , 2005 7:32 pm
Località: Roma

:shock:

uhm

:shock:

Mi posti la conf delle schede, un ifconfig -a, le rotte, il ping incriminato ed un paio di trace verso google?!
Manipolatore di bit.
Ir0nfl4m3
Cisco fan
Messaggi: 62
Iscritto il: mar 14 feb , 2006 3:39 pm
Contatta:

Allora il ping da un altro pc verso quello dove c'è il bonding attivato é quest

Esecuzione di Ping 192.168.1.1 con 32 byte di dati:

Risposta da 192.168.1.1: byte=32 durata<1ms TTL=64
Richiesta scaduta.
Risposta da 192.168.1.1: byte=32 durata<1ms TTL=64
Richiesta scaduta.

Statistiche Ping per 192.168.1.1:
Pacchetti: Trasmessi = 4, Ricevuti = 2, Persi = 2 (50% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
Minimo = 0ms, Massimo = 0ms, Medio = 0ms


Sulla macchina dove c'è il bonding ecco l' "ifconfig -a"

bond0 Link encap:Ethernet HWaddr 00:10:A7:17:78:0E
inet addr:192.168.1.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:122291 errors:0 dropped:0 overruns:0 frame:0
TX packets:206291 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22440974 (21.4 MiB) TX bytes:235332958 (224.4 MiB)

eth0 Link encap:Ethernet HWaddr 00:10:A7:17:78:0E
inet6 addr: fe80::210:a7ff:fe17:780e/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:122276 errors:0 dropped:0 overruns:0 frame:0
TX packets:205689 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22439309 (21.3 MiB) TX bytes:235255895 (224.3 MiB)
Interrupt:12 Base address:0xd400

eth1 Link encap:Ethernet HWaddr 00:10:A7:17:78:0E
inet6 addr: fe80::210:a7ff:fe17:780e/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:602 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1665 (1.6 KiB) TX bytes:77063 (75.2 KiB)
Interrupt:10 Base address:0xd000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3344 (3.2 KiB) TX bytes:3344 (3.2 KiB)



Che sia lo switch o una delle 2 schede che non supportano il bonding?
Guide e howto su sistemi operativi linux e windows e apparati
http://www.betacrew.org
Guadagna con Fid€liux
Rispondi