我必须桥接的千兆位网络接口。
/ etc / network / interfaces是:
auto lo
iface lo inet loopback
# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
iface eth1 inet manual
# Bridge setup
auto br0
iface br0 inet static
bridge_ports eth0 eth1
address 192.168.88.2
broadcast 192.168.88.255
netmask 255.255.255.0
gateway 192.168.88.254
dns-nameservers 192.168.88.254
但是MTU只有1500
myth@myth:~$ traceroute --mtu 192.168.88.1
traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
1 RoboStation.local (192.168.88.1) 0.278 ms F=1500 0.279 ms 0.287 ms
如果我运行以下命令:
myth@myth:~$ sudo ifconfig eth0 mtu 9000
myth@myth:~$ sudo ifconfig eth1 mtu 9000
myth@myth:~$ traceroute --mtu 192.168.88.1
traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
1 RoboStation.local (192.168.88.1) 0.407 ms F=9000 0.422 ms 0.383 ms
现在我的MTU为9000,传输到NAS的速度更快
但是,我想我只是在/ etc / network / interfaces文件中执行此操作:
auto lo
iface lo inet loopback
# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
mtu 9000
iface eth1 inet manual
mtu 9000
# Bridge setup
auto br0
iface br0 inet static
bridge_ports eth0 eth1
address 192.168.88.2
broadcast 192.168.88.255
netmask 255.255.255.0
gateway 192.168.88.254
dns-nameservers 192.168.88.254
mtu 9000
但是网络无法在启动时启动
我mtu 9000
从br0部分中删除了,然后启动了PC,并启动了网络,但MTU仍为9000
如何在引导时将eth0和eth1的MTU设置为9000,以便网桥在9000运行?
还有没有一种方法可以测试/ etc / network / interfaces而无需一直重启?