zoukankan      html  css  js  c++  java
  • CCNA2.0笔记_VTP

    VTP(VLAN Trunking Protocol)

      一个能够宣告VLAN配置信息的信息系统;
      通过一个共有的管理域,维持VLAN配置信息的一致性;
      VTP只能在trunk端口发送要宣告的信息;
      二层交换机做VTP,最高能支持vtp version 2
      三层交换机做VTP,最高能支持vtp version 3
      VTP信息也保存在Vlan.dat中(与vlan信息储存位置相同)

    VTP域的组成

      - Cisco交换机初始vty域名为空,当其中一台交换机配置了域名,其他交换机将同步此域名
      - 相同域名的,通过Trunk相互连接的,一组交换机
      - 组建vtp需要(交换机)加入VTP域,各个交换机需要加入相同的VTP域
      - 一个vty域内可以拥有多个处于server模式的vty

    VTP的3种运行模式

      - 服务器模式(Server);只能创建常规VLAN (2-1001)
      - 客户机模式(Client);能创建常规Vlan和扩展Vlan (1025-4094)
      - 透明模式(Transparent)

       

      

      

      image

      image

    VTP的运作

      - VTP协议通过组播地址01-00-0C-CC-CC-CC在Trunk链路(的Native Vlan)上发送VTP通告;
      - VTP Server和clients通过最高的修订号来同步数据库(当收到比自己修订号大的通告时,才更新Vlan信息);

    VTP pruning

      

    VTP 配置

    switch(config)# vtp domian domain_name        //创建VTP 域
    switch(config)# vtp mode server | client | transparent        //配置交换机的VTP模式
    switch(config)# vtp password 123        //配置VTP口令为123
    switch(config)# vtp pruning        //配置VTP修剪
    switch(config)# vtp version 2         //VTP版本的配置
    switch# show vtp status        //查看VTP的配置
    
    默认情况:
    VTP模式为server;
    VTP修剪默认关闭;
    
    VTP域名有大小写敏感;
    VTP密码有大小写敏感;

    VTP实验

      

      实验目的:掌握VLAN及VTP的配置

      实验要求:VTP域名为cisco,密码为password

      SwitchA配置成Server模式,创建VLAN 10和VLAN 20名为aa bb,并开启VTP修剪功能
      SwitchB配置成客户模式,并将端口1—10加入VLAN10,11—20划分到VLAN20
      SwitchC配置成透明模式

      实验步骤:

      步骤1:

      因为VTP信息之在trunk接口上发送,所以先将交换机相连的接口配置成trunk口

      Sw-A配置

    SwitchA(config)#int f0/0
    SwitchA(config-if)#switchport trunk encapsulation dot1q        //如果交换机支持多种VTP封装的话,则需要先指定封装
    SwitchA(config-if)#switchport mode trunk
    SwitchA(config)#int f0/1
    SwitchA(config-if)#switchport trunk encapsulation dot1q
    SwitchA(config-if)#switchport mode trunk
    

      Sw-B配置

    SwitchB(config)#int f0/0
    SwitchB(config-if)#switchport trunk encapsulation dot1q
    SwitchB(config-if)#switchport mode trunk
    

      Sw-C配置

    SwitchC(config)#int f0/0
    SwitchC(config-if)#switchport trunk encapsulation dot1q
    SwitchC(config-if)#switchport mode trunk
    

      步骤2:

      在SwitchA上做VTP的配置并创建vlan

    SwitchA(config)#vtp mode server
    SwitchA(config)#vtp domain stsd
    SwitchA(config)#vtp password cisco
    SwitchA(config)#vtp pruning
    SwitchA#vlan 10 name aa
    SwitchA#vlan 20 name bb
    

      步骤3:

      在SwitchB上做配置

    SwitchB(config)#vtp mode client
    SwitchB(config)#vtp domain stsd
    SwitchB(config)#vtp password cisco
    

      步骤4:

      在SwitchC上做配置

    SwitchC(config)#vtp mode transparent
    

      步骤5
      在SwitchB上查看vlan信息,看是否可以看到创建的vlan10 和 vlan20
      可以尝试在SwitchB上面创建vlan,观察client模式的交换机是否能够创建vlan。在transpartent上面创建vlan,并查看vlan信息的保存位置。

  • 相关阅读:
    BUUCTF-[GYCTF2020]Blacklist 1 思路
    [强网杯 2019]随便注 WriteUp(three way)思路
    [GXYCTF2019]Ping Ping Ping 1思路
    [ACTF2020 新生赛]Include 思路
    [极客大挑战 2019]Secret File 思路
    [SUCTF 2019]EasySQL 思路
    java环境变量配置 详细
    [极客大挑战 2019]Upload 思路
    [极客大挑战 2019]Http 思路
    [ACTF2020 新生赛]Exec 思路
  • 原文地址:https://www.cnblogs.com/airoot/p/4161041.html
Copyright © 2011-2022 走看看