How to apply a bandwidth or latency limitation to network interface or protocol?

219 篇文章 2 订阅

https://access.redhat.com/solutions/69133

How to apply a bandwidth or latency limitation to network interface or protocol?

 SOLUTION 已验证 - 已更新 2017年六月26日09:52 - 

English 

环境

  • Red Hat Enterprise Linux
  • Networking

问题

  • How to apply a bandwidth or latency limitation to network interface or protocol?
  • How to configure latency on Ethernet interfaces in a test environment to simulate production?
  • How do I use the tc traffic control command and qdisc (queueing disciplines)?
  • How to limit bandwidth for a single protocol like NFS?
  • We found excessive use of bandwidth, how can we restrict it?
  • How can a QoS (Quality of Service) policy be setup on a system to prioritize the network bandwidth usage?
  • Outage is experienced at times when NetBackup jobs starts running. Is there a way to throttle bandwidth on the network interface that will provide lower priority to the backup traffic and reserve the network bandwidth on the interface?

决议

The limiting of network bandwith can be done on Linux with the tc (traffic control) program and by the use of different "qdisc" (queueing discipline) when transmitting traffic.

Network traffic is submitted to the queuing discipline, which may buffer and re-order traffic, before submitting that traffic to the network card.

Following from left to right:

Raw

[ application - high priority ] --\
[ application - med priority  ] --->--- [ qdisc ] --- [ NIC transmit ]
[ application - low priority  ] --/

The qdisc is able to match traffic on certain parameters, allowing the "high priority" application to have guaranteed bandwidth over the lower applications, and the "medium priority" application to have guaranteed bandwidth over the lower application, but not the higher.

The qdisc can also only submit packets of all types (or certain types) at a specific rate to the network interface, resulting in a traffic ratelimit.

Whilst most bandwidth and latency ratelimiting focuses on transmit (outgoing) traffic, Linux enables receive (incoming) traffic to also be throttled with reasonably good results.

Specific Examples

The following examples are documented and could be used as a basis for further specific modifications:

Useful Resources

Assistance

Red Hat Production Support assistance is available for queries relating to the configuration and usage of tc and related commands.

Asking Red Hat Production Support to directly write configuration for specific customer needs is beyond the Scope of Coverage. If you would like Red Hat to perform this work for you, please contact your Red Hat Sales representative to discuss a consulting engagement.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值