Menu
blog.headdesk.me
blog.headdesk.me

Teaming NICs with teamd

Posted on 2015/02/022015/02/03

On recent version of Fefora, CentOS, and RHEL, it is possible to use teamd to setup link aggregation. Teamd is more configurable and it allows load balancing on LACP. Here we will walk through the simple configurations using old-fashion config files.

To setup load balancing without switch support (or when both connection go to the same switch)

# ifcfg-team0
DEVICE=team0
DEVICETYPE=team
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.122.13
PREFIX=24
TEAM_CONFIG='{"runner": {"name": "loadbalance"}, "link_watch": {"name": "ethtool"}}'
GATEWAY=192.168.122.1

# ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
TEAM_MASTER=team0
DEVICETYPE=TeamPort
ONBOOT=no
NM_CONTROLLED=no

# ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
TEAM_MASTER=team0
DEVICETYPE=TeamPort
ONBOOT=no
NM_CONTROLLED=no

To configure LACP which requires port channel on the switch side

DEVICE=team0
DEVICETYPE=Team
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
TEAM_CONFIG='{"runner": {"name": "lacp", "active": false, "fast_rate": false, "tx_hash": ["eth", "ipv4"]}}'

And if it happens that you need VLAN tagging as well

PHYSDEV=team0
DEVICE=vlan123
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.10.10.10
PREFIX=24
GATEWAY=10.10.10.1
VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
VLAN_ID=123

teamd administration can be done with teamdctl. One can add / remove TeamPort much like adding/removing slaves using ifenslave. To view the status of a team:

$ teamdctl  team0 state view -v
setup:
  runner: loadbalance
  kernel team mode: loadbalance
  D-BUS enabled: yes
  ZeroMQ enabled: no
  debug level: 0
  daemonized: no
  PID: 659
  PID file: /var/run/teamd/team0.pid
ports:
  eth0
    ifindex: 2
    addr: 52:54:00:74:0d:24
    ethtool link: 0mbit/halfduplex/up
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        link up delay: 0
        link down delay: 0
  eth1
    ifindex: 3
    addr: 52:54:00:74:0d:24
    ethtool link: 0mbit/halfduplex/up
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        link up delay: 0
        link down delay: 0

Official documentation is available here.

Loading

facebookShare on Facebook
TwitterTweet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Upgrade RockyLinux 8 to 9
  • Terraform and segregated permissions
  • LVM Compression and Deduplication
  • Edit gpg encrypted file with vim
  • Lelit Elizabeth PL92T Pressure Tuning
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (6)
  • others (59)
  • security (2)
  • tech (36)
  • wordpress (2)

Loading

apache apigateway aws awscli azure backup cloud coffee docker ec2 EL8 ElasticBeanstalk enpass espresso featured kernel lelit linux lvm meltdown MFA nat gateway nginx php proliant python rdp Redhat RHEL rpm Ryzen s2s scp serverless site-to-site smartarray snapshot spectre tech terraform transit gateway ubuntu ubuntu upgrade vpn wordpress

©2023 blog.headdesk.me | Powered by SuperbThemes & WordPress