CentOS/RHEL7 設定網路卡 Teaming
將多個網路連接埠整合成一個虛疑網路卡可增加原本單埠時的速度,在 RHEL7/CentOS7 中支援的 Teaming 模式為 activebackup、roundrubin、loadbalance 與 lacp,這在 nmcli 指令中很方便就可以完成設定。
本文介紹如何新增一個 activebackup teaming NIC。
- NIC 介面為 eno33559296, eno50338560
- 新增一個 teaming 介面: team0
- team0 使用 activebackup
- team0 IP 為 10.8.1.80/24
Steps:
設定 team0
1 2 |
root # nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}' root # nmcli connection modify team0 ipv4.addresses "10.8.1.80/24" ipv4.method manual |
將 eno33559296, eno50338560 加入 team0
1 2 |
root # nmcli connection add type team-slave con-name team-p1 ifname eno33559296 master team0 root # nmcli connection add type team-slave con-name team-p2 ifname eno50338560 master team0 |
確認設定
1 2 3 4 |
root # nmcli connection show team-p2 6860c645-f23a-4f66-8fa8-fe5650b917d0 802-3-ethernet eno50338560 team-p1 a8c466a0-05a2-40e5-9e0c-628b0efc0419 802-3-ethernet eno33559296 team0 b2eea1df-c8f7-4a86-a12d-72c53393e89e team team0 |
啟用 team0
1 |
root # nmcli connection up team0 |