1. Homepage
  2. Programming
  3. COEN 233 Computer Networks - Programming Assignments: Client-Server UDP Communication

COEN 233 Computer Networks - Programming Assignments: Client-Server UDP Communication

Engage in a Conversation
USSanta Clara UniversitySCUCOEN 233COEN233Computer NetworksClient-Server UDP CommunicationCC++

Programming Assignments CourseNana.COM

COEN 233 Computer Networks CourseNana.COM

  CourseNana.COM

General Guidelines CourseNana.COM

  CourseNana.COM

    Programming projects are individual assignments, each student should write his/her own code. CourseNana.COM

    Each project requires a demo, during which the student should explain how the code works. CourseNana.COM

    Demos are part of the grade. The student only will receive full credit if demo has correct results. CourseNana.COM

    In addition to the demo, each student should submit the source code, input/output files, and a README.txt file containing instructions on how to compile and run your source code. CourseNana.COM

    The program should be turned in on or before deadline; demo must be performed on or before the deadline but after the program files have been turned in. CourseNana.COM

Program assignment 1: CourseNana.COM

  CourseNana.COM

Client using customized protocol on top of UDP protocol for sending information to the server. CourseNana.COM

Communication between one client and one server: CourseNana.COM

  CourseNana.COM

Design a protocol with the following primitives: CourseNana.COM

Start of Packet identifier ….. 0XFFFF CourseNana.COM

End of Packet identifier ….. 0XFFFF CourseNana.COM

Client Id……….Maximum 0XFF (255 Decimal) CourseNana.COM

Length ……….. Maximum 0XFF (255 Decimal) CourseNana.COM

  CourseNana.COM

Packet Types: CourseNana.COM

DATA…. ………….……….0XFFF1 CourseNana.COM

ACK (Acknowledge)……….0XFFF2 CourseNana.COM

REJECT…………………….0XFFF3 CourseNana.COM

  CourseNana.COM

Reject sub codes: CourseNana.COM

REJECT out of sequence…………….0XFFF4 CourseNana.COM

REJECT length mismatch…………...0XFFF5 CourseNana.COM

REJECT End of packet missing……..0XFFF6 CourseNana.COM

REJECT Duplicate packet…………...0XFFF7 CourseNana.COM

  CourseNana.COM

Data Packet Format: CourseNana.COM


CourseNana.COM

ACK (Acknowledge) Packet Format: CourseNana.COM

  CourseNana.COM

REJECT  Packet  Format: CourseNana.COM


CourseNana.COM

Procedure: CourseNana.COM

  CourseNana.COM

The client sends five packets (Packet 1, 2, 3, 4, 5) to the server. CourseNana.COM

The server acknowledges with ACK receive of each correct packet from client by sending five ACKs, one ACK for each 5 received packets. CourseNana.COM

  CourseNana.COM

The client then sends another five packets (Packet 1, 2, 3, 4, 5) to the server, emulating one correct packet and four packets with errors. CourseNana.COM

The server acknowledges with ACK receive of correct packet from client, and with corresponding Reject sub codes for packets with errors. CourseNana.COM

  CourseNana.COM

The client will start an ack_timer at the time the packet is sent to the server, if the ACK (Acknowledge) for each packet has not been received during ack_timer period by client before expiration of timer then client should retransmit the packet that was sent before. CourseNana.COM

The timer can be set at 3 seconds (recommended) and a retry counter should be used for resending the packet. If the ACK for the packet does not arrive before the timeout, the client will retransmit the packet and restart the ack_timer, and the ack_timer should be reset for a total of 3 times. CourseNana.COM

If no ACK was received from the server after resending the same packet 3 times, the client should generate the following message and display on the screen: CourseNana.COM

“Server does not respond”. CourseNana.COM

  CourseNana.COM

Error handling: CourseNana.COM

  CourseNana.COM

NOTE: All four error handling messages below should be simulated and displayed on the screen, the error response messages should be included in a (.pdf, .png, .jpg) file and turned in with your source code. CourseNana.COM

  CourseNana.COM

  CourseNana.COM

ACK error handling: CourseNana.COM

If the ACK timer expires and the ACK from server has not been received by client, an error message should be displayed on the screen by client prior to resending the packet. CourseNana.COM

  CourseNana.COM

Reject error handling with sub code: CourseNana.COM

  CourseNana.COM

Case-1: An error message should be displayed on the screen when the received packet at server is not in sequence with expected packet from client; an error message should be generated by server and sent to client. CourseNana.COM

            For example, if server receives packets 0, 1 and then 3, packet 3 is out of sequence because the server is expecting the packet 2 after receiving the packet 1. The server will not increment the expected sequence number until packet 2 has been received. CourseNana.COM

  CourseNana.COM

Case-2: The server receives a packet which its length field does not match the length of data in the payload’s field, an error message should be generated by server and send to the client. CourseNana.COM

            For example, if the length field of a received packet indicates the data payload is 125 bytes, but the actual payload is only 12 bytes, this packet has a length mismatch error. CourseNana.COM

  CourseNana.COM

Case-3: The server receives a packet which does not have the End of Packet Identifier, an error message should be generated by server and send to the client. CourseNana.COM

            For example, if the last byte of the packet is xFFF0, this packet has a missing end of packet identifier error. CourseNana.COM

  CourseNana.COM

Case-4: The server receives a duplicated packet (sequence number), an error message should be generated by server and send to the client. CourseNana.COM

            For example, if server receives packets 0, 1 and then packet 1 again, the second packet 1 is a duplicate packet, the server will not increment the expected sequence number. CourseNana.COM

  CourseNana.COM

  CourseNana.COM

Program assignment 2: CourseNana.COM

  CourseNana.COM

Client using customized protocol on top of UDP protocol for requesting identification from server for access permission to the cellular network. CourseNana.COM

Communication between one client and one server: CourseNana.COM

  CourseNana.COM

The client requests access information from server; the server will verify the validity of the request and will respond accordingly. CourseNana.COM

The communication between client and server will use the ack_timer, which was described in the first program assignment. CourseNana.COM

  CourseNana.COM

For the program assignment 2 you can imagine client’s software module is acting on behalf of a cell phone. CourseNana.COM

The client’s software module sends the request for identification of its device in a packet to the server; the packet has the following information: CourseNana.COM

  CourseNana.COM

Access permission request packet format: CourseNana.COM

CourseNana.COM


Start of Packet identifier ….. 0XFFFF CourseNana.COM

End of Packet identifier. ….. 0XFFFF CourseNana.COM

Client Id……………………………...Maximum 0XFF (255 Decimal) CourseNana.COM

Acc_Per (Access Permission)….…….0XFFF8 CourseNana.COM

Length ……………………………….Maximum 0XFF (255 Decimal) CourseNana.COM

Source Subscriber No………………..Maximum 0XFFFFFFFF (4294967295 Decimal) CourseNana.COM

  CourseNana.COM

 Technology: CourseNana.COM

2 G…………...02 CourseNana.COM

3 G…………...03 CourseNana.COM

4 G…………...04 CourseNana.COM

5 G…………...05 CourseNana.COM

  CourseNana.COM

Server opens and reads a file named “Verification_Database.txt”, the contents of this file will be saved on the server, which contains the Subscriber’s Number, Technology, and payment status (paid = 1, not paid = 0). CourseNana.COM

  CourseNana.COM

Verification Database Format: CourseNana.COM

Subscriber Number   Technology              Paid    CourseNana.COM

408-554-6805                         04                    1          (1 paid) CourseNana.COM

408-666-8821                         03                    0          (0 not paid) CourseNana.COM

408-680-8821                         02                    1          (1 paid) CourseNana.COM

  CourseNana.COM

After verifying the content of Identification request packet with the content of the Verification_Database.txt file, one of the following messages will be generated by the server: CourseNana.COM

  CourseNana.COM

Subscriber has not paid message: CourseNana.COM

CourseNana.COM

 

CourseNana.COM

Start of Packet identifier ….. 0XFFFF
CourseNana.COM

End of Packet identifier. ….. 0XFFFF CourseNana.COM

Client Id…………………….Maximum 0XFF (255 Decimal) CourseNana.COM

Not paid…. ………….….….0XFFF9 CourseNana.COM

Length …………………….. Maximum 0XFF (255 Decimal) CourseNana.COM

Source Subscriber No………Maximum 0XFFFFFFFF (4294967295 Decimal) CourseNana.COM

  CourseNana.COM

 Technologies: CourseNana.COM

2 G…………...02 CourseNana.COM

3 G…………...03 CourseNana.COM

4 G…………...04 CourseNana.COM

5 G…………...05 CourseNana.COM

  CourseNana.COM

Subscriber does not exist on database message: CourseNana.COM

CourseNana.COM

 

CourseNana.COM

Consider two cases in which the subscriber does not exist: CourseNana.COM

1.  Subscriber number is not found. CourseNana.COM

2.  Subscriber number is found, but the technology does not match. CourseNana.COM

  CourseNana.COM

Start of Packet identifier ….. 0XFFFF CourseNana.COM

End of Packet identifier …... 0XFFFF CourseNana.COM

Client Id…………………….Maximum 0XFF (255 Decimal) CourseNana.COM

Not exist…. ………….….….0XFFFA CourseNana.COM

Length …………………….. Maximum 0XFF (255 Decimal) CourseNana.COM

Source Subscriber No………Maximum 0XFFFFFFFF (4294967295 Decimal) CourseNana.COM

  CourseNana.COM

 Technologies: CourseNana.COM

2 G…………...02 CourseNana.COM

3 G…………...03 CourseNana.COM

4 G…………...04 CourseNana.COM

5 G…………...05 CourseNana.COM

  CourseNana.COM

Subscriber permitted to access the network message: CourseNana.COM

CourseNana.COM


CourseNana.COM

Start of Packet identifier ….. 0XFFFF CourseNana.COM

End of Packet identifier .….. 0XFFFF CourseNana.COM

Client Id…………………….Maximum 0XFF (255 Decimal) CourseNana.COM

Access_OK ………….….….0XFFFB CourseNana.COM

Length …………………….. Maximum 0XFF (255 Decimal) CourseNana.COM

Source Subscriber No………Maximum 0XFFFFFFFF (4294967295 Decimal) CourseNana.COM

  CourseNana.COM

 Technologies: CourseNana.COM

2 G…………...02 CourseNana.COM

3 G…………...03 CourseNana.COM

4 G…………...04 CourseNana.COM

5 G…………...05 CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
US代写,Santa Clara University代写,SCU代写,COEN 233代写,COEN233代写,Computer Networks代写,Client-Server UDP Communication代写,C代写,C++代写,US代编,Santa Clara University代编,SCU代编,COEN 233代编,COEN233代编,Computer Networks代编,Client-Server UDP Communication代编,C代编,C++代编,US代考,Santa Clara University代考,SCU代考,COEN 233代考,COEN233代考,Computer Networks代考,Client-Server UDP Communication代考,C代考,C++代考,UShelp,Santa Clara Universityhelp,SCUhelp,COEN 233help,COEN233help,Computer Networkshelp,Client-Server UDP Communicationhelp,Chelp,C++help,US作业代写,Santa Clara University作业代写,SCU作业代写,COEN 233作业代写,COEN233作业代写,Computer Networks作业代写,Client-Server UDP Communication作业代写,C作业代写,C++作业代写,US编程代写,Santa Clara University编程代写,SCU编程代写,COEN 233编程代写,COEN233编程代写,Computer Networks编程代写,Client-Server UDP Communication编程代写,C编程代写,C++编程代写,USprogramming help,Santa Clara Universityprogramming help,SCUprogramming help,COEN 233programming help,COEN233programming help,Computer Networksprogramming help,Client-Server UDP Communicationprogramming help,Cprogramming help,C++programming help,USassignment help,Santa Clara Universityassignment help,SCUassignment help,COEN 233assignment help,COEN233assignment help,Computer Networksassignment help,Client-Server UDP Communicationassignment help,Cassignment help,C++assignment help,USsolution,Santa Clara Universitysolution,SCUsolution,COEN 233solution,COEN233solution,Computer Networkssolution,Client-Server UDP Communicationsolution,Csolution,C++solution,