本文转自:http://www.zdh1909.com/html/Cisco/15752.html

点击浏览下一页

预备知识:

EtherChannel

以太信道是cisco的私有技术,通过将多个链路局和为一个逻辑链路来增加中继速度,提供从10Mbit/s到160Gbit/s的速率。总共有4种类 别:标准以太信道,快速以太信道(FEC),GEC,10GEC。随着对中继线路的带宽需求越来越高,cisco采用了多条链路绑定为一个信道的方式来支 持,以太信道可以部署在数据中心和配线间之间的那段链路,特别是在广域网络单条链路带宽较小的情况下,可以使用这种方式扩大带宽。

实验要求:

默认情况下STP开启,只有一条链路工作,将交换机两条链路汇聚,这样可以提高带宽,并且在channel链路上封装truke,配置SW1为vtp server,通过channel链路将vlan信息传给SW2。

试验过程:

第一步:SW1与SW2预配置

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hos sw1

sw1(config)#no ip domain-loo

sw1(config)#line con 0

sw1(config-line)#no exec-t

sw1(config-line)#logg syn

sw1(config-line)#exi

sw1(config)#

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hos sw2

sw2(config)#no ip domain-loo

sw2(config)#line con 0

sw2(config-line)#no exec-t

sw2(config-line)#logg syn

sw2(config-line)#exi

sw2(config)#

第二步:配置Ether Channel,封装truke

sw1(config)#int rang fa 0/11 – 12

sw1(config-if-range)#sw mode tru       //封装为truke

sw1(config-if-range)#sw tru en dot      //封装类型dot1q

sw1(config-if-range)#channel-group 1 mode on     //进行channel汇聚

Creating a port-channel interface Port-channel1

sw1(config-if-range)#speed 100       //链路速率

sw1(config-if-range)#duplex full     //双工模式

sw1(config-if-range)#no sh

sw1(config-if-range)#

*Mar  1 00:10:39.431: %EC-5-BUNDLE: Interface Fa0/11 joined port-channel Po1

*Mar  1 00:10:39.731: %EC-5-BUNDLE: Interface Fa0/12 joined port-channel Po1

*Mar  1 00:10:39.923: %DTP-5-TRUNKPORTON: Port Fa0/11-12 has become dot1q trunk

sw1(config-if-range)#

*Mar  1 00:10:40.451: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

*Mar  1 00:10:42.451: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

*Mar  1 00:10:42.603: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to up

sw1(config-if-range)#exi

sw1(config)#

sw2(config)#int rang fa 0/11 – 12

sw2(config-if-range)#sw mode tru

sw2(config-if-range)#sw tru en dot

sw2(config-if-range)#cha

sw2(config-if-range)#channel-group 1 mode on

Creating a port-channel interface Port-channel1

sw2(config-if-range)#speed 100

sw2(config-if-range)#duplex full

sw2(config-if-range)#no sh

sw2(config-if-range)#exi

*Mar  1 00:12:31.115: %EC-5-BUNDLE: Interface Fa0/11 joined port-channel Po1

*Mar  1 00:12:31.415: %EC-5-BUNDLE: Interface Fa0/12 joined port-channel Po1

*Mar  1 00:12:31.603: %DTP-5-TRUNKPORTON: Port Fa0/11-12 has become dot1q trunk

sw2(config-if-range)#exi

sw2(config)#

//*进行channel注意接口类型,速率,双工模式,必须相同

第三步:配置VTP

sw1#vlan da

sw1(vlan)#vlan 2 name vlan2     //划分VLAN

VLAN 2 added:

Name: vlan2

sw1(vlan)#vlan 3 name vlan3

VLAN 3 added:

Name: vlan3

sw1(vlan)#vtp domain ccie      //VTP 域名

Changing VTP domain name from NULL to ccie

sw1(vlan)#vtp s

Device mode already VTP SERVER.

sw1(vlan)#exi

APPLY completed.

Exiting….

sw1#sh vlan-s         //查看已划分的VLAN

VLAN Name                             Status    Ports

—- ——————————– ——— ——————————-

1    default                          active    Fa0/0, Fa0/1, Fa0/2, Fa0/3

Fa0/4, Fa0/5, Fa0/6, Fa0/7

Fa0/8, Fa0/9, Fa0/10, Fa0/13

Fa0/14, Fa0/15

2    vlan2                            active

3    vlan3                            active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

—- —– ———- —– —— —— ——– —- ——– —— ——

1    enet  100001     1500  –      –      –        –    –        1002   1003

2    enet  100002     1500  –      –      –        –    –        0      0

3    enet  100003     1500  –      –      –        –    –        0      0

1002 fddi  101002     1500  –      –      –        –    –        1      1003

1003 tr    101003     1500  1005   0      –        –    srb      1      1002

1004 fdnet 101004     1500  –      –      1        ibm  –        0      0

1005 trnet 101005     1500  –      –      1        ibm  –        0      0

sw1#sh vtp sta                        //查看vtp相关信息

VTP Version                     : 2

Configuration Revision          : 1

Maximum VLANs supported locally : 256

Number of existing VLANs        : 7

VTP Operating Mode              : Server

VTP Domain Name                 : ccie

VTP Pruning Mode                : Disabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0xA4 0x44 0xE3 0xAA 0x66 0x78 0x71 0xD6

Configuration last modified by 0.0.0.0 at 3-1-02 00:18:37

Local updater ID is 0.0.0.0 (no valid interface found)

sw1#   //SW1上的VTP  server配置完

sw2#vlan da      //配置SW2上的vtp

sw2(vlan)#vtp domain ccie

Domain name already set to ccie .

sw2(vlan)#vtp c

Setting device to VTP CLIENT mode.

sw2(vlan)#exi

In CLIENT state, no apply attempted.

Exiting….

sw2#sh vlan-s      //查看sw2上的vlan信息,可以看出sw2通过channel已学到vlan信息

VLAN Name                             Status    Ports

—- ——————————– ——— ——————————-

1    default                          active    Fa0/0, Fa0/1, Fa0/2, Fa0/3

Fa0/4, Fa0/5, Fa0/6, Fa0/7

Fa0/8, Fa0/9, Fa0/10, Fa0/13

Fa0/14, Fa0/15

2    vlan2                            active

3    vlan3                            active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

—- —– ———- —– —— —— ——– —- ——– —— ——

1    enet  100001     1500  –      –      –        –    –        1002   1003

2    enet  100002     1500  –      –      –        –    –        0      0

3    enet  100003     1500  –      –      –        –    –        0      0

1002 fddi  101002     1500  –      0      –        –    –        1      1003

1003 tr    101003     1500  1005   0      –        –    srb      1      1002

1004 fdnet 101004     1500  –      –      1        ibm  –        0      0

1005 trnet 101005     1500  –      –      1        ibm  –        0      0

sw2#sh vt sta

% Ambiguous command:  “sh vt sta”

sw2#sh vtp sta

VTP Version                     : 2

Configuration Revision          : 1

Maximum VLANs supported locally : 256

Number of existing VLANs        : 7

VTP Operating Mode              : Client

VTP Domain Name                 : ccie

VTP Pruning Mode                : Disabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0xA4 0x44 0xE3 0xAA 0x66 0x78 0x71 0xD6

Configuration last modified by 0.0.0.0 at 3-1-02 00:18:37

sw2#