Community discussions

MikroTik App
 
raminmalek
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Sun Nov 02, 2008 5:51 pm

Udp Packet Size Problem Mikrotik Forward

Wed Jul 28, 2021 11:30 am

Hi Dear Friend I test my MTu path to 8.8.8.8 IS 1470 and mt DNS query is faild for mtu for tcp connection i change mss in firewall For udp Connection Ho change packet Size Generated By router Or forwared By router ????

Any Idea For this ???? Only change MtU of My ethernet ? ? For change My Udp packet Size?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Udp Packet Size Problem Mikrotik Forward

Wed Jul 28, 2021 11:47 am

When your MTU towards internet is limited (e.g. at the router provided by the ISP) to less than 1500 byte MTU it is certainly advisable to set that MTU on the ethernet interface towards internet (assuming that is how you connect it). That will tell the router to fragment larger packets.
Also, in that case add this rule to your mangle table when not already there (well, it looks like you already have it, but for others reading this):
/ip firewall mangle
add action=change-mss chain=forward new-mss=clamp-to-pmtu passthrough=yes \
    protocol=tcp tcp-flags=syn
That will tell the router to modify the MSS field in TCP SYN packets so that the advertised MSS corresponds with the MTU value set on the ethernet interface.
It will not work for UDP, but outgoing UDP DNS requests usually are smaller than that. When you have issues, it is more likely to affect TCP. The UDP issues should be fixed when using the corrected MTU on the internet interface.

Also, when you have IPv6, make sure you set the correct MTU in the IPv6->ND rule(s) active on your router.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Udp Packet Size Problem Mikrotik Forward

Wed Jul 28, 2021 2:43 pm

what method you use to connect to your ISP?

Who is online

Users browsing this forum: ccrsxx, GoogleOther [Bot], onnyloh, outtahere and 63 guests