[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] IP headers



Hello,

I am working on my final year project and I am using ns. I however need to alter 
some of the values in the IP hearer for the datagrams sent over my modelled 
network.

A summary of the contents of the internet header follows:

    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    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


In particular I would like to alter the values for the 'Type of Service' field. 
The Type of Service provides an indication of the abstract parameters of the 
quality of service desired.  These parameters are to be used to guide the 
selection of the actual service parameters when transmitting a datagram through 
a particular network.  Several networks offer service precedence, which somehow 
treats high precedence traffic as more important than other traffic (generally 
by accepting only traffic above a certain precedence at time of high load). The 
major choice is a three way tradeoff between low-delay, high-reliability, and 
high-throughput.

      Bits 0-2:  Precedence.
      Bit    3:  0 = Normal Delay,      1 = Low Delay.
      Bits   4:  0 = Normal Throughput, 1 = High Throughput.
      Bits   5:  0 = Normal Relibility, 1 = High Relibility.
      Bit  6-7:  Reserved for Future Use.

         0     1     2     3     4     5     6     7
      +-----+-----+-----+-----+-----+-----+-----+-----+
      |                 |     |     |     |     |     |
      |   PRECEDENCE    |  D  |  T  |  R  |  0  |  0  |
      |                 |     |     |     |     |     |
      +-----+-----+-----+-----+-----+-----+-----+-----+

        Precedence

          111 - Network Control
          110 - Internetwork Control
          101 - CRITIC/ECP
          100 - Flash Override
          011 - Flash
          010 - Immediate
          001 - Priority
          000 - Routine

My aim is to send packets accross the netwok and have control over the values in 
this field, ie send packets through a particular link with different type of 
service tags and log the effects. I have all this set up, all I need to do is 
know how to change the values in the 'type of service' field. I suspect this is 
easy once you know how and where to do it.

Any help would be greatly welcome  

Stephen Coulson
---------------
[email protected]
[email protected]

*************************************
http://www.geocities.com/sdcoulson_uk
*************************************

Why Rule The World When I Can Eat Baked Beans (Neil Freeman 15/11/99)