This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CSCI 415 Data Communication Networks Homework 5 Due 03/26/08 Saad Mneimneh Visiting Professor Hunter College of CUNY Problem 1: File Transfer Consider a simple UDP-based protocol for requesting files (based somewhat loosely on the Trivial File Transfer Protocol, TFTP). The client sends an initial request, and the server answers (if the file can be sent) with the first data packet. Client and server continue with a stop and wait transmission mechanism. (a) Describe a scenario by which a client might request one file but get another; you may allow the client application to exit abruptly and be restarted with the same port. (b) Propose a change in the protocol that will make this situation much less likely. Problem 2: Internet checksum In ones complement arithmetic, a negative integer- x is represented as the com- plement of x , that is each bit of x is inverted (thats 1111111111111111- x , hence the name). Therefore, 5 is 0000000000000101, and -5 is 1111111111111010. Sim- ilarly, 3 is 0000000000000011 and -3 is 1111111111111100. When adding num- bers in ones complement, a carryout from the most significant bit must be added to the result (unlike in twos complement that is used in most machines). There- fore, if we add 1111111111111010 and 1111111111111100 ignoring the carry we get 1111111111110110. In ones complement arithmetic, the fact that this op- eration caused a carry from the most significant bit causes us to increment the...
View Full Document
This note was uploaded on 03/27/2010 for the course CSCI 415 taught by Professor Saadmneimneh during the Spring '08 term at CUNY Hunter.
- Spring '08
- Computer Networks