zoukankan      html  css  js  c++  java
  • linux 配置聚合连接team(网卡绑定) , systemd 控制

    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 

  • 相关阅读:
    处理MySQL的ibdata1文件过大问题
    关于mysql启动问题---mysqld_safe mysqld from pid file * ended
    mysql数据库指定ip远程访问
    关于access_log 日志文件以及ip、uv和pv的定义
    nginx配置及内核优化详解
    LN : leetcode 746 Min Cost Climbing Stairs
    LN : leetcode 684 Redundant Connection
    LN : leetcode 730 Count Different Palindromic Subsequences
    LN : leetcode 516 Longest Palindromic Subsequence
    LN : leetcode 215 Kth Largest Element in an Array
  • 原文地址:https://www.cnblogs.com/yaoyangding/p/14874974.html
Copyright © 2011-2022 走看看