ethchan_config 命令
用途
将适配器添加到 EtherChannel 或从 EtherChannel 删除适配器。
语法
ethchan_config { -a [ -b ] | -d } [ -p ParentName ] EtherChannel 适配器
ethchan_config -c [ -p ParentName ] EtherChannel 属性 NewValue
ethchan_config -f [ -p ParentName ] EtherChannel
描述
此命令向 EtherChannel 添加适配器,或从 EtherChannel 除去适配器。 此命令还可用于修改 EtherChannel 属性。 即使 EtherChannel 的接口已配置,也可进行这些添加、删除或修改;即,不必与 EtherChannel 的接口断开连接,就可添加或除去适配器,也可修改大多数 EtherChannel 属性。
标志
| 项 | 描述 |
|---|---|
| 一 | 将指定的 Adapter 添加到指定的 EtherChannel。 如果必须将此适配器添加为备份适配器,那么必须指定 -b 标志。 |
| -b | 指定此 Adapter 将添加为备份适配器。 此标志仅在与 -a 标志一起使用时有效。 |
| -c | 将指定的 EtherChannel 属性的指定 Attribute 更改为指定的 NewValue。 |
| -d | 从指定的 EtherChannel 删除指定 Adapter。 -b 标志不能与 -d 标志配合使用。 |
| -f | 强制指定 EtherChannel 的故障转移。 仅当空闲通道中的适配器已启动时,才会发生故障转移。 如果空闲通道中的适配器关闭,那么 EtherChannel 保持在活动通道上运行并且不会发生故障转移。 |
| -p | 指定 EtherChannel 的父适配器。 如果基于 EtherChannel 配置了共享以太网适配器 (SEA),那么必须将此标志与其他标志一起使用,才能更改该 EtherChannel 的属性(例如,添加或删除适配器)。 |
参数
| 项 | 描述 |
|---|---|
| 适配器 | 指定要添加或删除的适配器。 |
| 属性 | 指定指定 EtherChannel 的属性。 |
| EtherChannel | 指定 EtherChannel。 |
| NewValue | 指定指定 EtherChannel 的指定属性的新值。 |
| ParentName | 指定 EtherChannel 的父适配器。 |
退出状态
| 项 | 描述 |
|---|---|
| 重大安全事件数量 | 命令成功完成。 |
| >0 | 发生错误。 |
示例
- 要将适配器
ent0添加为名称是ent7的 EtherChannel 中的备份适配器,请输入以下命令:/usr/lib/methods/ethchan_config -a -b ent7 ent0 - 要将名称是
ent7的 EtherChannel 的 address to ping 属性更改为10.10.10.10,请输入以下命令:/usr/lib/methods/ethchan_config -c ent7 netaddr 10.10.10.10 - 要强制对名称是
ent7的 EtherChannel 执行故障转移,以将故障从当前活动通道转移到空闲通道,请输入以下命令:/usr/lib/methods/ethchan_config -f ent7 - 要从名称是
ent18的 EtherChannel 删除适配器ent13(它属于名称是ent32的 SEA),请输入以下命令:/usr/lib/methods/ethchan_config -d -p ent32 ent18 ent13
限制
此命令无法修改 use_jumbo_frame 属性的使用。 如果尝试修改此属性,那么此命令会显示一条错误消息。
位置
/usr/lib/methods