A FIN has no payload, but it still advances the sequence count by one.

highlighted = computed this step

ACK names the next control slot

The ACK field in the server segment is 1004. It names the next client-side sequence slot wanted.

ACK field=1004\text{ACK field}=1004
ACK field names 1004The toy TCP ACK segment is decoded from exact header bytes.ACK header160 bits / 20 bytes0x01bb9c4000001389000003ec5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101100byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1004data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0

The arithmetic is plus one

The FIN used sequence 1003 and consumes 1 sequence number.

1003+1=10041003+1=1004
ACK field names 1004The toy TCP ACK segment is decoded from exact header bytes.ACK header160 bits / 20 bytes0x01bb9c4000001389000003ec5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101100byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1004data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0

The header agrees

The bit strip's acknowledgment-number field shows 1004, matching the recomputed FIN rule.

acknowledgment-number=1004\text{acknowledgment-number}=1004
ACK field names 1004The toy TCP ACK segment is decoded from exact header bytes.ACK header160 bits / 20 bytes0x01bb9c4000001389000003ec5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101100byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1004data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0

Summary

A FIN with no payload is acknowledged as sequence plus one.

FIN ACK=1004\text{FIN ACK}=1004
ACK field names 1004The toy TCP ACK segment is decoded from exact header bytes.ACK header160 bits / 20 bytes0x01bb9c4000001389000003ec5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101100byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1004data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0