分类:
2010-04-29 22:02:00
dladm create-aggr -d e1000g3 -d e1000g7 1
dladm create-aggr -3 e1000g2-d e1000g6 2
显示创建好的aggr
bash-3.00# dladm show-aggr -L
key: 1 (0x0001) policy: L4 address: 0:15:17:d2:9e:1a (auto)
LACP mode: off LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g3 active short yes yes yes yes no no
e1000g7 active short yes yes yes yes no no
key: 2 (0x0002) policy: L4 address: 0:15:17:d2:9e:1b (auto)
LACP mode: off LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g2 active short yes yes yes yes no no
e1000g6 active short yes yes yes yes no no
修改LACP mode
dladm modify-aggr --lacp-mode=active -P L4 1
dladm modify-aggr --lacp-mode=active -P L4 2
显示
bash-3.00# dladm show-aggr -L
key: 1 (0x0001) policy: L4 address: 0:15:17:d2:9e:1a (auto)
LACP mode: active LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g3 active short yes yes yes yes no no
e1000g7 active short yes yes yes yes no no
key: 2 (0x0002) policy: L4 address: 0:15:17:d2:9e:1b (auto)
LACP mode: active LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g2 active short yes yes yes yes no no
e1000g6 active short yes yes yes yes no no
这时就已经建立好了两个上联的端口组。
然后在交换机上配置Portchanel
下来是设置ip地址。肯定不能为两个接口都设置地址,那样会引起路由的冲突,一般我们会想到keepalived这样的vrrp的实现,但是在solaris上还有一个更cool的特性---IPMP,
设置ipmp
bash-3.00#ifconfig aggr1 group ipmp 1 up
bash-3.00#ifconfig aggr2 group ipmp 1 standby up
设置好了
bash-3.00# ifconfig aggr1
aggr1: flags=1000843
inet 10.3.50.34 netmask fffffe00 broadcast 10.3.51.255
groupname ipmp1
ether 0:15:17:d2:9e:1a
bash-3.00# ifconfig aggr2
aggr2: flags=69000842
inet 0.0.0.0 netmask 0
groupname ipmp1
ether 0:15:17:d2:9e:1b
bash-3.00#
设置hostname
bash-3.00# cat hostname.aggr1
fnd-vm03-apptraffic-aggr1 group ipmp1
bash-3.00# cat hostname.aggr2
group ipmp1 standby up
ok设置完成。
交换机的配置
interface Port-channel11
description VM01-aggr2
switchport access vlan 50
switchport mode access
logging event bundle-status
interface Vlan50
description Public
ip address 10.3.50.2 255.255.254.0
standby 50 ip 10.3.50.1
standby 50 timers 1 2
standby 50 priority 110
standby 50 preempt
standby 50 track GigabitEthernet1/0/1 30
正常情况下会由aggr1提供服务,采用L4负载均衡机制
L4-通过散列每个包的 TCP、UDP 或其他 ULP (L4) 头来确定传出链路。
由2条物理链路提供上行冗余连接。
一旦主交换机故障,辅助交换机会启用,ip会根据ipmp策略由standby状态的aggr接管。主交换机恢复,主aggr恢复。
参考资料
EthernetChannel
IPMP (IP MultiPathing)
LACP(Link Aggregation Control Potocol)
IEEE 802.3