Use the route command. There are many tool parameters such as ifconfig, route, and ip. If you have any problems, you should check the parameters of these tools. The change in the window size has a significant impact on the performance of FTP and other programs.
[Root @ jcwkyl ipv4] # route del-net 10.60.56.0/24
[Root @ jcwkyl ipv4] # route add-net 10.60.56.0/24 window 4096 dev eth0
[Root @ jcwkyl ipv4] # route-n
Kernel IP routing table
Destination
Gateway
Genmask Flags Metric
Ref Use Iface
10.60.56.0
0.0.0.0
255.255.255.0 U
0
0 0 eth0
169.254.0.0
0.0.0.0
255.255.0.0 U
0
0 0 eth0
0.0.0.0
10.60.56.254
0.0.0.0
UG 0
0 0 eth0
[Root @ jcwkyl ipv4] # netstat-r
Kernel IP routing table
Destination
Gateway
Genmask
Flags MSS Window irtt Iface
10.60.56.0
*
255.255.255.0
U 0
4096 0 eth0
169.254.0.0
*
255.255.0.0
U 0
0 0 eth0
Default
10.60.56.254
0.0.0.0
UG 0
0 0 eth0
[Root @ jcwkyl ipv4] # route del default gw 10.60.56.254
[Root @ jcwkyl ipv4] # route add default gw 10.60.56.254 window 4096 dev eth0
[Root @ jcwkyl ipv4] # route-n
Kernel IP routing table
Destination
Gateway
Genmask Flags Metric
Ref Use Iface
10.60.56.0
0.0.0.0
255.255.255.0 U
0
0 0 eth0
169.254.0.0
0.0.0.0
255.255.0.0 U
0
0 0 eth0
0.0.0.0
10.60.56.254
0.0.0.0
UG 0
0 0 eth0
[Root @ jcwkyl ipv4] # netstat-r
Kernel IP routing table
Destination
Gateway
Genmask
Flags MSS Window irtt Iface
10.60.56.0
*
255.255.255.0
U 0
4096 0 eth0
169.254.0.0
*
255.255.0.0
U 0
0 0 eth0
Default
10.60.56.254
0.0.0.0
UG 0
4096 0 eth0
You also need to turn off scalable, that is:
[Root @ jcwkyl IPv4] # Echo 0>/proc/sys/NET/IPv4/tcp_window_scaling
If you want this change to take effect after restart, you can add the following line to the/etc/sysctl. conf file:
Net. ipv4.tcp _ window_scaling = 0