Saya mendapat dua NIC di sisi server, eth0? 192.168.8.140 dan eth1? 192.168.8.142. Klien mengirim data ke 192.168.8.142, dan saya berharap iftop
untuk menunjukkan lalu lintas untuk eth1, tetapi tidak. Semua jaringan melewati eth0, jadi bagaimana saya bisa menguji dua NIC?
Mengapa semua lalu lintas melewati eth0 bukan eth1? Saya berharap saya bisa mendapatkan 1 Gbit / s per antarmuka. Apa yang salah dengan pengaturan atau konfigurasi saya?
Server
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
Sisi server
# 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!
Klien
# 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!
Sisi server
$ 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