我的设置是一台带 10G 卡(LR-LINK 6880BT)的 Windows 10 PC 和一台带 10G 卡(Synology E10G18-T1)的 Synology DS1618+ NAS。两个 10G 端口都直接连接,以避免购买 10G 交换机。
A)10G连接的工作原理:
- NAS eth4(10G)设置为192.168.178.11
- PC 10G设置为192.168.178.13
- NAS 10G与PC 10G直连
- >400MB/秒(受 NAS 性能限制)通过 SMB 从 .11 复制文件
B)为什么它不起作用:
- NAS eth4(10G)设置为192.168.178.11
- PC 10G设置为192.168.178.13
- NAS 10G与PC 10G直连
- NAS eth3(1G)设置为192.168.178.10
- NAS eth3连接到路由器(192.168.178.1)
- 我在 NAS 上创建了 eth3(1G)和 eth4(10G)之间的桥接(将 PC 连接到内部网络和互联网):
brctl addbr br0 brctl stp br0 off ifconfig br0 192.168.178.12 netmask 255.255.255.0 up brctl addif br0 eth3 brctl addif br0 eth4 ifconfig eth3 promisc up ifconfig eth4 promisc up
- <115 MB/秒通过 SMB 从 .12 复制文件
在两种情况下,PC 在其适配器状态中均显示“10,0 Gbit/s”传输速度。NAS 也是如此:
ethtool eth4
Settings for eth4:
Supported ports: [ TP ]
Supported link modes: 100baseT/Full
1000baseT/Full
10000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 100baseT/Full
1000baseT/Full
10000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 10000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: external
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Link detected: yes
可能很重要:我无法为网桥设置网关。我尝试过以下方法:
route add default gw 192.168.178.1 dev br0
但它返回:
SIOCADDRT: Network is unreachable
我不知道为什么,因为 IP 都设置正确:
ifconfig
br0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.178.12 Bcast:192.168.178.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:553505 errors:0 dropped:0 overruns:0 frame:0
TX packets:3324 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61656890 (58.8 MiB) TX bytes:2251363 (2.1 MiB)
...
eth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.178.10 Bcast:192.168.178.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:3422085 errors:0 dropped:0 overruns:0 frame:0
TX packets:845424 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4592877231 (4.2 GiB) TX bytes:1126753162 (1.0 GiB)
eth4 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.178.11 Bcast:192.168.178.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:1354792 errors:0 dropped:0 overruns:0 frame:0
TX packets:4370314 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1199786642 (1.1 GiB) TX bytes:6062719532 (5.6 GiB)
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth1
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no eth3
eth4
也许也很有趣:
- 网桥设置完成后,内网中的所有客户端都能够 ping .12
- 路由器未显示 .12。它仅列出 .10(无法 ping 通)和 .13(PC)。
- br0 和 eth3 以及路由器 .10 客户端都具有相同的 mac 地址