통합 링크(NIC 바인딩) 구성

3630 단어 engineer
집합 체인의 주요 역할: 네트워크 카드를 백업하여 단일 고장을 방지하고 한 개의 네트워크 카드가 고장난 상황에서 자동으로 두 번째 네트워크 카드를 사용한다.
-핫 백업(activebackup), 이중화 연결
1. 먼저 두 개 이상의 네트워크 카드 장치가 있어야 한다.
eth1: flags=4163  mtu 1500
        ether 52:54:00:f8:86:c1  txqueuelen 1000  (Ethernet)
        RX packets 4934  bytes 272982 (266.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=4163  mtu 1500
        ether 52:54:00:38:79:d9  txqueuelen 1000  (Ethernet)
        RX packets 4937  bytes 273272 (266.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2. 가상 네트워크 카드 팀 0 만들기
[root@server0 ~]# nmcli connection add type team con-name team0 ifname team0 autoconnect yes config '{"runner": {"name" : "activebackup"}}'
Connection 'team0' (dd59fba1-9719-433a-ab44-ba0b38fb08b6) successfully added.

3. 팀0 구성원 추가(네트워크 카드 장치)
[root@server0 ~]# nmcli connection add type team-slave con-name team0-1 ifname eth1 master team0
Connection 'team0-1' (406dd316-98be-4a3d-b8d7-249e4992220b) successfully added.
[root@server0 ~]# nmcli connection add type team-slave con-name team0-2 ifname eth2 master team0 
Connection 'team0-2' (d0c0b497-7409-4cd6-87ae-f4c2be2aa545) successfully added.

4, 팀 0 네트워크 카드 ip 설정
[root@server0 ~]# nmcli connection modify team0 ipv4.method manual ipv4.addresses 192.168.1.1/24 connection.autoconnect yes

5. 모든 구성 활성화
[root@server0 ~]# nmcli connection up team0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
[root@server0 ~]# nmcli connection up team0-1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)
[root@server0 ~]# nmcli connection up team0-2
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)

테스트 커뮤니케이션:
다른 설비에서 상기 절차에 따라 IP가 192.168.1.2인 집합 체인을 설정하여 통신할 수 있는지 테스트한다.실행 중인 네트워크 카드를 끄고 통신할 수 있는지 확인하십시오. 통신할 수 있다면 설정하십시오.
[root@desktop0 ~]# ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.393 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.408 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.553 ms

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.393/0.451/0.553/0.074 ms
[root@server0 ~]# ifconfig eth1 down
[root@server0 ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  eth1
    link watches:
      link summary: down
      instance[link_watch_0]:
        name: ethtool
        link: down
  eth2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
runner:
  active port: eth2
[root@desktop0 ~]# ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.285 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.300 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.529 ms

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.285/0.371/0.529/0.112 ms

좋은 웹페이지 즐겨찾기