Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2009 16:41:40 +0900
From:      Hideki Yamamoto <hyama99@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: GIF MTU parmeter is needed
Message-ID:  <90dbee150912282341j206505d1jd3ef13b2ff866f5f@mail.gmail.com>
In-Reply-To: <4B39019C.1030705@elischer.org>
References:  <90dbee150912261333l602c4161nccaf1995dc83699a@mail.gmail.com> <4B3691FF.3050402@elischer.org> <90dbee150912270236k3be6e530r80d9e7576274137c@mail.gmail.com> <20091228185801.GA5508@verio.net> <4B39019C.1030705@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Thank you for your information.
I understand what happened in my freebsd box.

As David and Julian said, "route change" command control MTU of gif, and th=
e
initial value is set from gif interface MTU value when "route add"
command is executed.
The initial value is independent from the gif interface condition, up and d=
own.

The following shows the result of my test:
---------------------------------------------------------------------
Even after creating gif interface and getting it up,
MTU value by route commamd is copied from interface MTU value
when "route add" is executed.
---------------------------------------------------------------------
h9# ifconfig gif5 create up
h9# route add -inet6 2003:98::/64 -interface gif5
add net 2003:98::/64: gateway gif5
h9# route get -inet6 2003:98::/64
   route to: 2003:98::
destination: 2003:98::
       mask: ffff:ffff:ffff:ffff::
  interface: gif5
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1280         1         0
h9# route delete -inet6 2003:98::/64
delete net 2003:98::/64
h9# ifconfig gif5 mtu 1500
h9# route add -inet6 2003:98::/64 -interface gif5
add net 2003:98::/64: gateway gif5
h9# route get -inet6 2003:98::/64
   route to: 2003:98::
destination: 2003:98::
       mask: ffff:ffff:ffff:ffff::
  interface: gif5
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1500         1         0
h9# ifconfig gif5 inet tunnel 192.168.1.8 192.168.1.51
h9# ( ./udpgw -o -s 1500 & tshark -V -i gif5 | grep Payload ) & sleep
2 ; killall udpgw
[4] 1236
[1] 1238
Let's send 1500 length packet to 2003:98::2
Capturing on gif5
    Payload length: 1456
    Payload length: 68
    Payload length: 1456
    Payload length: 68
    Payload length: 1456
    Payload length: 68
    Payload length: 1456
    Payload length: 1456
    Payload length: 68

---------------------------------------------------------------------
After changing MTU from 1500 to 1300 by ifconfig command,
MTU value by route commamd is changed to 1300 automatically.
---------------------------------------------------------------------
h9# ifconfig gif5 mtu 1300
h9# ( ./udpgw -o -s 1500 & tshark -V -i gif5 | grep Payload ) & sleep
2 ; killall udpgw
[5] 1281
[1] 1283
Let's send 1500 length packet to 2003:98::2
Capturing on gif5
    Payload length: 1256
    Payload length: 268
    Payload length: 1256
    Payload length: 268
    Payload length: 1256
    Payload length: 268
    Payload length: 1256
    Payload length: 268
    Payload length: 1256
    Payload length: 1256
    Payload length: 268
    Payload length: 1256
    Payload length: 268
    Payload length: 268
h9# route get -inet6 2003:98::/64
   route to: 2003:98::
destination: 2003:98::
       mask: ffff:ffff:ffff:ffff::
  interface: gif5
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1300         1         0

---------------------------------------------------------------------
However, when changing MTU from 1300 to 1500 by ifconfig command,
MTU value by route command is not changed to 1500 automatically.
---------------------------------------------------------------------

h9# ifconfig gif5 mtu 1500
h9# route get -inet6 2003:98::/64
   route to: 2003:98::
destination: 2003:98::
       mask: ffff:ffff:ffff:ffff::
  interface: gif5
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1300         1         0
h9#



2009/12/29 Julian Elischer <julian@elischer.org>:
> David DeSimone wrote:
>>
>> Hideki Yamamoto <hyama99@gmail.com> wrote:
>>>
>>> =A0 =A0h99# ifconfig xl0 inet6 2001:99::1
>>> =A0 =A0h99# ifconfig gif0 create
>>> =A0 =A0h99# ifconfig gif0 inet tunnel 192.168.1.8 192.168.1.4
>>> =A0 =A0h99# route add -inet6 2001:98::/64 -interface gif0
>>> =A0 =A0add net 2001:98::/64: gateway gif0
>>> =A0 =A0h99# ifconfig =A0gif0 up
>>
>> I wonder if the problem you're seeing is due to the MTU attached to the
>> static route that you're adding rather than the MTU of the interface.
>>
>> Try different command sequences and perform a "route get" to find out
>> what MTU is being applied to the routes, to see if they change to what
>> you expect.
>>
>
>
> Actually the route mtu will over-ride the interface mtu I think..
> route change {address} mtu xxxx
>
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90dbee150912282341j206505d1jd3ef13b2ff866f5f>