tcp mss vs mtu

our current network provider says that they have a restriction on their sim profile so that the mtu should be less than 1430. however things like pdn_dynamic_params_get() and at+cgcontrdp report differently (1500).

however, when we make a tcp connection (w/ tls) we see the tcp max-segment-size option set w/ 708. my reading of this option means that the modem's networking should restrict things so that it could have data outstanding but it's going to be restricted so that it doesnt get out of hand. the interfaces to the network stack dont allow for querying this (eg, getsockopt()) so asking how this value is getting set?

Parents
  • Hi,

     

    MTU can be read out by the AT command that you mention:

    at+cgcontrdp

    and this is given by the network. If it is not given by the network, it applies a default value, as described in this thread:

     Could you please tell me the maximum packet size NRF9160 modem can send over UDP and TCP/IP in case we use either NB-IoT or LTE-M? 

     

    Could be that your provider ensures encapsulation for both ipv4 and ipv6, as ipv6 has 80 bytes overhead (1420 + 80 = 1500 bytes, which is a very common MTU)

      

    however, when we make a tcp connection (w/ tls) we see the tcp max-segment-size option set w/ 708. my reading of this option means that the modem's networking should restrict things so that it could have data outstanding but it's going to be restricted so that it doesnt get out of hand. the interfaces to the network stack dont allow for querying this (eg, getsockopt()) so asking how this value is getting set?

    Yes, the max segment size (MSS) for TCP is 708 byte, and this restriction is imposed by the modem, meaning that you cannot change this.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    MTU can be read out by the AT command that you mention:

    at+cgcontrdp

    and this is given by the network. If it is not given by the network, it applies a default value, as described in this thread:

     Could you please tell me the maximum packet size NRF9160 modem can send over UDP and TCP/IP in case we use either NB-IoT or LTE-M? 

     

    Could be that your provider ensures encapsulation for both ipv4 and ipv6, as ipv6 has 80 bytes overhead (1420 + 80 = 1500 bytes, which is a very common MTU)

      

    however, when we make a tcp connection (w/ tls) we see the tcp max-segment-size option set w/ 708. my reading of this option means that the modem's networking should restrict things so that it could have data outstanding but it's going to be restricted so that it doesnt get out of hand. the interfaces to the network stack dont allow for querying this (eg, getsockopt()) so asking how this value is getting set?

    Yes, the max segment size (MSS) for TCP is 708 byte, and this restriction is imposed by the modem, meaning that you cannot change this.

     

    Kind regards,

    Håkon

Children
Related