好好百科

分享有趣又有用的知识

用户工具

站点工具


侧边栏

导航菜单

it:mtu

MTU

ping -4 -c 10 -M do imzhao.vicp.net -s 1424

1424 + 28 = 1452

sudo ip link set eth0 mtu 1452

sudo ip link set enp2s0 mtu 1452

/etc/systemd/system/setmtu@.service

[Unit]
Description=Set MTU on eth
Before=network.target

[Service]
Type=oneshot
EnvironmentFile=/etc/conf.d/setmtu
ExecStart=/usr/bin/ip link set dev %i up mtu ${%i}

[Install]
WantedBy=multi-user.target

/etc/systemd/system/setmtu.service

[Unit]
Description=Set MTU
Before=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set dev eth0/enp2s0 up mtu 1452

[Install]
WantedBy=multi-user.target

sudo systemctl enable --now setmtu.service

it/mtu.txt · 最后更改: 2019/09/19 23:47 由 老赵