linux添加虚拟网桥端口进入禁用状态,在linux网桥中始终禁用tap接口

我有一个物理接口eth0,我想创建两个虚拟接口并用eth0桥接它们.为此我做:

#Create the virtual interfaces

tunctl -t tap0

tunctl -t tap1

ifconfig tap0 up

ifconfig tap1 up

#Create the bridge

brctl addbr br0

brctl stp br0 off

brctl addif br0 eth0

brctl addif br0 tap0

brctl addif br0 tap1

#Turning up the bridge

ifconfig br0 up

但是我的问题是,如果tap接口总是在桥中出现禁用,并且没有流量流向它们.

$brctl show br0

bridge name bridge id STP enabled interfaces

br0 8000.080027cabeba no eth2

tap0

tap1

$brctl showstp br0

br0

bridge id 8000.080027cabeba

designated root 8000.080027cabeba

root port 0 path cost 0

max age 20.00 bridge max age 20.00

hello time 2.00 bridge hello time 2.00

forward delay 15.00 bridge forward delay 15.00

ageing time 300.01

hello timer 0.00 tcn timer 0.00

topology change timer 0.00 gc timer 298.42

flags

eth2 (1)

port id 8001 state forwarding

designated root 8000.080027cabeba path cost 4

designated bridge 8000.080027cabeba message age timer 0.00

designated port 8001 forward delay timer 12.97

designated cost 0 hold timer 1.24

flags

tap0 (2)

port id 8002 state disabled

designated root 8000.080027cabeba path cost 100

designated bridge 8000.080027cabeba message age timer 0.00

designated port 8002 forward delay timer 0.00

designated cost 0 hold timer 0.00

flags

tap1 (3)

port id 8003 state disabled

designated root 8000.080027cabeba path cost 100

designated bridge 8000.080027cabeba message age timer 0.00

designated port 8003 forward delay timer 0.00

designated cost 0 hold timer 0.00

flags

有没有办法将tap接口设置为转发状态?我不明白为什么他们不是因为STP被禁用.

干杯

丹尼尔

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值