1

I will try to garantee some QoS with my access point made with Raspberry Pi.

Before starting, I'm getting my hands dirty: I read about the tcp, udp and ip headers. In the IP header description I saw the DSCP field, originally defined as the Type of Service field.

DSCP field would provide me interesting infos about the Qos, so I looked for it...but I couldn't find it: I still have the deprecated tos field.

From my /usr/include/netinet/ip.h:

struct ip {
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ip_hl:4;       /* header length */
unsigned int ip_v:4;        /* version */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int ip_v:4;        /* version */
unsigned int ip_hl:4;       /* header length */
#endif
u_int8_t ip_tos;            /* type of service */
u_short ip_len;         /* total length */
u_short ip_id;          /* identification */
u_short ip_off;         /* fragment offset field */
#define IP_RF 0x8000            /* reserved fragment flag */
#define IP_DF 0x4000            /* dont fragment flag */
#define IP_MF 0x2000            /* more fragments flag */
#define IP_OFFMASK 0x1fff       /* mask for fragmenting bits */
u_int8_t ip_ttl;            /* time to live */
u_int8_t ip_p;          /* protocol */
u_short ip_sum;         /* checksum */
struct in_addr ip_src, ip_dst;  /* source and dest address */
};

Infos about my sistem:

uname -r -> 3.13.0-49-generic
lsb_release -a -> Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.2 LTS
    Release:    14.04
    Codename:   trusty
elmazzun
  • 1,066
  • 2
  • 18
  • 44

1 Answers1

2

The DSCP field has taken the place of the ToS field: these are just two names for the very same field in the IP header. If the sender put a DSCP value into the field, then it's just fine to access it using the ToS field.

Note however that whether and how the DSCP/ToS field will be actually parsed by routers is highly implementation dependent. Most carriers (ISPs) will simply clear the field as it enters their network. Most home routers will ignore the field, although OpenWRT will interpret it as a ToS.

In short — using the DSCP/ToS field without a good understanding of your local network environment is just cargo culting.

jch
  • 5,382
  • 22
  • 41