I recently pulled some hardware out of storage and put together a fileserver and for whatever reason, the motherboard has two gigabit NICs on it. Since I was tinkering, I figured I might as well plug both of them in and see what happens. My original guess was that Ubuntu would assign one NIC as a primary route with a higher priority, similar to what happens when you connect to both WiFi and Ethernet at the same time.
But alas, what I'm finding is that it primarily seems to be transmitting on one interface and receiving on the other. This is really causing me to scratch my head: I can't figure out how or why it's doing this. My thoughts are that it would make more sense for the server to send and receive data on the same connection, as it would complicate things by sending acknowledgments using a different interface. I've tested this using both iSCSI and NFS with the same results.
ip route:
ashten@mass-storage:~$ ip route
default via 192.168.4.1 dev enp6s0 proto dhcp src 192.168.4.191 metric 100
default via 192.168.4.1 dev enp5s0 proto dhcp src 192.168.4.57 metric 100
192.168.4.0/24 dev enp6s0 proto kernel scope link src 192.168.4.191
192.168.4.0/24 dev enp5s0 proto kernel scope link src 192.168.4.57
192.168.4.1 dev enp6s0 proto dhcp scope link src 192.168.4.191 metric 100
192.168.4.1 dev enp5s0 proto dhcp scope link src 192.168.4.57 metric 100
ip -6 route:
::1 dev lo proto kernel metric 256 pref medium
2601:1c1:8804:57b3::/64 dev enp5s0 proto ra metric 100 expires 86394sec pref medium
2601:1c1:8804:57b3::/64 dev enp6s0 proto ra metric 100 expires 86394sec pref medium
fe80::/64 dev enp5s0 proto kernel metric 256 pref medium
fe80::/64 dev enp6s0 proto kernel metric 256 pref medium
default proto ra metric 100 expires 3594sec mtu 1500
nexthop via fe80::226d:31ff:fe01:2b8 dev enp6s0 weight 1
nexthop via fe80::226d:31ff:fe01:2b8 dev enp5s0 weight 1 pref medium
ifconfig:
ashten@mass-storage:~$ ifconfig
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.57 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fe80::6ef0:49ff:fe57:3fc prefixlen 64 scopeid 0x20<link>
inet6 2601:1c1:8804:57b3:6ef0:49ff:fe57:3fc prefixlen 64 scopeid 0x0<global>
ether 6c:f0:49:57:03:fc txqueuelen 1000 (Ethernet)
RX packets 34563916 bytes 49179525874 (49.1 GB)
RX errors 0 dropped 128937 overruns 0 frame 0
TX packets 138348330 bytes 30171509363 (30.1 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.191 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fe80::6ef0:49ff:fe57:3ec prefixlen 64 scopeid 0x20<link>
inet6 2601:1c1:8804:57b3:6ef0:49ff:fe57:3ec prefixlen 64 scopeid 0x0<global>
ether 6c:f0:49:57:03:ec txqueuelen 1000 (Ethernet)
RX packets 401203508 bytes 604740226354 (604.7 GB)
RX errors 0 dropped 121190 overruns 0 frame 0
TX packets 109130 bytes 99996128 (99.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Mostly I've been pushing files to the server thusfar, so the TX bytes is a bit low on both of them. But notice that on enp6s0, the RX bytes is 600GB, but the TX bytes is under 100MB. Using bmon
I can observe the same thing: With only one concurrent file transfer, the server is receiving on enp6s0 while simultaneously transmitting on enp5s0. bmon
also reveals that it's IPv6 packets that're being sent and received. Does IPv6 have rules regarding multiple IP addresses that's allowing for this? If so, I'm struggling to find said rule. Or am I totally off-base with my research?
ip -6 route
? – user1686 Jan 6 at 10:38