Estou tentando mudar uma MTU
interface.
Percebi que não muda corretamente ao usar systemd-networkd
, mas funciona quando uso o ip link set mtu
comando.
Atual MTU
é 1500:
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535
Agora, mudei meu /etc/systemd/network/50_eth0.network
arquivo e adicionei:
[Link]
MTUBytes = 1000
Após systemd-networkd
a reinicialização do serviço, syslog
mostra:
Nov 30 23:36:20 me kernel: [84974.429088] igb 0000:00:14.0: changing MTU from 1500 to 1280
E a corrente MTU
é 1280:
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535
Como você pode ver, eu queria 1000, mas mudou para 1280. Acho que li em algum lugar sobre um limite devido ao IPv6.
Agora, ao usar a ip
ferramenta:
ip link set mtu 1000 dev eth0
syslog
:
Nov 30 23:36:44 me kernel: [84998.785039] igb 0000:00:14.0: changing MTU from 1280 to 1000
E a corrente MTU
é 1000:
# ip -d link show dev eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1000 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff promiscuity 0 numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535
Por que uma forma funciona e a outra não?
Obrigado.
De acordo com o comentário da AB.
Na verdade, o final
MTUBytes
da[Link]
seção diz esta nota IPv6:Depois de desabilitar o IPv6 para essa interface, consegui um MTU inferior a 1280.
Desativei esse IPv6 para essa interface usando a diretiva da
[Network]
seção abaixo, com onone
valor: