计算机基础课件 第4讲 TRUNK配置

上传人:woxinch****an2018 文档编号:54206795 上传时间:2018-09-09 格式:PPT 页数:29 大小:1.05MB
返回 下载 相关 举报
计算机基础课件  第4讲  TRUNK配置_第1页
第1页 / 共29页
计算机基础课件  第4讲  TRUNK配置_第2页
第2页 / 共29页
计算机基础课件  第4讲  TRUNK配置_第3页
第3页 / 共29页
计算机基础课件  第4讲  TRUNK配置_第4页
第4页 / 共29页
计算机基础课件  第4讲  TRUNK配置_第5页
第5页 / 共29页
点击查看更多>>
资源描述

《计算机基础课件 第4讲 TRUNK配置》由会员分享,可在线阅读,更多相关《计算机基础课件 第4讲 TRUNK配置(29页珍藏版)》请在金锄头文库上搜索。

1、回顾,1.vlan的作用? 2.Vlan是否用来阻止电脑通信?,任务 TRUNK 配置,教学目标,知识目标:了解trunk工作原理;掌握trunk配置命令; 能力目标: 能配置Trunk;能正确应用trunk; 素质目标:培养团队协作能力、领悟能力、工作协调能力。,拓扑结构及说明,交换机A的f0/1端口与交换机B的f0/1端口相连 ,交换机B的f0/2端口与交换机C的f0/2端口相连。,任务要求:,连接在3台交换机上的主机,能够访问相同VLAN的主机。 在Trunk上移除了VLAN 1后,VLAN 1的主机不能跨交换机通信。拓展要求:配置动态协商实现trunk链路;将trunk端口连接电脑,要

2、求能和vlan2中主机通信。,验证与测试:,通过show vlan命令查看vlan创建是否正确,端口分配情况; 通过ping测试相同vlan主机能ping 通; 当trunk移除vlan 1时,通过show interface f0/1 switchport查看vlan 1被移除Trunk; 通过ping测试不同交换机上的vlan 1主机不能ping通。,相关知识:, trunk作用; trunk工作原理; Trunk配置 VLAN协商,重点:Trunk配置VLAN协商难点:VLAN协商,相关知识- TRUNK概述,Trunk 是连接将一个或多个以太网交换接口和其他 的网络设备(如路由器或交换

3、机)的点对点链路,一个Trunk 可以在一条链路上传输多个VLAN 的流量。(1)trunk作用连接不同交换机的相同VLAN内实现通信,要求每个VLAN之间都要求连接一条物理线路,这样一来2个VLAN,就需要4个端口级联,3个VLAN需要6个端口级联,大大浪费交换机端口。,相关知识-TRUNK概述,Vlan 1,Vlan 2,Vlan 3,Vlan 1,Vlan 2,Vlan 3,未应用TRUNK,实现相同VLAN通信,应用TRUNK,实现不同VLAN通信,Trunk :可以在一条链路上传输多个VLAN 的流量。,相关知识-TRUNK概述,(2)Trunk工作原理只使用一条链路,那么来自多个V

4、LAN的数据如何标识?,VLAN 1,VLAN 2,VLAN 3,VLAN 1,VLAN 2,VLAN 3,相关知识-TRUNK概述,例如:三个分别来自1、2、3班级的学生,到另一个学校去,分别要参观1、2、3班的上课情况,对方的学校怎么识别他们分别应该去哪个班级?,相关知识-TRUNK概述,VLAN标识:交换机给每个去往其他交换机的数据帧打上 VLAN标识。,VLAN 1,VLAN 2,VLAN 3,VLAN 1,VLAN 2,VLAN 3,中继链路(Trunk),接入链路(Access),VLAN 1标记,VLAN 3标记,相关知识-TRUNK概述,(3)链路类型 接入链路交换机到用户设备

5、的链路,即是接入到户,可以理解 为由交换机向用户的链路。由于大多数电脑不能发送带 vlan tag的帧,所以这段链路可以理解为不带vlan tag的 链路。 干道链路交换机到上层设备如交换机、路由器的链路,可以理 解为向广域网走的链路。这段链路由于要靠vlan来区分用 户或者服务,所以一般都带有vlan tag。,相关知识-TRUNK概述,中继链路,接入链路,802.1Q 标记 4字节,相关知识-TRUNK概述,(4)中继的几种模式和协商,VLAN 1,VLAN 2,VLAN 3,模式为Access,动态:可以成为Trunk,动态:希望成为Trunk,模式为Trunk,相关知识-TRUNK概述

6、,相关知识- Trunk配置,(1)配置步骤进入全局模式进入接口设置接口模式,相关知识- Trunk配置,(2)配置命令设置接口模式 switchport mode trunk/dynamic /access (提示:动态协商switchport mode dynamic auto / desirable ) switchport mode:命令 Trunk:模式为trunk Dynamic:动态协商 Access:接入模式,相关知识- Trunk配置,例如1:设置交换机端口f0/1的模式为trunkSwitch(config)# interface f0/1Switch(config-if)

7、#switchport mode trunk例如2:设置交换机端口f0/2的模式为动态协商模式desirable Switch(config)# interface f0/2 Switch(config-if)#switchport mode dynamic desirable,相关知识- Trunk配置,配置这个Trunk 口的许可VLAN 列表。 switchport trunk allowed vlan all | add | remove |except vlan-list例如:将vlan 2从f0/2 的trunk链路中移出,使vlan2不能跨交换机通信。 SA(config)#in

8、terface f0/2 SA(config-if)# switchport trunk allowed vlan remove 2,相关知识- Trunk配置,配置Native VLAN switchport trunk native vlan vlan-id例如:设置交换机端口f0/3的native vlan 为5。 SA(config)#interface f0/3 SA(config-if)#switchport trunk native vlan 5,相关知识- Trunk配置,检查接口的完整信息show interface interface-id switchport 例如: S

9、witch#show interface f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: down Administrative Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none Administrative private

10、-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL,相关知识- Trunk配置,(3)配置实例1如下图所示,通过配置trunk,使相同vlan内的电脑能通信。,SA,SB,相关知识- Trunk配置,(3)配置实例1 SA#confi

11、gure terminalSA(config)#interface f0/1SA(config-if)#switchport mode trunk,请大家完成switchB的配置,SB#configure terminalSB(config)#interface f0/1 SB(config-if)#switchport mode trunk SB(config-if)#end,相关知识- Trunk配置,SB#show interface f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: trunk Op

12、erational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vla

13、n mapping: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL,相关知识- Trunk配置,(4)配置实例2 在上面实例1配置基础上,将vlan 1从trunk链路中移出,使vlan1不能跨交换机通信。SA(config)#interface f0/1SA(config-if)# switchport trunk allowed vlan remove

14、1,相关知识- Trunk配置,SA# show interface f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode

15、VLAN: 1 (default) Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs Enabled: 1,3-1005 Pruning VLANs Enabled: 2-1001 Capture Mode Disabled,相关知识- Trunk配置,(5)配置实例3 如上图所示,通过配置trunk动态协商,使交换机A,B之间链路成为干道链路。,SA(config)#interface f0/1 SA(config-if)#switchport mode dynamic desirable SB(config)#interface f0/1 SB(config-if)#switchport mode dynamic desirable,

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 高中教育

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号