ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Oleg Shulga <oleg@pribor.kharkov.ua>
To: community@altlinux.ru
Subject: Re: [Comm] NAT: unreachable - need to frag (mtu 576) [tos 0xc0]
Date: Fri, 21 May 2004 09:50:10 +0300
Message-ID: <40ADA6A2.9050303@pribor.kharkov.ua> (raw)
In-Reply-To: <40ACF7B9.6020802@rmts.donpac.ru>

Eugene Prokopiev wrote:

> Здравствуйте!
> 
> Есть сеть следующей (несколько извращенной ;) ) конфигурации:
> 
> 1. Виртуальная машина под VMware (Win2K) - 192.168.3.3
> 2. Ност-машина (ALM 2.2) - 192.168.3.1. Она по диалапу дозванивается на 
> другую машину, и при дозвоне получает внешний адрес 192.168.201.1. Также 
> она осуществляет SNAT для 192.168.3.3
> 3. Dial-in сервер (ALM 2.2) с адресом 192.168.201.180 для диалапных 
> подключений и внешним реальным адресом. В этот внешний адрес посредством 
> SNAT преобразуется 192.168.201.1.
> 
> Задача: выйти с виртуальной машины во внешний мир.
> 
> tracert показывает, что ничего невозможного нет:
> 
> C:\>tracert yandex.ru
> 
> Трассировка маршрута к yandex.ru [213.180.216.200]
> с максимальным числом прыжков 30:
> 
>   1     1 ms    <1 мс    <1 мс  192.168.3.1
>   2   257 ms   129 ms   137 ms  192.168.201.180
>   3   167 ms   142 ms   129 ms  внешний реальный адрес dial-in сервера
>   4   143 ms   114 ms   127 ms  и т.д.
>   ...
> 
> Трассировка завершена. Удачно.
> 
> Но попытки подключиться к чему-нибудь по TCP (например зайти на 
> удаленную машину по ssh) заканчиваются неудачей.
> 
> Интересно, что с 192.168.3.3 можно подключиться ко всем машинам до 
> 192.168.201.1 включительно, а с машины 192.168.201.1 вообще куда угодно. 
> Т.е. проблемы, связанные с настройкой iptables, исключаются. Но 
> TCP-пакеты не проходят через 2 NAT'а одновременно, только через один.
> 
> Еще интересные вещи сообщает tcpdump -i eth0 "dst some_external_ip":
> 
> 20:58:28.838417 ewsd.donpac.ru > some_external_host_name: icmp: 
> 192.168.201.1 unreachable - need to frag (mtu 576) [tos 0xc0]
> 
> Происходит это при попытке подключиться по ssh к хосту 
> some_external_host_name.
> 
> На тему 576 - действительно такой mtu и mru выставлен в /etc/ppp/options 
> на Dial-in сервере. А скорость dial-in-модема установлена в 57600 bps
> 
> Куда копать дальше? Менять mtu? На что? И что вообще происходит?
> 

Может вот сюда?

man iptables /frag

    TCPMSS
        This  target  allows to alter the MSS value of TCP SYN packets, 
to con-
        trol the maximum size for that connection (usually limiting it 
to  your
        outgoing  interface's MTU minus 40).  Of course, it can only be 
used in
        conjunction with -p tcp.
        This target is used to overcome criminally braindead  ISPs  or 
servers
        which  block  ICMP  Fragmentation Needed packets.  The symptoms 
of this
        problem are that everything works fine from your Linux 
firewall/router,
        but machines behind it can never exchange large packets:
         1) Web browsers connect, then hang with no data received.
         2) Small mail works fine, but large emails hang.
         3) ssh works fine, but scp hangs after initial handshaking.
        Workaround:  activate  this option and add a rule to your 
firewall con-
        figuration like:
         iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
                     -j TCPMSS --clamp-mss-to-pmtu

        --set-mss value
               Explicitly set MSS option to specified value.

        --clamp-mss-to-pmtu
               Automatically clamp MSS value to (path_MTU - 40).

        These options are mutually exclusive.


-- 
WBR
Oleg Shulga, Kharkov Pribor, IT Manager



      reply	other threads:[~2004-05-21  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 18:23 Eugene Prokopiev
2004-05-21  6:50 ` Oleg Shulga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40ADA6A2.9050303@pribor.kharkov.ua \
    --to=oleg@pribor.kharkov.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git