nmcli
网络组:team
nmcli con add con-name team0 ifnames team0 type team config '{"runner":{"name":"jackwang"}}' ipv4.address 192.168.179.300/24 ipv4.method manual
nmcli con add con-name team0-eth0 ifnames eth0 type team-slave master team0
nmcli con add con-name team0-eth1 ifnames eth1 type team-slave master team0
nmcli con up team0-eth0
nmcli con up team0-eth1
nmcli con up team0
nmcli con 查看启用的网卡配置
nmcli dev dis eth1 禁用网卡
nmcli con up team0-eth1 启用网卡
nmcli dev dis eth2
nmcli con up team0-eth2
teamdctl team0 state 查看状态
[08:44:55-root@jack network-scripts]#teamdctl team0 state
setup:
runner: loadbalance
ports:
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
eth2
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
type类型:loadbalance,active-backup等
删除网络组配置:
nmcli con down team0
nmcli con del team0-eth1
nmcli con del team0-eth2
nmcli con del team0
nmcli con show
网桥
通过网桥可以将虚拟设备分成多组,虚拟连接到多个虚拟网桥上,起到隔离效果
软件包:bridge-utils
查看:brctl show
添加:brctl addbr br0
查看:brctl showmacs bro0
删除:brctl delbr br0
设备接入:brctl addif br0 eth0
设备接入:brctl addif br0 eth1
激活设备:ip link set br0 up//ifconfig br0 up
测试连通性
STP:生成树协议----避免网络风暴,产生回环,广播泛滥占用网络带宽
通过算法,避免回环
启用STP协议:brctl stp br0 on
使用nmcli创建网桥,写入配置文件
nmcli
nmcli con add type bridge con-name br0 ifname bro0 ipv4.address 192.168.179.100/24 ipv4.method manual
nmcli con add type bridge-slave con-name br0-eth0 ifname eth0 master br0
nmcli con add type bridge-slave con-name br0-eth1 ifname eth1 master br0
nmcli con up br0-eth0
nmcli con up br0-eth1
nmcli con up br0//ip link set br0 up//ifconfig br0 on
文章来源: blog.51cto.com,作者:菜机运维,版权归原作者所有,如需转载,请联系作者。
原文链接:https://blog.51cto.com/13434656/2523539
- 点赞
- 收藏
- 关注作者
评论(0)