Hi linux-net,
I am trying to write into a raw socket and apply shaping on the
interface which the packets are going through, my question is
"does the packet go through the filters( u32 in my case) on the interface"
If not please suggest me an approach how I can do this ?
The following is the method which I adopted
I opened a raw socket with IP header include option and SO_DONTROUTE
option
*fd= socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
I am using *sendto* to write into this raw socket.
Reserve traffic with dst ip address = $1 , dport 0x08ae
------------------------------------------------------------------------
tc qdisc add dev $3 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000
\
mpu 64
tc class add dev $3 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
10Mbit \
allot 1514 cell 8 weight 1Mbit prio 8 maxburst 100 avpkt 1000 bounded
isolated
tc class add dev $3 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate $2 \
allot 1514 cell 8 weight 600Kbit prio 5 maxburst 100 avpkt 1000 split 1:0
bound\ed isolated
tc filter add dev $3 parent 1:0 protocol ip prio 5 u32 match ip dst
$1 match ip dport 0x08ae 0xffff classid 1:2
------------------------------------------------------------------------
Filtering the traffic written into a RAW socket :
- when I send the reserved traffic only, it works fine it get all the req.
bandwidth
- but when I reserve 4Mbit for the reserved traffic and shoot some noise
traffic say at 8Mbps,that does not give the reserved traffic requested
4Mbit anymore instead it gives around 2.5Mbps, important thing is the
aggregate traffic going out of the interface all decreases to 7Mbps
Specs: 450MHz, 3c509 10Mbit ,
kernel ver: 2.2.7-ac4-iproute
iproute2: iproute2-ss990417
Thnx,
Kishore
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]