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. USB 2.0 Spec 微缩版

    4.1.1 Bus Topology 最大层数为7,第7层只能是Function不能是Hub,非根Hub最大5级. 5.3 USB Communication Flow Host Controller ...

  2. Python IDE Tools

    PyCharmhttps://www.jetbrains.com/pycharm/download/ Sublimehttp://www.sublimetext.com/

  3. erlang实现ssh

    借鉴自http://blog.csdn.net/the__one/article/details/6567443和http://blog.yufeng.info/archives/1509 单命令启动 ...

  4. Linux环境变量文件environment, profile, bashrc含义

    转自:http://www.th7.cn/system/lin/201508/127503.shtml (1)/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件 ...

  5. 事件日志ID 2511:服务器服务无法重新创建 <sharename> 共享关系,因为 <address> 目录已不再存在

    服务器服务无法重新创建 QQMusicDownload 共享关系,因为 D:\QQMusic\QQMusicDownload 目录已不再存在.请运行 "net share QQMusicDo ...

  6. 限制页面内部链接访问源-HTML注释

        不知道大家有没有碰到过这样一个问题:我修改的是别人的网页,他的超连接是指向一个服务器的某个HTML文件,我把超连接地址修改成了我本地机器的跟首页 同一目录下的一个HTML文件,却发现超连接根本 ...

  7. Java事务处理全解析(一)——Java事务处理的基本问题

    Java中的事务处理有多简单?在使用EJB时,事务在我们几乎察觉不到的情况下发挥着作用:而在使用Spring时,也只需要配置一个TransactionManager,然后在需要事务的方法上加上Tran ...

  8. python3读取文件

    #coding:utf-8 rfile = open('test.txt','r') str=[] for x in rfile: str = x.split(',') for x in str: p ...

  9. Java compiler level does not match the version of the installed Java project facet. springmvc1 和 Target runtime Apache Tomcat v7.0 is not defined.

    Java compiler level does not match the version of the installed Java project facet.springmvc1 : Targ ...

  10. Scala第二章学习笔记

    最基本的练习~: 使用伴生对象: object holder{ class Foo{ private var x = 5} object Foo{def im_in_yr_foo(f: Foo) = ...