Christian Samsel
2017-Jan-20 18:59 UTC
[Samba] Samba multi channel route configuration on same subnet
So i was playing around with Samba multi channel and it was not working as i originally expected it. I have two hosts: my workstation running up to date Windows 10 with 2 interfaces my server running Gentoo with Samba 4.5.4 with 2 interfaces (all connected to the same network) workstation has IPs 192.168.2.114, 192.168.2.115 server has 192.168.2.16(enp2s0f0),192.168.2.17(enp2s0f1) i'm connecting to .16 using my workstation and i can send at 2x linespeed devided to both .16 and .17 as expected. But when i'm receiving Samba sends over .16 and only over .16 to both .114 and .115 at half line speed. It's because .16 has the default route. Adding single target routes to the two workstation IPs via different interfaces works, but i expected Samba to handle this internally. Windows handles this nicely without further work. What is the best practice? Am i suppose to add routes for all clients or place different interfaces in different subnets. Both seems ugly. Thanks for reading, Christian More info: server # ip route default via 192.168.2.1 dev enp2s0f0 192.168.2.0/24 dev enp2s0f0 proto kernel scope link src 192.168.2.16 192.168.2.0/24 dev enp2s0f1 proto kernel scope link src 192.168.2.17 server ~ # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether f8:b1:56:c1:3a:6b brd ff:ff:ff:ff:ff:ff 3: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:15:17:a0:0e:56 brd ff:ff:ff:ff:ff:ff inet 192.168.2.16/24 brd 192.168.2.255 scope global enp2s0f0 valid_lft forever preferred_lft forever 4: enp2s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:15:17:a0:0e:57 brd ff:ff:ff:ff:ff:ff inet 192.168.2.17/24 brd 192.168.2.255 scope global enp2s0f1 valid_lft forever preferred_lft forever server # lspci | grep Ether 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04) ###(not active) 02:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06) 02:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06) PS C:\WINDOWS\system32> Get-SmbMultichannelConnection Server Name Selected Client IP Server IP Client Interface Index Server Interface Index Client RSS Capable Client RDMA Capable ----------- -------- --------- --------- ---------------------- ---------------------- ------------------ ------------------- 192.168.2.16 True 192.168.2.115 192.168.2.17 20 4 False False 192.168.2.16 True 192.168.2.114 192.168.2.16 8 3 False False working route configuration: server # ip route default via 192.168.2.1 dev enp2s0f0 192.168.2.0/24 dev enp2s0f0 proto kernel scope link src 192.168.2.16 192.168.2.0/24 dev enp2s0f1 proto kernel scope link src 192.168.2.17 192.168.2.114 dev enp2s0f0 scope link 192.168.2.115 dev enp2s0f1 scope link