[2153] in linux-net channel archive
Using ipfwadm to improve PPP latency
daemon@ATHENA.MIT.EDU (Snow Cat)
Tue Mar 19 15:11:33 1996
From: Snow Cat <snowcat@math.csufresno.edu>
To: linux-ppp@vger.rutgers.edu
Date: Sun, 17 Mar 1996 15:24:43 -0800 (PST)
Cc: linux-net@vger.rutgers.edu
Hi,
I am trying to use ipfwadm to assign higher priority to telnet, rlogin and
other interactive services over a slow PPP connection. I found the following
definition in /usr/include/linux/socket.h:
#define IPTOS_LOWDELAY 0x10
#define IPTOS_THROUGHPUT 0x08
#define IPTOS_RELIABILITY 0x04
So I guess these two lines will request low delay for interactive services:
ipfwadm -O -a accept -t E3 10 -P tcp -S 0/0 -D 0/0 7 21 23 53 79 513 6000 6777
ipfwadm -I -a accept -t E3 10 -P tcp -D 0/0 -S 0/0 7 21 23 53 79 513 6000 6777
and these two lines will request high throughput (= background priority for
Linux) for other services:
ipfwadm -O -a accept -t E3 8 -P tcp -S 0/0 -D 0/0 20 25 80 22 111 2049
ipfwadm -I -a accept -t E3 8 -P tcp -D 0/0 -S 0/0 20 25 80 22 111 2049
Is this correct? I am asking, because "Internetworking with TCP/IP" by
Douglas E. Comer shows a different layout for TOS byte:
0 1 2 3 4 5 6 7
Precedence D T R Unused
Which version is wrong? :)
Also, can I set precedence in addition to transport type with, say,
-t 03 F0? From the following fragment of /usr/src/linux/net/ipv4/ip_sockglue.c
it looks like Linux doesn't give a packet with transport type set any special
treatment unless precedence is 0:
case IP_TOS:
if(val<0||val>255)
return -EINVAL;
sk->ip_tos=val;
if(val==IPTOS_LOWDELAY)
sk->priority=SOPRI_INTERACTIVE;
if(val==IPTOS_THROUGHPUT)
sk->priority=SOPRI_BACKGROUND;
return 0;
Any comments? Thanks!
--
Snow ^oo^ Cat <snowcat@math.CSUFresno.EDU>
_ -> <- aka Oleg Kibirev <oleg@math.CSUFresno.EDU>
___(_) _ _)_
/ _) finger oleg@math.math.CSUFresno.EDU for PGP public key
\_.-._
|___/ Purr!