如何在每次重新启动时更改 initcwnd?

如何在每次重新启动时更改 initcwnd?

我可以改变initcwndTCP初始拥塞窗口)在我的 Debian Linux 系统上使用以下命令:

ip route change default via 123.123.123.241 dev eno1 onlink initcwnd 32

例子:

$ ip route show
default via 123.123.123.241 dev eno1 onlink 
123.123.123.240/29 dev eno1 proto kernel scope link src 123.123.123.242 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
$ ip route change default via 123.123.123.241 dev eno1 onlink initcwnd 32
$ ip route show
default via 123.123.123.241 dev eno1 onlink  initcwnd 32
123.123.123.240/29 dev eno1 proto kernel scope link src 123.123.123.242 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
$

重启后如何保留此更改?这是我的/etc/network/interfaces。这是添加此配置的正确位置吗?如何?

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
  address 123.123.123.242
  netmask 255.255.255.248
  network 123.123.123.240
  broadcast 123.123.123.29
  gateway 123.123.123.241
  dns-nameservers 123.123.1.2 123.123.1.66

auto eno1:0
iface eno1:0 inet static
  address 123.123.123.243
  netmask 255.255.255.248
  gateway 123.123.123.241

答案1

您可以将post-up- 命令添加到以下eno1部分/etc/network/interfaces

iface eno1 inet static
  ...
  dns-nameservers 123.123.1.2 123.123.1.66
  post-up ip route change default via 123.123.123.241 dev eno1 onlink initcwnd 32

iface eno0:2 inet static
  ...

有关 Debian 网络配置的更多详细信息

相关内容