AIX配置etherchannel多网卡聚合

若是是二手机,确认各网卡信息都没有bash

参考http://www.javashuo.com/article/p-akxtwysj-bz.html 网络



在AIX操做系统中,用户能够配置多个EtherChannel(网卡绑定)。
app

一个EtherChannel中能够有2到8块网卡,一个AIX操做系统中能够配置多个EtherChannel。但要记住每一个EtherChannel都是一个新的以太网接口,用户也许须要经过no命令调整ifsize参数的值来保证以太网卡和EtherChannel的总数不超过ifsize,ifsize的默认值是8。tcp

您可使用任何AIX系统支持的网卡来组建EtherChannel。但EtherChannel的同一个通道成员网卡必须链接到支持EtherChannel的交换机上,备用通道能够接入到另一个交换机,用于主通道的失败接管。EtherChannel的全部成员网卡都应该设置成一样的速度和工做模式,如1000兆全双工。要用做EtherChannel成员的网卡不能配置IP地址,若是已经配置了,必需要在开始配置EtherChannel前删除这些配置。ide

 

三种典型的配置方式操作系统

一、双通道或者多通道的共同active模式,这个模式下,全部的网卡都处于active状态,也就是每一个网卡都处于工做状态,他们共有一个IP地址与MAC地址,可是,全部网卡的目标必须在同一个交换机上,而且交换机的对应端口也要绑定。blog

这样作最大的好处就是,当其中一个网卡失效,或者一根网线失效的时候,不影响整个网络的工做,只有当全部的网卡通道失效的时候,网络才失效。并且,多个网卡的同时工做,能够增长网络带宽,不过,要注意,默认的分配方式是根据目标机器的Ip来分配使用哪一个网卡,若是目标机器只有一台,不适合使用默认设置。这种模式下,最大的问题就是全部的网卡目标必须在同一个交换机上,而且绑定在一块儿,不能防止目标交换机故障。接口

二、active/standby模式,这样的模式下,一个网卡接到主交换机,一个网卡接到备用交换机,当active通道失效的时候,自动切换到standby通道,当主通道恢复正常的时候,再自动切换到主通道(这里是否切换回去,是能够配置的)。这种方式最大的好处就是能够防止交换机的故障。ip

三、复合式配置,在这种配置中,结合以上2种方式的优势。如一个3块网卡的环境中,咱们能够把其中2片网卡配置成双active模式,以增长网络带宽以及网络的可靠性,另一块网卡做为后备模式,接在另一个交换机上,当前面2个网卡都失效,或者前面2个网卡接的交换机失效的时候,切换到后备网卡上。如图:get

 

 

下面,咱们介绍一下详细的步骤:

若是想绑定或者取消绑定,能够用smit etherchannel完成,如要绑定ent1与ent2则:。

#chdev -l en1 -a netaddr=” -a netmask=”

#chdev -l en2 -a netaddr=” -a netmask=”

#chdev -l en1 -a state=’detach’

#chdev -l en2 -a state=’detach’

注意:以上命令是必要的,子网卡先取消现有的IP地址,以及必定要处于detach状态,注意,若是经过en1或者en2链接到主机,操做以上的命令,你的网络可能立刻就被中断了,因此,以上的操做建议经过其它网卡完成,或者在HMC上完成。而后,咱们开始绑定

#smit etherchannel
选择
Add An EtherChannel / Link Aggregation  回车
在这里选择网卡,按ESC+7多选网卡
EtherChannel / Link Aggregation Adapters ent0,ent2
回车执行:
Command: OK    stdout: yes       stderr: no   
Before command completion, additional instructions may appear below.   
ent14 Available
按ESc+0退出
最后会提示新的网卡的生成,这个网卡就是可用的绑定过以后的网卡。
可用lsattr查看其属性或者是lsdev -Cc adapter看全部网卡属性。
#lsattr -El ent14
adapter_names  ent0,ent2      EtherChannel Adapters            True    
alt_addr     0x000000000000   Alternate EtherChannel Address        True    
auto_recovery  yes         Enable automatic recovery after failover True    
backup_adapter  NONE        Adapter used when whole channel fails   True    
hash_mode    default       Determines how outgoing adapter is chosen True    
mode            standard      EtherChannel mode of operation              True    
netaddr     0         Address to ping                            True                     
num_retries   3         Times to retry ping before failing     True    
retry_time    1          Wait time (in seconds) between pings    True    
use_alt_addr   no         Enable Alternate EtherChannel Address     True    
use_jumbo_frame no         Enable Gigabit Ethernet Jumbo Frames      True

这样绑定的网卡是双通路的,就是说两个网卡都是处于活动状态,

注意,这里还须要交换机配合才能够最终接通2块网卡,网络交换机的设置,能够联系大家的系统管理员。

咱们也能够设置备用网卡,日常并不活动,处于备用接管状态,若是主通道发生问题,则切换到备用通道,这样的话,则能够接到两个不一样的交换机上用于交换机冗余。

备用网卡就是上面的backup_adapter,能够经过

#smit chgethch
或者是
#smit etherchannel
选择
Change / Show Characteristics of an EtherChannel / Link Aggregation
再选择
Add Backup Adapter来完成。增长事后备网卡的绑定网卡,对比以上,将有以下的差异:
#lsattr -El ent14
 adapter_names   ent0,ent2      EtherChannel Adapters                  True    
 alt_addr    0x000000000000       Alternate EtherChannel Address          True    
 auto_recovery   yes        Enable automatic recovery after failover  True    
 backup_adapter  ent3        Adapter used when whole channel fails   True    
 hash_mode    default       Determines how outgoing adapter is chosen  True  
  mode      standard       EtherChannel mode of operation       True    
  netaddr               Address to ping              True    
  num_retries    3         Times to retry ping before failing    True   
   retry_time    1         Wait time (in seconds) between pings   True    
   use_alt_addr   no         Enable Alternate EtherChannel Address   True    
   use_jumbo_frame no        Enable Gigabit Ethernet Jumbo Frames    True

至于网卡的工做状态,还能够经过netstat -v来查看,如:

#netstat -v ent4
    ETHERNET STATISTICS (ent4) :    
    Device Type: EtherChannel    
    Hardware Address: 00:14:5e:b7:26:88    ......
    Number of adapters: 3    
    Active channel: primary channel    
    Operating mode: Standard mode    
    Hash mode: Destination IP address    ......
    ETHERNET STATISTICS (ent1) :    Link Status : Up    Media Speed Selected: Auto negotiation    Media Speed Running: 1000 Mbps Full Duplex    ......
    ETHERNET STATISTICS (ent2) :    Link Status : Up    Media Speed Selected: Auto negotiation    Media Speed Running: 1000 Mbps Full Duplex    ......
    Backup adapter - ent3:    ======================    Link Status : Up    Media Speed Selected: Auto negotiation    Media Speed Running: 1000 Mbps Full Duplex

若是想取消绑定,则一样执行

#smit etherchannel
选择
Remove An EtherChannel / Link Aggregation
选择你须要取消的网卡,如上面的ent4,回车执行
Command: OK     stdout: yes    stderr: no    
Before command completion, additional instructions may appear below.    
ent14 deleted
若是获得以上的结果,表示绑定取消成功。成功的结果,能够经过lsdev -Cc adapter先后对比得到。

实际操做后验证

# errpt -dH
IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION
F3931284   1229151609 I H ent4           ETHERNET NETWORK RECOVERY MODE
8650BE3F   1229151609 I H ent6           ETHERCHANNEL RECOVERY
F3931284   1229151609 I H ent0           ETHERNET NETWORK RECOVERY MODE
AA8D7232   1229151009 I H ent6           TOTAL ETHERCHANNEL FAILURE
EC0BCCD4   1229151009 T H ent4           ETHERNET DOWN
F3846E13   1229150909 P H ent6           ETHERCHANNEL FAILOVER
EC0BCCD4   1229150909 T H ent0           ETHERNET DOWN
8650BE3F   1229150009 I H ent6           ETHERCHANNEL RECOVERY
F3931284   1229145909 I H ent0           ETHERNET NETWORK RECOVERY MODE
F3846E13   1229145909 P H ent6           ETHERCHANNEL FAILOVER
EC0BCCD4   1229145909 T H ent0           ETHERNET DOWN
AA8D7232   1229143009 I H ent6           TOTAL ETHERCHANNEL FAILURE
EC0BCCD4   1229143009 T H ent4           ETHERNET DOWN
F3846E13   1229143009 P H ent6           ETHERCHANNEL FAILOVER
EC0BCCD4   1229143009 T H ent0           ETHERNET DOWN

# smitty tcpip

选择Further Configuration--->Network Interfaces----->

Network Interface Selection----->Change / Show Characteristics of a Network Interface

--->选择en14---->Current STATE   up

设置ent14的IP地址和网关

而后smit tcpip --->Minmum COnfiguration & Startup--->

HOSTNAME             [DZCX1]

Internet ADDRESS   [80.12.XX.XX]

NETWORK MASK     [255.255.255.0]  


选择en0和en2查看网卡状态

smit tcpip ---> Further configuration ---> Network Interfaces -->Network Interface Selection

----> Change /Show Characteristics of a Network Interface 选择en0---->把Current STATE up和Apply change to DATABASE only yes

相关文章
相关标签/搜索