Eu tenho dois NICs no lado do servidor, eth0? 192.168.8.140 e eth1 ? 192.168.8.142. O cliente envia dados para 192.168.8.142, e espero iftop
mostrar o tráfego para eth1, mas isso não acontece. Todas as redes passam por eth0, então como posso testar as duas NICs?
Por que todo o tráfego passa por eth0 em vez de eth1? Eu esperava conseguir 1 Gbit/s por interface. O que há de errado com minha instalação ou configuração?
Servidor
ifconfig
eth0 Link encap:Ethernet HWaddr 00:00:00:19:26:B0
inet addr:192.168.8.140 Bcast:0.0.0.0 Mask:255.255.252.0
inet6 addr: 0000::0000:0000:fe19:26b0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45287446 errors:0 dropped:123343 overruns:2989 frame:0
TX packets:3907747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66881007720 (62.2 GiB) TX bytes:261053436 (248.9 MiB)
Memory:f7e00000-f7efffff
eth1 Link encap:Ethernet HWaddr 00:00:00:19:26:B1
inet addr:192.168.8.142 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: 0000::0000:0000:fe19:26b1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19358 errors:0 dropped:511 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1772275 (1.6 MiB) TX bytes:1068 (1.0 KiB)
Memory:f7c00000-f7cfffff
Lado do servidor
# Listen for incomming from 192.168.8.142
nc -v -v -n -k -l 192.168.8.142 8000 | pv > /dev/null
Listening on [192.168.8.142] (family 0, port 8000)
Connection from 192.168.8.135 58785 received!
Cliente
# Send to 192.168.8.142
time yes | pv |nc -s 192.168.8.135 -4 -v -v -n 192.168.8.142 8000 >/dev/null
Connection to 192.168.8.142 8000 port [tcp/*] succeeded!
Lado do servidor
$ iftop -i eth0
interface: eth0
IP address is: 192.168.8.140
TX: cumm: 6.34MB peak: 2.31Mb rates: 2.15Mb 2.18Mb 2.11Mb
RX: 2.55GB 955Mb 874Mb 892Mb 872Mb
TOTAL: 2.56GB 958Mb 877Mb 895Mb 874Mb
$ iftop -i eth1
interface: eth1
IP address is: 192.168.8.142
TX: cumm: 0B peak: 0b rates: 0b 0b 0b
RX: 4.51KB 3.49Kb 3.49Kb 2.93Kb 2.25Kb
TOTAL: 4.51KB 3.49Kb 3.49Kb 2.93Kb 2.25Kb
$ ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:00:00:19:26:b0 brd ff:ff:ff:ff:ff:ff
$ ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:00:00:19:26:b1 brd ff:ff:ff:ff:ff:ff