OpenVPN vs ovpn-client на Микротике: настройка MTU

Обсуждение ПО и его настройки
Ответить
achekalin
Сообщения: 40
Зарегистрирован: 12 сен 2012, 09:25

Добрый день!

Есть схема: стоит OpenVPN-сервер на Ubuntu, к нему цепляется Mikrotik (с прошивкой 6.4, там вроде что-то допиливали). Интерфейсы - TUN. Пытаюсь решить задачу выставления MTU внутри туннеля OpenVPN в величину, скажем, 1300.

На микротике все предельно просто, к MTU (согласно мануалу) относится только значение max-mtu:
max-mtu n (integer; Default: 1500) -
Maximum Transmission Unit. Max packet size that OVPN interface will be able to send without packet fragmentation.



На OpenVPN-сервере на Linux-е вариантов в документации параметров куда больше. Правда, большая их часть относится к линкам поверх транспорта UDP, так что нам остается играться с:
tun-mtu n - Take the TUN device MTU to be n and derive the link MTU from it (default=1500). In most cases, you will probably want to leave this parameter set to its default value.

The MTU (Maximum Transmission Units) is the maximum datagram size in bytes that can be sent unfragmented over a particular network path. OpenVPN requires that packets on the control or data channels be sent unfragmented.

MTU problems often manifest themselves as connections which hang during periods of active usage.

It's best to use the --fragment and/or --mssfix options to deal with MTU sizing issues.

(и fragment, и mssfix нам без пользы, они работают с UDP).

и с:
tun-mtu-extra n - Assume that the TUN/TAP device might return as many as n bytes more than the --tun-mtu size on read. This parameter defaults to 0, which is sufficient for most TUN devices. TAP devices may introduce additional overhead in excess of the MTU size, and a setting of 32 is the default when TAP devices are used. This parameter only controls internal OpenVPN buffer sizing, so there is no transmission overhead associated with using a larger value.


Есть еще параметры
mtu-disc type - Should we do Path MTU discovery on TCP/UDP channel? Only supported on OSes such as Linux that supports the necessary system call to set.

'no' -- Never send DF (Don't Fragment) frames
'maybe' -- Use per-route hints
'yes' -- Always DF (Don't Fragment)

и
mtu-test - To empirically measure MTU on connection startup, add the --mtu-test option to your configuration. OpenVPN will send ping packets of various sizes to the remote peer and measure the largest packets which were successfully received. The --mtu-test process normally takes about 3 minutes to complete.

Но это что-то не столь очевидное в смысле пользы делу.

Куда смотреть - совсем голову сломал. Какое параметр на стороне сервера OpenVPN выставить и в какое значение, чтобы получить ту же настройку, которую делает Микротик при указании max-mtu 1300 - получается, это будет tun-mtu?


Ответить