伟明部落格

Linux使用ip命令操作Bridge

--发布于 2022-07-08 11:37:44

To create a bridge named br0, that have eth0 and eth1 as members:

ip link add name br0 type bridge
ip link set dev br0 up
ip link set dev eth0 master br0
ip link set dev eth1 master br0

To remove an interface from the bridge:

ip link set dev eth0 nomaster

And finally, to destroy a bridge after no interface is member:

ip link del br0
--更新于 2023-03-09 10:51:41