Debian

如何在每次重新啟動時更改 initcwnd?

  • July 7, 2019

我可以使用以下命令更改我的 Debian linux 系統的initcwndTCP 初始擁塞視窗):

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

您可以在以下部分添加post-up-command :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 網路配置的更多詳細資訊

引用自:https://unix.stackexchange.com/questions/528761