Spring 2015 CSCI 373 Homework 6

This assignment is due in class on 7 April or may be uploaded to Homework 6 on moodle by 3:10 PM on 14 April. If you submit your homework with moodle, you should consider submitting in PDF.

Problems from the textbook

Do the following problems from Chapter 3 of the textbook. A complete copy of the problems is available from the course moodle page.

These problems are certainly detailed, but they are representative of a class of problems found on networking certification exams. If all else fails, you can connect to the Lynda lectures Everything You Need to Know about Subnetting (long) or Dividing your network with subnets and virtual local area networks (VLANs) (short). UNC Asheville students have free access to all the Lynda courses.

Problem of packet format

Derive the solution to this problem following the procedure we used in class on 19 March.

Suppose an application calls the sendto function of the socket API to send a 2000-byte datagram to port 4444 of host 152.18.69.99. Suppose the application is sending this datagram from port 8888 of host 152.18.69.116 and that the MTU of the network connecting 152.18.69.99 and 152.18.69.116 is 1500 bytes.

Describe the contents of any IP packets generated to execute the sendto operation. Your answer should consists of some filled-in (as best as possible) fields of the UDP and IP headers used in the datagram transmission.

Here are copies of the headers as given in the original IP and UDP specifications.

IP header

    0                   1                   2                   3   
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Source Address                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Destination Address                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Options                    |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Example Internet Datagram Header

UDP header

                  0      7 8     15 16    23 24    31  
                 +--------+--------+--------+--------+ 
                 |     Source      |   Destination   | 
                 |      Port       |      Port       | 
                 +--------+--------+--------+--------+ 
                 |                 |                 | 
                 |     Length      |    Checksum     | 
                 +--------+--------+--------+--------+ 
                 |                                     
                 |          data octets ...            
                 +---------------- ...                 

                      User Datagram Header Format