TCP Keep-Alives lasen mich gerade an meinem TCP-Verständniss zweifeln.
Folgende Situation:
Gemäss:
http://tools.ietf.org/html/rfc793#page-20
gibt es einen "Receive Sequence Space"
Zitat:
1 | 1 2 3
|
2 | ----------|----------|----------
|
3 | RCV.NXT RCV.NXT
|
4 | +RCV.WND
|
5 |
|
6 | 1 - old sequence numbers which have been acknowledged
|
7 | 2 - sequence numbers allowed for new reception
|
8 | 3 - future sequence numbers which are not yet allowed
|
Ich habe eine Situation die folgender sehr ähnelt, aber in einem Punkt
abweicht:
http://tools.ietf.org/html/rfc793#page-31
Situation:
1 | 1. CLOSED LISTEN
|
2 |
|
3 | 2. SYN-SENT --> <SEQ=100><CTL=SYN> --> SYN-RECEIVED
|
4 |
|
5 | 3. ESTABLISHED <-- <SEQ=300><ACK=101><CTL=SYN,ACK> <-- SYN-RECEIVED
|
6 |
|
7 | 4. ESTABLISHED --> <SEQ=101><ACK=301><CTL=ACK> --> ESTABLISHED
|
8 |
|
9 | 5. ESTABLISHED --> <SEQ=100><ACK=301><CTL=ACK> --> ESTABLISHED <-- TCP Keep Alive, hier ist mein Verständnisproblem.
|
Ich verbinde mich mit meinem Programm mit Telnet auf Port 80. Dabei geht
alles bis zum schritt 4. Aber wenn ich etwas eingebe und versende,
bekommt mein Programm von Telnet nicht die Daten:
"<SEQ=101><ACK=301><CTL=ACK><DATA>", sondern ein TCP Keep-Alive:
"<SEQ=100><ACK=301><CTL=ACK>".
Mein Problem damit: die Sequenznumer 100 liegt nichtmehr in meinem
recive window, da zu diesem Zeitpunkt SEG.SEQ=100 kleiner als RCV.NXT
ist:
http://tools.ietf.org/html/rfc793#page-25
1 | A segment is judged to occupy a portion of valid receive sequence
|
2 | space if
|
3 |
|
4 | RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
|
5 |
|
6 | or
|
7 |
|
8 | RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
|
Ich habe das komische gefühl, als ob ich irgendetwas offensichtliches
übersehe, aber ich komme einfach nicht dahinter... Wiso ist dieses TCP
Keep-Alive erlaubt, und warum wird es hier gesendet?