1. 程式人生 > >RHEL7-team雙網絡卡繫結

RHEL7-team雙網絡卡繫結

rhel7 team配置

第一步,將兩個網絡卡相關配置檔案刪除

為了實驗觀察,所以刪除

第二步,生成team配置檔案

在網絡卡配置資料夾裡面就有ifcfg-confteam0配置檔案,檢視檔案

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

DEVICETYPE=Team

BOOTPROTO=dhcp

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_PEERDNS=yes

IPV6_PEERROUTES=yes

IPV6_FAILURE_FATAL=no

NAME=confteam0

UUID=08c10536-6b59-4713-bf74-0f6183767c13

ONBOOT=yes

 第三步,為配置檔案新增ip地址

第四部,將物理網絡卡和team0網絡卡繫結起來

第五步,檢視team狀態

[root@localhost network-scripts]# ifconfig

eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        ether 00:0c:29:8f:1a:ae  txqueuelen 1000  (Ethernet)

        RX packets 345567  bytes 26919652 (25.6 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 1977  bytes 203584 (198.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno33554992: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        ether 00:0c:29:8f:1a:ae  txqueuelen 1000  (Ethernet)

        RX packets 104534  bytes 10800996 (10.3 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 462  bytes 56490 (55.1 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 567  bytes 56538 (55.2 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 567  bytes 56538 (55.2 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

team0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 10.100.4.125  netmask 255.255.224.0  broadcast 10.100.31.255

        inet6 fe80::2c2c:bcff:fe74:1376  prefixlen 64  scopeid 0x20<link>

        ether 00:0c:29:8f:1a:ae  txqueuelen 0  (Ethernet)

        RX packets 2322  bytes 208018 (203.1 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 46  bytes 5446 (5.3 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

第六步:用windows來ping 虛擬機器的ip地址

ping 10.100.4.125 -t

第7步:用ifdown來宕掉網絡卡,測試,是否能冗餘

發現windows還是可以持續ping通

第八步:啟動網絡卡,檢視配置