Using TC to manage bandwidth alloted to a given MPLS LSP

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

 



Title: Using TC to manage bandwidth alloted to a given MPLS LSP

Hi,

I've been trying to "egress police" an MPLS LSP, using the following calls:

# Set up the root CBQ
$TC qdisc add dev eth3 root handle 1: cbq bandwidth 10Mbit \
   allot 1514 cell 8 avpkt 1000 mpu 64

# Set up the CBQ class
$TC class add dev eth3 parent 1:0 classid 1:1 cbq \
   bandwidth 10Mbit rate 10Mbit \
   allot 1514 cell 8 weight 1Mbit prio 8 maxburst 20 avpkt 1000

# Set up the filter, with label matching and policing.
$TC filter add dev eth3 parent 1:0 protocol ip prio 1 u32 \
   match u32 0x00014000 0xfffff000 at 0 \
   police rate 2kbit burst 10k \
   drop flowid 1:1

The match should pick up 0x00014 (20) as the label on the packet, and police that flow to 2kbit.  Instead, it appears to ignore the MPLS packets completely, and allows the packets to flow at full bandwidth.  I've tried a similar match for IP destination address instead (matching on regular IP packets, not MPLS packets) and it works, so I know my basic script is correct.  I was under the impression that tc can match anything in the packet header - if so, why would it fail to match an MPLS packet?  Does it check the packet type before it tries to perform any matching?

Cheers!
Jon



---
Jonathan Earle
Linux Admin, ONC Software Development
Nortel Networks
* Email: jearle@nortelnetworks.com
* Phone: 613-768-1371
* Cell:  613-612-0946


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux