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

简介:

           配置聚合连接(网卡绑定)

           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 

 

            

     本文转自夜流璃雨 51CTO博客,原文链接:http://blog.51cto.com/13399294/1982934,如需转载请自行联系原作者






相关文章
|
7天前
|
Oracle Java 关系型数据库
Linux环境安装配置JDK11
Linux环境安装配置JDK11
34 0
|
2天前
|
存储 关系型数据库 MySQL
linux安装MySQL8.0,密码修改权限配置等常规操作详解
linux安装MySQL8.0,密码修改权限配置等常规操作详解
|
3天前
|
存储 安全 数据管理
【专栏】如何在 Rocky Linux 8 上安装和配置 Elasticsearch
【4月更文挑战第28天】本文指导在Rocky Linux 8上安装配置Elasticsearch,包括添加仓库,运行`yum install elasticsearch`进行安装,修改配置文件如`cluster.name`和`network.host`,启动服务并验证其正常运行。同时,文章提及了内存、文件描述符设置及安全配置,并列出常见问题及解决方法,帮助用户成功搭建Elasticsearch。
|
4天前
|
Linux 网络安全 Docker
【Linux】-docker配置容器并打包成镜像
【Linux】-docker配置容器并打包成镜像
|
4天前
|
网络协议 Linux 开发工具
|
5天前
|
监控 关系型数据库 MySQL
|
6天前
|
监控 Linux 网络安全
Linux服务器如何查询连接服务器的IP
【4月更文挑战第17天】Linux服务器如何查询连接服务器的IP
8 1
|
7天前
|
安全 应用服务中间件 网络安全
linux_nginx中添加ssl配置(open ssl)
linux_nginx中添加ssl配置(open ssl)
16 1
|
7天前
|
Ubuntu Linux
Linux(Ubuntu)系统临时IP以及静态IP配置(关闭、启动网卡等操作)
请注意,以上步骤是在临时基础上进行配置的。如果要永久保存静态IP地址,通常还需要修改 `/etc/network/interfaces`文件,以便在系统重启后保持配置。同时,确保备份相关配置文件以防止出现问题。
24 1
|
8天前
|
Java Linux 开发工具
Linux 配置 Java/JDK 环境
Linux 配置 Java/JDK 环境
17 0