cisco交换机上的链路聚合

   2层 ethernet channel

  (interface)#channel-group number mode {on | auto [no-silent]|desirable [no-silent]}
  on 使用EthernetChannel 但不发送pagp分组
  off 禁用EthernetChannel

  desirable    交换机主动要求形成一个EthernetChannel 发送pagp分组
  auto            交换机被动形成一个EthernetChannel 不发送pagp分组 默认取值
  往往可能EthernetChannel的一端(一台服务器或者是网络分析仪)#没有产生pagp分组或者说是保持
  “沉默",可以使用关键字silent在15秒的延迟之后,让对端成为EthernetChannel.起对端为”沉默“
  使用non-silent关键字则要求在激活EthernetChannel之前现进行pagp协商、
  Catalyst 2900    3500xl 平台上没有pagp 只有 on off不进行协商
  ios    (global)# port-channel load-balance    method
  ——源地址      src-ip
  ——目的地址 dst-ip
  ——源和目的    src-dst-ip
  ——源mac地址 src-mac
  ——目的mac地址 dst-mac
  ——源和目的mac src-dst-mac
  ——源端口号 src-port
  ——目的端口号 dst-port
  ——源和目的端口号 src-dst-port
  example

(global)# interface fastethernet 4/1
(interface)#channel-group 100 mode desirable non-silent
(global)# interface fastethernet 4/2
(interface)#channel-group 100 mode desirable non-silent
(global)# interface fastethernet 5/1
(interface)#channel-group 100 mode desirable non-silent
(global)# interface fastethernet 5/2
(interface)#channel-group 100 mode desirable non-silent
(global)#port-channel load-balance src-dst-ip
show etherchannel [channel-group] load-balance
  绑定到一起的端口必须具有相同的属性如:速度 双工模式 vlan 干路模式 允许的vlan范围

  3层 etherchannel

  1创建逻辑端口通道
  interface port-channel number
  2.配置端口通道上的协议信息
  ip address address netmask
  3.把物理3层接口分配给通道
  interface type mod/port
  选择的端口必须是一个3层接口     no switchport
  4.删除任何协议地址
  no ip address
  5.把接口分配给通道组
  channel-group number mode {auto |dusirable |on}
  6.核实接口已经启用
  no shutdown
  7核实通道
  show ethernetchannel number port-channel
  show interface type number etherchannel
  show ethernetchannel summary
  example
  分布层交换机上

(config)#interface channel-group 1
(config-if)#ip address 192.168.1.1 255.255.255.0
(config-if)#interface gigabitethernet 1/1
(config-if)#no switchport
(config-if)#no ip address
(config-if)#channel-group 1 mod on
(config-if)#no shutdown
(config-)#interface gigabitethernet 1/2
(config-if)#no switchport
(config-if)#no ip address
(config-if)#channel-group 1 mode on
(config-if)#end
copy run start
  接入层交换机(3500xl)#

(config)#interface gigabitethernet 0/1
(config-if)#port group 1
(config)#interface gigabitethernet 0/2
(config-if)#port group 1
(config)#end
#copy run start
  我的试验3750配置实例    CastLyst 3750G

Switch#config t
Switch(config)#int gigabitEthernet 1/0/23
Switch(config-if)#channel-group 10 mode ?
active Enable LACP unconditionally
auto Enable PAgP only if a PAgP device is detected
desirable Enable PAgP unconditionally
on Enable Etherchannel only
passive Enable LACP only if a LACP device is detected
Switch(config-if)#channel-group 10 mode desirable non-silent
Switch(config)#int gigabitEthernet 1/0/24
Switch(config-if)#channel-group 10 mode desirable non-silent
Switch(config)#port-channel ?
load-balance Load Balancing method
Switch(config)#port-channel load-balance ?
dst-ip Dst IP Addr
dst-mac Dst Mac Addr
src-dst-ip Src XOR Dst IP Addr
src-dst-mac Src XOR Dst Mac Addr
src-ip Src IP Addr
src-mac Src Mac Addr
Switch(config)#port-channel load-balance src-dst-ip
Switch#write
Switch#show interfaces gigabitEthernet 1/0/23 etherchannel
Port state = Up Sngl-port-Bndl Mstr Not-in-Bndl
Channel group = 10 Mode = Desirable-NonSl Gcchange = 0
Port-channel = null GC = 0x000A0001 Pseudo port-channel = Po10
Port index = 0 Load = 0x00 Protocol = PAgP
Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.
Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Gi1/0/23 U4/S4 H 30s 0 128 Any 10123
Age of the port in the current state: 00d:00h:03m:30s
Switch#show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)#
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port

Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports

配置实例

Catalyst 2950 Switch
Cat2950#
Cat2950#conf t
Cat2950(config)#vtp mode server
Cat2950(config)#vtp domain cisco
Cat2950(config)#vlan 10
Cat2950(config-vlan)#exit
Cat2950(config)#vlan 20
Cat2950(config-vlan)#exit
Cat2950(config)#int range fa0/5 - 14
Cat2950(config-if-range)#switchport access vlan 10
Cat2950(config-if-range)#exit
Cat2950(config)#int range fa0/15 - 26
Cat2950(config-if-range)#switchport access vlan 20
Cat2950(config-if-range)#^Z
Cat2950#conf t
Cat2950(config)#int vlan 10
Cat2950(config-if)#ip address 10.10.10.10 255.255.255.0
Cat2950(config-if)#no shutdown
Cat2950(config-if)#^Z
Cat2950#conf t
Cat2950(config)#ip default-gateway 10.10.10.1
Cat2950(config)#int port-channel 1
Cat2950(config-if)#exit
Cat2950(config)#int fa0/2
Cat2950(config-if)#channel-group 1 mode on
Cat2950(config-if)#exit
Cat2950(config)#
Cat2950(config)#int fa0/3
Cat2950(config-if)#channel-group 1 mode on
Cat2950(config-if)#exit
Cat2950(config)#int port-channel 1
Cat2950(config-if)#switchport mode trunk
Cat2950(config-if)#switchport trunk native vlan 10
Cat2950(config-if)#^Z
Cisco7200#
Cisco7200#conf t
Cisco7200(config)#int port-channel 1
Cisco7200(config-if)#exit
Cisco7200(config)#int fa3/0
Cisco7200(config-if)#channel-group 1
Cisco7200(config-if)#exit
Cisco7200(config)#
Cisco7200(config)#int fa4/0
Cisco7200(config-if)#channel-group 1
Cisco7200(config-if)#exit
Cisco7200(config)#int port-channel 1.10
Cisco7200(config-subif)#encapsulation dot1Q 10 native
Cisco7200(config-subif)#ip address 10.10.10.1 255.255.255.0
Cisco7200(config-subif)#exit
Cisco7200(config)#int port-channel 1.20
Cisco7200(config-subif)#encapsulation dot1Q 20
Cisco7200(config-subif)#ip address 10.10.11.1 255.255.255.0
Cisco7200(config-subif)#exit
Cisco7200(config)#exit

port-
channel是端合聚合,打个比方:可以让你将4根100M的普通网线相当于捆绑成一根400M的特殊网线,将两端的交换机连在一起。省钱吧,哈。。。

channel-group是指聚合组,假设你正在想实现Port-channel,你配置中需要将交换机上的那4个端口划入到同一个channel-
group之中。明白了吧!
trunk是另一种技术,说白了就是用来让你在同一根网线中同时能够传输若干VLAN的数据包,你要将这跟网线两端的交换机端口都设置成trunk模式,
而不是一般的access模式。 port-channel 和 trunk
之间没有什么必然联系,当然你可以这样使用:先将若干根网线聚合起来(也就是做成port-channel),再将该 port-channel 配置为
trunk 模式。

port-channel和channel-group的更多相关文章

  1. JAVA基础知识之NIO——Buffer.Channel,Charset,Channel文件锁

    NIO机制 NIO即NEW IO的意思,是JDK1.4提供的针对旧IO体系进行改进之后的IO,新增了许多新类,放在java.nio包下,并对java.io下许多类进行了修改,以便使用与nio. 在ja ...

  2. Java NIO Channel to Channel Transfers通道传输接口

    原文链接:http://tutorials.jenkov.com/java-nio/channel-to-channel-transfers.html 在Java NIO中如果一个channel是Fi ...

  3. Java NIO Channel to Channel Transfers

    In Java NIO you can transfer data directly from one channel to another, if one of the channels is a ...

  4. Hyperledger Fabric 之 Channel ,创建channel链接几项注意点

    好长时间没有更新博客,网上也有很多fabric的部署资料,而且也都很不错,也比较全面.我就再想重复的工作暂时就不用做了,后面抽时间在做细化和分类:就将学习和工作中遇到和解决的问题经验,做一些分享. 而 ...

  5. 【翻译】Flume 1.8.0 User Guide(用户指南) Channel

    翻译自官网flume1.8用户指南,原文地址:Flume 1.8.0 User Guide 篇幅限制,分为以下5篇: [翻译]Flume 1.8.0 User Guide(用户指南) [翻译]Flum ...

  6. Flume Channel Selectors + kafka

    http://flume.apache.org/FlumeUserGuide.html#custom-channel-selector 官方文档上channel selectors 有两种类型: Re ...

  7. Netty源码分析--创建Channel(三)

    恩~,没错,其实这一篇才是真正的开始分析源码,你打我呀~. 先看一下我Netty的启动类 private void start() throws Exception { EventLoopGroup ...

  8. Netty 源码解析(六): Channel 的 register 操作

    原创申明:本文由公众号[猿灯塔]原创,转载请说明出处标注 今天是猿灯塔“365篇原创计划”第六篇. 接下来的时间灯塔君持续更新Netty系列一共九篇   Netty 源码解析(一 ):开始 Netty ...

  9. netty系列之:channel和channelGroup

    目录 简介 神龙见首不见尾的channel channel和channelGroup channelGroup的基本使用 将关闭的channel自动移出 同时关闭serverChannel和accep ...

  10. Flume配置Multiplexing Channel Selector

    1 官网内容 上面配置的是根据不同的heder当中state值走不同的channels,如果是CZ就走c1 如果是US就走c2 c3 其他默认走c4 2 我的详细配置信息 一个监听http端口 然后 ...

随机推荐

  1. phpinfo详解

    php的很多信息都可以从phpinfo中获取,下面就详细了解下phpinfo的输出内容 1 php版本信息 第一行显示当前php版本 PHP Version 5.5.12 2 php.ini文件的位置 ...

  2. VoLTE、呼叫等待(保持)

    VoLTE 的出现是手机通话的革命,VoLTE带来更好通话质量,更快的接通时间,接近0掉线这些特点,还可以一边通话一边上网,一方面VoLTE需要运营商的支持,另外一方面也需要手机终端的支持. 什么手机 ...

  3. IOS中UIWebView停止加载

    方法一: [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank" ...

  4. 学习ios键盘和textfield之间操作体会

    所需要计算就是,键盘移动以后是否遮挡住了textfield,需要用到的计算公式: int offset = 键盘的高度-(self.frame.size.height - self.textfiled ...

  5. Spark on yarn配置项说明与优化整理

    配置于spark-default.conf 1. #spark.yarn.applicationMaster.waitTries  5 用于applicationMaster等待Spark maste ...

  6. OAF_EO系列7 - OAException异常处理及实现(案例)

    2014-06-12 Created By BaoXinjian

  7. HDU 2516 取石子游戏(斐波那契博弈)

    取石子游戏 Time Limit: 2000/1000 MS(Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submissi ...

  8. 通过JSTL+EL实现循环迭代

    使用前需要导入包 jstl.jar 和 standard.jar <%@ page language="java" import="java.util.*,com. ...

  9. ruby中将数组转换成hash

    class Arraydef to_h(default=nil)Hash[ *inject([]) { |a, value| a.push value, default || yield(value) ...

  10. CentOS 安装 Chrome

    cd  /etc/yum.repos.d/ vi  google.repo [gogle] name=Google-x86_64 baseurl=http://dl.google.com/linux/ ...