zoukankan      html  css  js  c++  java
  • 网络tc 相关

    1. net_cls
      主要是和tc配合使用。
      The net_cls subsystem tags network packets with a class identifier (classid) that allows the Linux traffic controller (tc) to identify packets originating from a particular cgroup. The traffic controller can be configured to assign different priorities to packets from different cgroups.
      net_cls.classid
      net_cls.classid contains a single value that indicates a traffic control handle. The value of classid read from the net_cls.classid file is presented in the decimal format while the value to be written to the file is expected in the hexadecimal format. For example, 0x100001 represents the handle conventionally written as 10:1 in the format used by the ip utility. In the net_cls.classid file, it would be represented by the number 1048577.
      The format for these handles is: 0xAAAABBBB, where AAAA is the major number in hexadecimal and BBBB is the minor number in hexadecimal. You can omit any leading zeroes; 0x10001 is the same as 0x00010001, and represents 1:1. The following is an example of setting a 10:1 handle in the net_cls.classid file:
    ~]# echo 0x100001 > /cgroup/net_cls/red/net_cls.classid
    ~]# cat /cgroup/net_cls/red/net_cls.classid
    1048577
    

    Refer to the man page for tc to learn how to configure the traffic controller to use the handles that the net_cls adds to network packets.

    参考文档
    redhat document

    欢迎评论交流
  • 相关阅读:
    如果你正在找工作,也许这七个方法会帮到你
    WebSocket 浅析
    关系数据库涉及中的范式与反范式
    MySQL字段类型与合理的选择字段类型
    ER图,数据建模与数据字典
    详解慢查询
    MySQL的最佳索引攻略
    后端技术演进
    MySQL主从复制(BinaryLog)
    MySQL读写分离
  • 原文地址:https://www.cnblogs.com/linengier/p/11105635.html
Copyright © 2011-2022 走看看