Created
December 12, 2016 14:58
-
-
Save itbakery/f6b6b8639e699db9ba823189b49ed194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## RHEL 7 Network Teaming | |
```sh | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
(1..2).each do |i| | |
config.vm.define "server#{i}" do |node| | |
node.vm.hostname = "server#{i}" | |
node.vm.network :private_network, ip: "192.168.20.#{10+i}", netmask: "255.255.255.0" | |
node.vm.network :private_network, ip: "192.168.20.#{20+i}", netmask: "255.255.255.0" | |
node.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", 2048] | |
vb.customize ["modifyvm", :id, "--cpus", 2] | |
end | |
end | |
end | |
end | |
``` | |
```sh | |
# nmcli con add type team con-name team0 ifname team0 | |
# nmcli con show | |
NAME UUID TYPE DEVICE | |
team0 011a1577-b463-45d2-a58b-d3dd1912ea0b team team0 | |
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0 | |
``` | |
modify | |
```sh | |
nmcli con modify <tab><tab> | |
help id path System\ eth0 team0 --temporary uuid | |
``` | |
identify property to modify | |
```sh | |
nmcli con modity team0 <tab><tab> | |
connection.autoconnect connection.zone ipv6.addresses | |
connection.autoconnect-priority ipv4.addresses ipv6.dhcp-hostname | |
connection.autoconnect-slaves ipv4.dhcp-client-id ipv6.dhcp-send-hostname | |
connection.gateway-ping-timeout ipv4.dhcp-hostname ipv6.dns | |
connection.id ipv4.dhcp-send-hostname ipv6.dns-search | |
connection.interface-name ipv4.dns ipv6.gateway | |
connection.master ipv4.dns-search ipv6.ignore-auto-dns | |
connection.metered ipv4.gateway ipv6.ignore-auto-routes | |
connection.permissions ipv4.ignore-auto-dns ipv6.ip6-privacy | |
connection.read-only ipv4.ignore-auto-routes ipv6.may-fail | |
connection.secondaries ipv4.may-fail ipv6.method | |
connection.slave-type ipv4.method ipv6.never-default | |
connection.timestamp ipv4.never-default ipv6.route-metric | |
connection.type ipv4.route-metric ipv6.routes | |
connection.uuid ipv4.routes team.config | |
``` | |
sumary command | |
```sh | |
# nmcli connection add type team con-name team0 ifname team0 | |
# nmcli connection modify team0 ipv4.addresses "192.168.20.5/24" ipv4.method manual | |
# nmcli connection add type team-slave con-name team0-port1 ifname eth1 master team0 | |
# nmcli connection add type team-slave con-name team0-port2 ifname eth2 master team0 | |
# nmcli connection show | |
``` | |
```sh | |
# nmcli connection show | |
NAME UUID TYPE DEVICE | |
team0-port2 ba55a4e7-b855-4dec-b6d6-ab7f413e5739 802-3-ethernet eth2 | |
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0 | |
team0-port1 63a91ee5-d42c-48bf-bfbc-3be7cda31ee6 802-3-ethernet eth1 | |
team0 a8d40631-5076-46ef-9b90-b4fcd146f3f0 team team0 | |
``` | |
Monitor state | |
```sh | |
# teamdctl team0 state | |
setup: | |
runner: roundrobin | |
ports: | |
eth1 | |
link watches: | |
link summary: up | |
instance[link_watch_0]: | |
name: ethtool | |
link: up | |
down count: 1 | |
eth2 | |
link watches: | |
link summary: up | |
instance[link_watch_0]: | |
name: ethtool | |
link: up | |
down count: 1 | |
``` | |
Config | |
- Broadcast : Data is transmitted over all ports | |
- round-robin : Data is transmitted over all ports in turn | |
- active-backup : one port or link is used while others are kept as a backup | |
- loadbalance :with active Tx load balancing and BPF-Based Tx port Selectors | |
- lacp (implements the 802.3ad link aggregation Controll Protocol) | |
```sh | |
nmcli connection modify team0 team.config '{"runner": {"name": "activebackup"}}' | |
nmcli connection down team0 | |
nmcli connection up team0 | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment