Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2011 10:29:29 +0300
From:      c0re <nr1c0re@gmail.com>
To:        FreeBSD <freebsd-questions@freebsd.org>, freebsd-net@freebsd.org
Subject:   Strange behavior of MTU on loopback interfaces.
Message-ID:  <AANLkTi=HBE_D-RYNcdTYWXzr7w4z=%2BQ-JUiOBpQVYLhP@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello all!

I'm testing setting lower MTU on loopback interfaces to avoid some MTU
problems with IPSEC in a path of traffic.

ifconfig lo1 create
ifconfig lo1 mtu 1300
ifconfig lo1 5.5.5.5/32

# ifconfig lo1
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 1300
        inet 5.5.5.5 netmask 0xffffffff

#ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 12:ac:29:7c:fa:39
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active


And I set only one "Listen 5.5.5.5:80" in http.conf in apache 2.2

# sockstat -4 | grep 80
www      httpd      96843 3  tcp4   5.5.5.5:80            *:*
www      httpd      96838 3  tcp4   5.5.5.5:80            *:*
www      httpd      96837 3  tcp4   5.5.5.5:80            *:*
www      httpd      96836 3  tcp4   5.5.5.5:80            *:*
www      httpd      96835 3  tcp4   5.5.5.5:80            *:*
www      httpd      96834 3  tcp4   5.5.5.5:80            *:*
root     httpd      96833 3  tcp4   5.5.5.5:80            *:*

I run tcpdump -ni em0 port 80. And made telnet 5.5.5.5 80 from other
host and saw something wrong.

10:26:01.640866 IP 10.0.0.2.57553 > 5.5.5.5.80: S
1049284626:1049284626(0) win 65535 <mss 1460,sackOK,eol>
10:26:01.640902 IP 5.5.5.5.80 > 10.0.0.2.57553: S
2144222949:2144222949(0) ack 1049284627 win 65535 <mss
1460,sackOK,eol>
10:26:01.642632 IP 10.0.0.2.57553 > 5.5.5.5.80: . ack 1 win 65535

5.5.5.5:80 said that it has got tcp mss 1460. Why? I was waiting for
something like 1260.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=HBE_D-RYNcdTYWXzr7w4z=%2BQ-JUiOBpQVYLhP>