群晖上开启多网口来作为互通交换机实现10G网口共享
date
Apr 4, 2022
slug
synology-open-vswitch-muliti-ports
status
Published
summary
小技巧 这样可以随意选择几个物理口组成一个虚拟交换机来使用
tags
tip
type
Post
URL
Problem & Summary
- LAN 5(→ eth4) 和 LAN 6 (对应eth5) 一开始这几个都是WAN口
- 我希望LAN 6接外网,LAN 5可以接电脑;这样LAN 5可以通过LAN6连接至外网上
- LAN 5和LAN 6都是万兆网口,所以就可以有效利用了多一个万兆的通路
Solution
先Enable Open vSwitch

ovs-vsctl list-br
# * (连外网WAN交换机) LAN 6 = ovs_eth5
# * (桥接外接设备 - 比如Mac) LAN 5, 删除 ovs_eth4
ovs-vsctl del-br ovs_eth4
# * 将LAN 5(eth4)加到ovs_eth5当中, 和LAN 6桥接
ovs-vsctl add-port ovs_eth5 eth4
# 恢复
ovs-vsctl del-port ovs_eth5 eth4
ovs-vsctl add-br ovs_eth4
ovs-vsctl add-port ovs_eth4 eth4
ovs-vsctl show
结束后,你会发现在列表当中LAN 5不见了 - 插入LAN 5可以上网就ok了

重启后会失效,加上一个开机任务
ovs-vsctl del-br ovs_eth4 && ovs-vsctl add-port ovs_eth5 eth4


