您的位置:首页 > 运维架构 > Linux

linux 配置聚合连接team(网卡绑定) , systemd 控制

2017-11-18 00:08 796 查看
配置聚合连接(网卡绑定)

team,聚合链接(也称为链路聚合)
有多块网卡(team-slave)一起组建而成的虚拟网卡,即“组队”
作用1:轮询式(roundrobin)的流量负载均衡。
作用2:热备份(activebackup)连接冗余。
热备份配置:{"runner":{"name":"activebackup"} }
man帮助辅助记忆
步骤:man teamd.conf
/example 全文查找example
按n跳转下一个匹配

一、添加team组
nmcil connection add type team con-name team0
ifname team0 config '{"runner":{"name":"activebackup"} }'

cat /etc/sysconfig/network-scripts/ifcfg-team0 查看
ifconfig team0 查看

二、添加组成员
nmcil connection add type team-slave ifname eth1
master team0

nmcil connection add type team-slave ifname eth2
master team0
三、配置team0的IP地址
nmcil connection modify team0 ipv4.method manual
ipv4.addresses 192.68.1.1/24 connection.autoconnect yes

四、激活team0
nmcil connection up team-slave-eth1 激活从设备eth1
nmcil connection up team-slave-eth2 激活从设备eth2
nmcil connection up team0 激活主设备team0

五、验证
teamdctl team0 state 专用于查看team信息

删除:
nmcil connection delete team-slave-eth1
nmcil connection delete team-slave-eth2

配置ipv6地址:
ipv6地址表示:
128个二进制位,冒号分隔的十六进制数。
每段内连接的前置0可省略,连续的多个:可简化为::
nmcil connection modify 'system eth0' ipv6.method
manual ipv6.addresses 2003:ac18::305/64
connection.autoconnect yes

nmcil connection up 'system eth0' 激活网卡
ifconfig eth0 查看
ping6 2003:ac18::305

systemd 控制
一个高效的系统系统服务器管理
开机服务并行启动,各系统服务间的精确依赖。
配置目录:/etc/systemd/system/
服务目录:/lib/systemd/system/
主要管理工具:systemctl
控制服务状态
systemctl start/stop/restart 服务名

查看服务运行状态
systemctl start lis-active 服务名
配置开机自启
查看服务是否开自启:
systemctl is-enabled 服务名
设置服务是否开机自启:
systemctl enable/disable 服务名
查看服务的状态:
systemctl status 服务名
管理运行级别(运行模式)
字符模式:multi-user.target
图形模式:graphical.target
查看默认的运行模式
systemctl get-default
设置默认的运行模式
systemctl set-default graphical.target
reboot
当前立即进入相应模式
systemctl isolate multi-user.target
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux systemd 控制