请问Deepin 15.4怎样桥接网卡实现br0?
Tofloor
poster avatar
intionwun
deepin
2017-04-24 18:59
Author
请问Deepin 15.4怎样桥接网卡实现br0?

Ubuntu 16.04
vi /etc/network/interfaces可以实现br0

但Deepin 15.4中interfaces没有内容,指向interfaces.d目录,但这个也没有内容
Reply Favorite View the author
All Replies
avatar
intionwun
deepin
2017-04-24 19:58
#1
请问一下,麻烦了@jingle
Reply View the author
avatar
jingle
deepin
2017-04-24 20:55
#2
https://bbs.deepin.org/post/138358
请问一下,麻烦了@jingle

已经反馈了
Reply View the author
avatar
yanbowen
deepin
Community Developer
2017-04-24 21:30
#3
参见:https://chegva.com/1383.html 和 https://wiki.archlinux.org/index.php/Network_bridge
没有 interfaces 文件就按照格式新建一个
Reply View the author
avatar
intionwun
deepin
2017-04-24 23:30
#4
Ubuntu16.04.2启用桥接网络
   先备份一套原有配置
sudo cp /etc/network/interfaces /etc/network/interfaces-bak
   对/etc/network/interfaces 配置文件进行更改
sudo gedit /etc/network/interfaces
# Enabing Bridge networking br0 interface
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
很简单就可以实现

但Deepin15.4下没办法,因文件没有内容
Reply View the author
avatar
snsmqing
deepin
2017-04-25 02:27
#5
本帖最后由 snsmqing 于 2017-4-24 18:29 编辑

如图,直接编辑/etc/network/interfaces文件,注意bridge_ports后面填写桥接的以太网口名。之后手动激活一下:
$ sudo ifup br0


Reply View the author
avatar
intionwun
deepin
2017-04-25 18:21
#6
https://bbs.deepin.org/post/138358
如图,直接编辑/etc/network/interfaces文件,注意bridge_ports后面填写桥接的以太网口名。之后手动激活一 ...

首先谢谢,不过这样设置后,ens33和br0都会得到一个IP地址,
正常的应该是ens33没有IP地址,br0有ip地址才对

interfaces修改成
# Enabing Bridge networking br0 interface
auto br0
iface br0 inet dhcp
bridge_ports ens33
bridge_stp off


所以肯定不是设置/etc/network/interfaces
求解答@jingle
Reply View the author
avatar
Island
deepin
2017-04-25 21:02
#7
本帖最后由 zhangshuang 于 2017-4-26 13:20 编辑

zs@zs-PC:/etc/NetworkManager$ cat NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true 改为false 试试  然后再编辑interface
Reply View the author
avatar
intionwun
deepin
2017-04-25 23:04
#8
https://bbs.deepin.org/post/138358
zs@zs-PC:/etc/NetworkManager$ cat NetworkManager.conf
[main]
plugins=ifupdown,keyfile

应该改成false吧?!
Reply View the author
avatar
snsmqing
deepin
2017-04-26 01:20
#9
https://bbs.deepin.org/post/138358
首先谢谢,不过这样设置后,ens33和br0都会得到一个IP地址,
正常的应该是ens33没有IP地址,br0有ip地址 ...

以前ubuntu里br启用后eth会失去IP,现在这样enps和br各有一个IP并不影响使用,我的kvm虚拟机用br0能正常连接网络。
Reply View the author