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. windows类书的学习心得(转载)

    原文网址:http://www.blogjava.net/sound/archive/2008/08/21/40499.html 现在的计算机图书发展的可真快,很久没去书店,昨日去了一下,真是感叹万千 ...

  2. Env:autojump安装使用

    注:这里只介绍我使用的方式,当然不是唯一方式 作用:autojump可以快速进行路径导航,具备记忆历史路径:不仅仅是可以进入当前路径下的某个路径,也可以是其他历史路径 1. 下载 首先,$ git c ...

  3. oracle学习笔记(一)配置监听

    服务器端: 监听器   lsnrctl 启动监听 lsnrctl start [LISTENER] 查看监听 lsnrctl  status  或者  lsnrctl  service C:\Docu ...

  4. 原生JavaScript实现的addclass,removeclass,hasclass,toggleclass,getbyclass

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  5. 如何写出小而清晰的函数?(JS 版)

    本文以 JavaScript 为例,介绍了该如何优化函数,使函数清晰易读,且更加高效稳定. 软件的复杂度一直在持续增长.代码质量对于保证应用的可靠性.易扩展性非常重要. 然而,几乎每一个开发者,包括我 ...

  6. [Android-2A] -仿IOS微信滑动删除_SwipeListview左滑删除例子

    https://yunpan.cn/cueUIQkRafQrH (提取码:7ec1) 关于这样类似的例子网上的代码很多,最近发现这个例子里的代码在开发中会遇到一系列的问题.比如ListView的OnI ...

  7. BIP_开发案例09_结合JavaCP通过BIP API输出报表dataprocess / rtfprocess / foprocess(案例)

    20150814 Created By BaoXinjian

  8. Memcache 问题集锦

    Memcached 集群架构方面的问题 这里收集了经常被问到的关于memcached的问题 memcached是怎么工作的? memcached最大的优势是什么? memcached和MySQL的qu ...

  9. 在tortoiseSVN上将trunk的代码merge到branch上去

    1.进入branch项目的目录 2.右键选择merge 3.下一步 4.选择trunk

  10. JAVA 构造方法之间的调用

    this:看上去,用来区分局部变量和成员变量的情况this:就是代表本类对象,this代表它所在方法所属对象的引用构造方法之间的调用只能通过this语句来完成构造方法之间进行调用时this语句只能出现 ...