博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VTP
阅读量:4551 次
发布时间:2019-06-08

本文共 2070 字,大约阅读时间需要 6 分钟。

公司的企业网很大,有十几台交换机;配置vlan的工作量太大了,有什么好办法可以减少工作量吗?


VTP:(vlan trunk Protocol)vlan中继协议,又叫虚拟局域网干道协议。

实验环境布置:

1675881-20190503170919547-124468370.jpg

switch0

Switch>enable //切换到特权模式Switch#configure terminal  //切换到全局模式Switch(config)#vtp domain cjk  //设置VTP名字(domain)为“cjk”Switch(config)#vtp password fda  //设置VTP密码(password)为“fda”Switch(config)#vtp mode server   //设置VTP模式为server模式(可以创建vlan)Switch(config)#vlan 2  // 创建vlan 2Switch(config-vlan)#exit   // 返回上一层Switch(config)#interface fastEthernet0/1  //切换至端口配置模式Switch(config-if)#switch access vlan 2   //封装vlan 2Switch(config-if)#exit  //返回Switch(config)#interface fastEthernet0/2  //切换到端口配置模式Switch(config-if)#switch mode trunk  //端口模式改为trunk模式(trunk模式下vtp才会沟通)Switch(config-if)#exit   //返回

swiitch1

Switch>enable //切换到特权模式Switch#configure terminal  //切换到全局模式Switch(config)#vtp domain cjk  //设置VTP名字(domain)为“cjk”Switch(config)#vtp password fda  //设置VTP密码(password)为“fda” Switch(config)#vtp mode client   //设置VTP模式为client模式(只能学习,不可以创建vlan)Switch(config)#vlan 5  //创建vlan 5Switch#show vlan  //查看vlanSwitch(config)#interface fastEthernet0/3   //切换到端口配置模式Switch(config-if)#switch mode trunk  //端口模式改为trunk模式(trunk模式下vtp才会沟通)Switch(config-if)#exit  //返回

1675881-20190503170405250-1064946553.jpg

switch2

Switch>enable //切换到特权模式Switch#configure terminal  //切换到全局模式Switch(config)#vtp domain cjk  //设置VTP名字(domain)为“cjk”Switch(config)#vtp password fda  //设置VTP密码(password)为“fda” Switch(config)#vtp mode transparent  //设置VTP模式为transparent模式(不学习,透明模式)Switch(config)#do show vlan  //强制执行查看vlan,加“do”命令不支持自动补全Switch(config)#interface fastEthernet0/3   //切换到端口配置模式Switch(config-if)#switch mode trunk  //端口模式改为trunk模式(trunk模式下vtp才会沟通)Switch(config-if)#exit  //返回

1675881-20190503170433237-1570458532.jpg

switch3

Switch>enable //切换到特权模式Switch#configure terminal  //切换到全局模式Switch(config)#vtp domain cjk  //设置VTP名字(domain)为“cjk”Switch(config)#vtp password fda  //设置VTP密码(password)为“fda” Switch(config)#vtp mode client //设置VTP模式为client模式Switch(config)#exit  //返回Switch#show vlan  //查看vlan

1675881-20190503170452284-652380808.jpg


强调

  • switch 之间必须trunk相连
  • vtp 只同步vlan数据库,不同步端口vlan的封装
  • vtp 会将先前创建的vlan覆盖
  • show vtp status //查看vtp状态
  • show vtp password //查看vtp password

转载于:https://www.cnblogs.com/du-z/p/10805676.html

你可能感兴趣的文章
Linux:文本处理工具
查看>>
java,for穷举,经典题目,百鸡百钱
查看>>
Solr4.7从文件创建索引
查看>>
6.9-LV/XML机器人数据存储
查看>>
Django ajax 发送post请求 前端报错解决
查看>>
About Me
查看>>
Android视频处理 --处理视频第一帧缩略图
查看>>
IOS中如何判断APP是否安装后首次运行或升级后首次运行
查看>>
关于反射
查看>>
全面解析构建私有云的两大核心架构组件
查看>>
在phpWeChat中如何定义一个授权登录(获取昵称)的链接
查看>>
python 符合条件跳过下一次循环
查看>>
mysql提示Column count doesn't match value count at row 1错误
查看>>
笑话,难道懂礼貌就必须说谎吗
查看>>
MySQL(二)
查看>>
第四章 –– 多态的概念
查看>>
C#中this的 四种 用法
查看>>
探究Windows RT的系统内存占用
查看>>
查域名对应的ip的命令:Nslookup
查看>>
JS offsetparent 问题
查看>>