vtp技术和以太网通道配置

目录

前言

1.EthernetChannel

 1.1EthernetChannel的定义

 1.2、以太网通道的配置

 1.3vtp通告

      1.3.3  VTP (Vlan Trunk Protocol) 

      1.3.4  VTP通告

      1.3.5vtp命令配置

二.以太网通道配置图

总结



前言

VTP一个可以说很方便的协议,学习Cisco时也很常用的协议,他的作用就是可以在有大量交换设备,需要配置类似的vlan划分的时候,简化配置过程,使各个交换机互相学习Vlan Database,配置方法也非常简单。

1.EthernetChannel

 1.1EthernetChannel的定义

        EtherChannel (以太网通道),通过捆绑多条以太网链路来提高链路带宽,并运行一种机制,将多个以太网端口捆绑成一条逻辑链路。以太网通道最多可以捆绑8条物理链路,其中物理链路可以是双绞线,也可以是光纤.

         定义
        以太网通道/端口聚合/链路捆绑

        以太网通道最多可以捆绑八条物理链路。配置为以太通道的接口必须物理特性相同

        物理特性:速率一致

                         双工模式一致

                         MTU一致

          作用
                   1、增加带宽

                   2、多条线路负载均衡

                   3、容错。当一条线路失效时,其他线路通信,不会丢包

 1.2、以太网通道的配置


        1.2.1 命令      
                        SW1#show entherchannel 1 summary  //查看以太网通道的配置

                        SW1#(config-range)#channel-group1  //以太网通道的组号
 

        

 1.3vtp通告


        1.3.1 vlan通告概告

           使用vtp时,加入vtp域的每台交换机在其中继口上通告如下信息
          1.管理域
          2. 版本号
          3.配置修改编号
          4.它所知道的vlan
          5.每个已知vlan的某些参数

        1.3.2 VTP的运行模式
             1、服务器模式(Server)

                可以创建、删除和修改VLAN。

                学习、转发相同域名的VTP通告。

             2、客户机模式(Clinet)

                学习、转发相同域名的VTP通告。

                不可以创建、删除和修改VLAN。

             3、透明模式(Transparent)

                配置版本号为0(1、修改域名。2、透明模式)

                可以创建、删除和修改VLAN,但只在本地有效

                转发但不学习VTP通告

                域名相同、密码不同是可以转发VTP消息;域名、密码不同也是可以转发VTP消息

      1.3.3  VTP (Vlan Trunk Protocol) 

             传递VLAN数据库中的VLAN信息
            Server(默认)服务器模式  创建VLAN 删除VLAN 修改VLAN 始发VTP 转发VTP 学习VTP
            Client  客户端模式  不能创建 不能删除 不能修改 不始发  转发    学习
            Transparent   透明模式    创建VLAN 删除VLAN 修改VLAN 不始发  转发    不学习
 

      1.3.4  VTP通告


                        1、内容

                       管理域、版本号、配置修改编号、VLAN及某些参数

                        2、VTP的版本

                        配置修改编号

                        新增的交换机配置修改编号应该重新置0(1、更改VTP模式为透明模式,再更改                              为服务器或客户机模式  2、更改VTP域名)

                        3、VTP通告类型 

                        汇总通告(比较域名、配置版本号)

                        子集通告(具体内容)

                        通告请求(1、重启2、修改完域名后3、版本号比别人低)
     

      1.3.5vtp命令配置

          switch(config)# vtp domain domain-name   //设置vtp域名

          SW1(config)#vtp password       //设置vtp密码

           VTP可以通过域名来划分区域,在同一个VTP区域里,可以根据模式,互相学习,转发,始发,相同的VTP域名,密码也必须相同。

           switch(config)# vtp mode (server/client/transparent)   // 配置交换机的VTP模式

                 

二.以太网通道配置图

输入int range f0/21-23,进入21-23多个端口

输入 channel-group 1 mode on ,强制配置以太网组号为1

Switch>enable
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int range f0/21 -23
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#
Creating a port-channel interface Port-channel 1

%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

输入vlan 10,创建vlan10     

Switch(config)#vlan 10
Switch(config-vlan)#exit

 输入 int f0/1,进入f0/1端口

 输入 switchport access vlan 10,划分vlan 10

Switch(config)#int f0/1
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 10

输入int port-channel 1,进入1号,输入 switchport mode trunk ,强制起trunk模式

Switch(config)#int port-channel 1
Switch(config-if)#switchport mode trunk 

输入interesting range f0/21-23,进入21-23多个端口

Switch(config)#int range f0/21-23
Switch(config-if-range)#

输入 channel-group 2 mode on,强制配置以太网组号为2

Switch(config-if-range)#channel-group 2 mode on

%LINK-5-CHANGED: Interface Port-channel 2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 2, changed state to up

%LINK-5-CHANGED: Interface Port-channel 1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to down

输入vlan 20,创建vlan 20

Switch(config)#vlan 20
Switch(config-vlan)#

输入int f0/2,进入2号端口

输入switchport accsee vlan 20,划分vlan 20

Switch(config)#int f0/1
Switch(config-if)#swichport mode access
Switch(config-if)#switchport access vlan 20

输入int port-channe 2,进入2号

输入switchport mode trunk,强制其trunk

Switch(config)#int port-channel 2
Switch(config-if)#switchport mode trunk 

分别给客户机分配IP地址

 

测试两客户机是否连通 

PC>ping 192.168.1.10

Pinging 192.168.1.10 with 32 bytes of data:

Reply from 192.168.1.10: bytes=32 time=5ms TTL=128
Reply from 192.168.1.10: bytes=32 time=6ms TTL=128
Reply from 192.168.1.10: bytes=32 time=4ms TTL=128
Reply from 192.168.1.10: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.1.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 6ms, Average = 3ms
PC>ping 192.168.1.20

Pinging 192.168.1.20 with 32 bytes of data:

Reply from 192.168.1.20: bytes=32 time=4ms TTL=128
Reply from 192.168.1.20: bytes=32 time=5ms TTL=128
Reply from 192.168.1.20: bytes=32 time=3ms TTL=128
Reply from 192.168.1.20: bytes=32 time=4ms TTL=128

Ping statistics for 192.168.1.20:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 5ms, Average = 4ms

总结

在交换机vtp模式中 配置版本最高的为被学习方发法透明模式只进行转发vtp消息,本身的配置只在本地有效,且不同透明模式为不同域名不同密码时也同样可以转发vtp信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值