小编tMC*_*tMC的帖子

/usr/bin/env 如何知道使用哪个程序?

当我使用shebang#!/usr/bin/env python运行脚本时,系统如何知道python使用哪个?如果我python在环境变量中寻找 bin 路径,我什么也找不到。

env | grep -i python
Run Code Online (Sandbox Code Playgroud)

python environment-variables

74
推荐指数
3
解决办法
5万
查看次数

tc 桥接端口

我有一个 4 端口网桥:

root@Linux-Switch:~# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.000024cd2cb0   no      eth0
                            eth1
                            eth2
                            eth3
Run Code Online (Sandbox Code Playgroud)

我的目标是限制eth2接口的上传速度。(eth0 是上行交换机的上行接口)。我一直在尝试通过 tc 和 iptables 来做到这一点。

# tried in both the filter table and mangle table
iptables -A FORWARD -t mangle -m physdev --physdev-in eth2 -j MARK --set-mark 5 

tc qdisc add dev eth0 root handle 1:0 htb default 2
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit ceil 1mbit
tc class add dev eth0 parent …
Run Code Online (Sandbox Code Playgroud)

linux networking iptables bridge tc

8
推荐指数
1
解决办法
4888
查看次数