Python Forum
Frames above 2000 bytes not acknowledged by client/receiver - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Frames above 2000 bytes not acknowledged by client/receiver (/thread-12436.html)



Frames above 2000 bytes not acknowledged by client/receiver - lukasz139 - Aug-24-2018

HI,
I working on adding a jumbo frame functionality to my application. My problem is that I receive no ACK for frames with payload above 2000 bytes. My system looks as follows: the server sends requested measurement time to the client. The server side is an ARM processor with LwIP implementation of TCP/IP stack and with enabled support of jumbo frames. The client side is a Python script on my PC with network interface having jumbo frames enabled.

With configuration as above and payload above default 1460 system works fine. I do run with payload of 2000 bytes without problems. The MSS on client side is 9158, WIN 64320. The server side is: MSS 2000 and WIN 8000. However, once I increase the MSS on server side above 2000 bytes communication collapses. On Wireshark I can see that first frame with length above 2000 doesn't get acknowledged by the client (PC side) and re-transmissions begin. The client and server are connected directly without a switch. I have checked also that MTU of the PC NIC (with Python script running) is truly enabled for 9k frames.

The main part of the code responsible for socket handling:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))

##Send new connection string and print the echoed reply
s.send(str)
data = s.recv(BUFFER_SIZE)
d = data.decode('ASCII')
print(d+'. Connected with:'+TCP_IP)

.
.
.

#Input file name from keyboard
name_of_file=input('Type file name:\n')
Name = os.path.join(save_path, name_of_file+".txt")         
#Name = os.path.join(name_of_file+".txt")         file:///C:/Users/29_06_60psiout_5.txt
file=open(Name, 'w', newline='')
filewriter = csv.writer(file)

.
.
.

BUFFER_SIZE = 20000

###Loop waiting for frames:
while 1:
    data = s.recv(BUFFER_SIZE)
    if not data: ##If empty frame is received break and close the connection from client side
        file.close() 
        break
    i=0
    for value in data:
        filewriter.writerow([i, value])
        i=i+1
    index=index+1   

s.close()##Shpuld frovide FIN flag from client side
#filewriter.writerow(['End'])


print('Connection closed:\n',datetime.datetime.now().strftime(fmt),'\n')
The cloud shark link (with tcp filter): https://www.cloudshark.org/captures/5...

I will be thankful for any advice from experienced users. It looks to me that jumbo frame shouldn't be an issue, since I operate way above standard Ethernet payload size without problem.

Thank you in advance.