2013-06-12 2 views
0

어떤 TCP가 순서대로 데이터 전송을 구현하는지는 알고 있지만 실제로 A에서 B로 도착한 데이터가 A에서 보낸 실제 데이터인지 여부를 확인합니까? 그렇다면 정확히 어떻게됩니까?TCP 및 데이터 유효성

답변

1

does it actually validates the data that arrived from A to B is the actual data that was sent from A ?

, 아니. 수신자가 세션 중에 송신자와 동일한 수의 바이트를 수신하도록 시도합니다 (ack 및 syn 번호 사용). 또한 모든 세그먼트에 올바른 체크섬이 있는지 확인합니다. 체크섬은 많은 것을 보장하지는 않습니다. 호스트에 결함이있는 메모리가있는 경우 하나의 바이트 스트림을 보낸 다음 몇 개의 버퍼를 나중에 다른 바이트 스트림 (비트 플 래핑으로 인해)을 사용하여 체크섬을 계산할 수 있습니다. 체크섬은 올 바르지 만 송수신 된 메시지는 다릅니다. 안정성을 원할 경우 응용 프로그램 수준 메시지의 체크섬/해싱/서명을 항상 구현하십시오.

단일 비트 오류의 비용을 설명하는 관련 읽을 거리 : http://status.aws.amazon.com/s3-20080720.html.

0

나는 RFC 793에서이 excert 귀하의 질문에 대답을 생각 : 솔직히

The TCP must recover from data that is damaged, lost, duplicated, or 
delivered out of order by the internet communication system. This 
is achieved by assigning a sequence number to each octet 
transmitted, and requiring a positive acknowledgment (ACK) from the 
receiving TCP. If the ACK is not received within a timeout 
interval, the data is retransmitted. At the receiver, the sequence 
numbers are used to correctly order segments that may be received 
out of order and to eliminate duplicates. Damage is handled by 
adding a checksum to each segment transmitted, checking it at the 
receiver, and discarding damaged segments.