天天看點

全面分析RHCE7(紅帽認證工程師)考試題目之 ----配置IPv6位址,配置聚合連接配接篇

配置聚合連接配接(網卡綁定)

team ,聚合連接配接(也稱為鍊路聚合)

由多塊網卡一起組建而成的虛拟網卡

作用1:輪詢式(roundrobin)的流量負載均衡

作用2:熱備份(activebackup)連接配接備援

熱備份配置: {"runner": {"name": "activebackup"}}

man幫助輔助記憶

/example    #全文查找example

#按n 跳轉到下一個比對

找到熱備份配置 粘貼

一.添加team團隊裝置

[root@system ~]# man teamd.conf

輸入/example

...

"runner": {"name": "activebackup"}

[root@system ~]# nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}' 

Connection 'team0' (f52724d9-87b1-4986-9b75-7216e6f46735) successfully added.

[root@system ~]# vi /etc/sysconfig/network-scripts/ifcfg-team0                          //檢視配置檔案

[root@system ~]# ifconfig 

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

        ether 7e:0f:c4:0e:f1:12  txqueuelen 0  (Ethernet)

       RX packets 0  bytes 0 (0.0 B)

       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

二.添加成員

[root@system ~]# nmcli connection add type team-slave ifname eth1 master team0 

Connection 'team-slave-eth1' (8723ebb9-75a2-4881-982a-12cd476da637) successfully added.

[root@system ~]# nmcli connection add type team-slave ifname eth2 master team0  

Connection 'team-slave-eth2' (e453a802-d351-4381-a418-6354f1d673ec) successfully added.

三.配置team0的IP位址

[root@system ~]# nmcli connection modify team0 ipv4.method manual ipv4.addresses '192.168.1.1/24' connection.autoconnect yes

四.激活team0

[root@system ~]# nmcli connection up team-slave-eth1                        //激活從裝置eth1

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

[root@system ~]# nmcli connection up team-slave-eth2                        //激活從裝置eth2

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

[root@ system ~]# nmcli connection up team0                                        //激活主裝置team0

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

五.驗證

[root@ system ~]# teamdctl team0 state#專用于檢視team資訊

setup:

 runner: activebackup

ports:

 eth1

   link watches:

     link summary: up

     instance[link_watch_0]:

name: ethtool

link: up

 eth2

runner:

 active port: eth2

删除

[root@ system ~]# nmcli connection delete team-slave-eth1

[root@ system ~]# nmcli connection delete team0

在RHCE的考試中有一道考試題目是:

在 system1、system2之間按以下要求配置一個鍊路team0:

此鍊路使用接口 eth1 和 eth2

此鍊路在一個接口失效時仍然能工作

此鍊路在 system1  使用下面的位址 172.16.3.20/255.255.255.0

此鍊路在 system2  使用下面的位址 172.16.3.25/255.255.255.0

此鍊路在系統重新開機之後依然保持正常狀态

具體步驟可以仿照上面的介紹  兩個虛拟機使用的IP 根據 考試題目要求配置 

考試時,eth1、eth2是現成的

===============================================================================================

配置IPv6位址

IPv6位址表示

128個二進制位,冒号分隔的十六進制數

每段内連續的前置0可省略,連續的多個:可簡化位::

配置IPv6

1) 檢查網卡eth0對應的網絡連接配接名稱

[root@system1 ~]# nmcli connection show                     

名稱                     UUID                                                                  類型                        裝置 

System eth0      5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03      802-3-ethernet      eth0 

2) 修改指定名稱的網絡連接配接的IPv6位址

[root@system1 ~]# nmcli connection modify 'System eth0' ipv6.method manual ipv6.addresses '2003:ac18::305/64' connection.autoconnect yes

[root@system1 ~]# nmcli connection up 'System eth0' 

[root@system2 ~]# nmcli connection modify 'System eth0' ipv6.method manual ipv6.addresses '2003:ac18::306/64' connection.autoconnect yes

[root@system2 ~]# nmcli connection up 'System eth0' 

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

3) 測試IPv6位址是否能連通

[root@system2 ~]# ping6 2003:ac18::305

PING 2003:ac18::305(2003:ac18::305) 56 data bytes

64 bytes from 2003:ac18::305: icmp_seq=1 ttl=64 time=0.124 ms

64 bytes from 2003:ac18::305: icmp_seq=2 ttl=64 time=0.097 ms

在您的兩個考試系統上配置接口 eth0 使用下列 IPv6 位址:

system1  上的位址應該是 2003:ac18::305/64

system2  上的位址應該是 2003:ac18::306/64

兩個系統必須能與網絡 2003:ac18/64 内的系統通信

位址必須在重新開機系統後依舊生效

兩個系統必須保持目前的 IPv4 位址并仍然能夠通信

具體步驟可以仿照上面的介紹  兩個虛拟機使用的IP 根據 考試題目要求配置

可能的問題:關于主機名的變化(變為localhost)

解決辦法:設定固定主機名

# hostnamectl  set-hostname  正确的主機名

本文轉自 Xuenqlve 51CTO部落格,原文連結:http://blog.51cto.com/13558754/2058392,如需轉載請自行聯系原作者

繼續閱讀