반응형

# ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:00:0b:0b brd ff:ff:ff:ff:ff:ff
4: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether be:34:3e:f6:4c:9d brd ff:ff:ff:ff:ff:ff
6: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether d2:ef:f3:5f:f6:85 brd ff:ff:ff:ff:ff:ff


1. team0 연결 생성

# nmcli connection add type team con-name team0 ifname team0 config  '{"runner": {"name": "activebackup"}}'

Connection 'team0' (6fdb77b3-d13b-4d43-94f0-52051a24afab) successfully added.

1) activebackup : failover

2) broadcast : 모든 포트에서 각 패킷을 전송

3) roundrobin : 라운드로빈 방식으로 패킷 전송

4) loadblance : 트래픽을 모니터링하여 해시 기능을 사용해 균형있는 패킷 전송

5) lacp : 802.3ad 프로토콜 구현


2. team0에 대해 IP 설정 및 manual 모드로 변경

# nmcli con mod team0 ipv4.addresses '192.168.0.100/24'
# nmcli connection mod team0 ipv4.method manual


3. eno1, eno2를 team0에 대한 포트 인터페이스로 지정

# nmcli connection add type team-slave con-name team0-port1 ifname eno1 master team0

Connection 'team0-port1' (c0338362-7944-4bf4-ab14-337a4dbedc15) successfully added.


# nmcli connection add type team-slave con-name team0-port2 ifname eno2 master team0

Connection 'team0-port2' (508f4481-5aab-4475-a1b2-a6c7686032e2) successfully added.


4. 설정 확인

# teamdctl team0 state

setup:
  runner: activebackup
ports:
  eno1
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
  eno2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
runner:
  active port: eno1


#  ping -I team0 192.168.0.254

PING 192.168.0.254 (192.168.0.254) from 192.168.0.100 team0: 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from 192.168.0.254: icmp_seq=2 ttl=64 time=0.076 ms



※ team0 인터페이스의 러너를 roundrobin 으로 변경

1) team0 인터페이스 작동 중단

# nmcli device disconnect team0

# vi /etc/sysconfig/network-scripts/ifcfg-team0

#TEAM_CONFIG="{\"runner\": {\"name\": \"activebackup\"}}"

TEAM_CONFIG="{\"runner\": {\"name\": \"roundrobin\"}}"


# nmcli connection load /etc/sysconfig/network-scripts/ifcfg-team0

# nmcli connection up team0

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)


# teamdctl team0 state

setup:
  runner: roundrobin


#  ping -I team0 192.168.0.254

PING 192.168.0.254 (192.168.0.254) from 192.168.0.100 team0: 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from 192.168.0.254: icmp_seq=2 ttl=64 time=0.076 ms


# nmcli connection up team0-port2

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)


# nmcli connection up team0-port1

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)


# teamdctl team0 state

setup:
  runner: roundrobin
ports:
  eno1
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
  eno2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up


※ roundrobin 대신 activebackup 러너를 사용하도록 team0 인터페이스를 수정(nmcli 사용)

# nmcli dev dis team0

# nmcli connection modify team0 team.config '{"runner": {"name": "activebackup"}}'

# cat /etc/sysconfig/network-scripts/ifcfg-team0 | grep TEAM_CONFIG

TEAM_CONFIG="{\"runner\": {\"name\": \"activebackup\"}}"


# nmcli connection up team0

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)


# teamdctl team0 state

setup:
  runner: activebackup
runner:
  active port:


# nmcli connection up team0-port1

# nmcli connection up team0-port2

# teamdctl team0 state

setup:
  runner: activebackup
ports:
  eno1
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
  eno2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up




반응형

'Linux > CentOS' 카테고리의 다른 글

[CentOS7] Firewalld  (0) 2015.03.17
[CentOS7] Network Bridge  (0) 2015.03.17
[CentOS7] NFS  (0) 2015.03.17
[CentOS7] iSCSI  (0) 2015.03.17
[CentOS7] 네트워킹 관리  (0) 2015.03.16
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기