tap interfaces disabled in linux bridge - Carrier (IFF_RUNNING) <NO-CARRIER,BROADCAST,MULTICAST,UP>
2017-06-06 22:46
513 查看
https://serverfault.com/questions/540831/tap-interfaces-always-disabled-in-linux-bridge
#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
However my problem if that the tap interfaces always appear disabled in the bridge, and no traffic flows to them.
Is there any way to set the tap interfaces in forwarding state? I do not understand why they are not because STP is disabled.
Cheers
Daniel
==========================================================================================
For a persistent tap created with tunctl, you need an application which attaches to the tap, eg:
http://backreference.org/2010/03/26/tuntap-interface-tutorial/
or
http://blog.csdn.net/ztguang/article/details/72890346
tap interfaces always disabled in linux bridge
I have a physical interface eth0, and I want to create two virtual interfaces and bridge them with eth0. For this purpose I do:#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
However my problem if that the tap interfaces always appear disabled in the bridge, and no traffic flows to them.
$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
Is there any way to set the tap interfaces in forwarding state? I do not understand why they are not because STP is disabled.
Cheers
Daniel
==========================================================================================
Answer
Carrier (IFF_RUNNING) is only set on a tap when a user has the device handle open.For a persistent tap created with tunctl, you need an application which attaches to the tap, eg:
http://backreference.org/2010/03/26/tuntap-interface-tutorial/
or
http://blog.csdn.net/ztguang/article/details/72890346
相关文章推荐
- linux使用:解决克隆虚拟机后UP BROADCAST RUNNING MULTICAST问题
- <React: Up and Running>阅读笔记 — JSX
- <BEA-001110> <No test table set up for pool
- 编译Twitter的Heron时一直报错“heron/bazel_configure.py", line 25, in <module> import semver ImportError: No module named semver”如何处理。
- Unable to update the EntitySet 'T_JsAPI' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.
- An example in Linux programming <if--fi>
- it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping>
- it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element
- 报错Error:(2, 0) No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices
- <linux/in.h> VS <netinet/in.h>
- 关于64位CentOS上ptrace报<linux/user.h> no such file 错误的解决方法
- Error:(2, 0) No service of type Factory <LoggingManagerInternal> available in ProjectScopeServices.
- No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.
- linux weblogic <BEA-000110> <BEA-000109> Multicast socket receive error :Socket closed
- EF 新增数据时提示it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element
- <React: Up and Running>阅读笔记 — The life of a component & Excel: a fancy table component
- linux中tomcat启动错误:java.net.BindException: address already in use <null>:8443
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id
- AndroidStudio 报错 Error:(2, 0) No service of type Factory<LoggingManagerInternal> available in Proje
- Error:No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.