1 / 36

CCNA (640-802)

---VLAN Trunk. CCNA (640-802). 多个交换机上的 VLAN 应用. 工程 VLAN 市场 VLAN 会计 VLAN. 1 楼. Fast Ethernet. 2 楼. 3 楼. 交换机之间的 VLAN 通信 3 - 1. 如何实现交换机之间的 VLAN 通信? 每个 VLAN 一条链路?. 如果有 100 个 VLAN 怎么办呢?. VLAN 1. VLAN 1. VLAN 2. VLAN 2. VLAN 3. VLAN 3. 交换机之间的 VLAN 通信 3 - 2.

jontae
Download Presentation

CCNA (640-802)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ---VLAN Trunk CCNA (640-802)

  2. 多个交换机上的VLAN应用 工程VLAN 市场VLAN 会计VLAN 1楼 Fast Ethernet 2楼 3楼

  3. 交换机之间的VLAN通信3-1 如何实现交换机之间的VLAN通信? 每个VLAN一条链路? 如果有100个VLAN怎么办呢? VLAN 1 VLAN 1 VLAN 2 VLAN 2 VLAN 3 VLAN 3

  4. 交换机之间的VLAN通信3-2 如何实现交换机之间的VLAN通信? 只使用一条链路,那么来自多个VLAN的数据如何标识? VLAN 1 VLAN 1 VLAN 2 VLAN 2 VLAN 3 VLAN 3

  5. 交换机之间的VLAN通信3-3 例如:三个分别来自1、2、3班级的学生,到另一个学校去,分别要参观1、2、3班的上课情况,对方的学校怎么识别他们分别应该去哪个班级? 出发前加个标识,再把标识的方法告诉对方! ③ ② ①

  6. Trunk 概念(Trunking Concepts)

  7. Trunk 概念(Trunking Concepts) • 1.Trunk是两个交换机之间网络信息传递的物理和逻辑的连接 • A trunk is a physical and logical connection between two switches across which network traffic travels. • 2.一个Trunk就是支持传递多个VLAN信息的点到点的链路 • A trunk is a point-to-point link that supports several VLANs. • 3.Trunk的目的是保留端口。 • The purpose of a trunk is to conserve ports. • 4.Trunk将在一个物理链路上绑定多个虚链路,从而在两台交换机之间允许在单一物理链路上传输多个VLAN的信息Trunking will bundle multiple virtual links over one physical link by allowing the traffic for several VLANs to travel over a single cable between the switches.

  8. Trunk 操作(Trunking Operation) • 1.Trunk机制有两种,帧过滤和帧标记,帧标记被IEEE标准化 • Currently two types of trunking mechanisms exist, frame filtering and frame tagging. Frame tagging has been adopted as the standard trunking mechanism by IEEE. • 2.帧标记在帧中插入标识符,这样可以更容易管理 • Trunking protocols that use a frame tagging mechanism assign an identifier to the frames to make their management easier. • 3.在以太网中,帧标记有两种方案 • Tagging schemes for Ethernet segments : • ISL – Cisco私有(Cisco proprietary Inter-Switch Link protocol) • 802.1Q – IEEE标准(IEEE standard )

  9. 定义Trunk(Defining a Trunk) sw2(config)#int f0/12 sw2(config-if)#switchport mode trunk sw2(config-if)#switchport trunk encapsulation dot1q

  10. 验证Trunk(Verifying a Trunk) sw2#show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/12 on 802.1q trunking 1 Port Vlans allowed on trunk Fa0/12 1-4094 Port Vlans allowed and active in management domain Fa0/12 2,3 Port Vlans in spanning tree forwarding state and not pruned Fa0/12 2,3

  11. VLANs and Trunking Trunk 提供了在一个网络内的交换机之间高效的通信

  12. VLAN Trunk 协议(VLAN Trunking Protocol) • 1.VTP是一个通告VLAN信息的信息系统 • A messaging system that advertises VLAN configuration information • 2.VTP维护整个管理域VLAN信息的一致性 • Maintains VLAN configuration consistency throughout a common administrative domain • 3.VTP仅在Trunk端口上发送通告 • VTP sends advertisements on trunk ports only VTP Domain “szpt” 3.同步到最新的VLAN信息(Sync to the latest vlan information) 2 1.有新VLAN加入(“new vlan added”)

  13. VLAN标识 交换机给每个去往其他交换机的数据帧打上VLAN标识 VLAN 1 VLAN 1 VLAN 1标记 接入链路(Access) 中继链路(Trunk) VLAN 2 VLAN 2 VLAN 3 VLAN 3 VLAN 3标记

  14. VLAN标识的种类 以太网上实现中继可用两种封装类型 ISL(Cisco私有协议) IEEE 802.1Q

  15. IEEE802.1Q的工作原理和帧格式2-1 接入链路 中继链路 802.1Q 标记 4字节

  16. IEEE802.1Q的工作原理和帧格式2-2 DA SA Type CRC Data DA SA Tag Type CRC Data CFI VLANID TPID Priority 带有IEEE802.1Q标记的以太网帧 标准以太网帧 12bit,可标识的VLAN ID为4096个 TCI

  17. Cisco ISL工作原理和帧格式3-1 VLAN 2 中继链路 接入链路 ISL头 26字节 CRC 4字节

  18. Cisco ISL工作原理和帧格式3-2 数据 DA SA CRC 以太类型/长度 26字节ISL头 4字节ISL尾

  19. Cisco ISL工作原理和帧格式3-3

  20. ISL和802.1Q 的异同 相同点 都是显式标记,即帧被显式标记了VLAN的信息 不同点 IEEE 802.1Q是公有的标记方式,ISL是Cisco私有的 ISL采用外部标记的方法,802.1Q采用内部标记的方法 ISL标记的长度为30字节,802.1Q标记的长度为4字节

  21. 中继的几种模式和协商2-1 VLAN 1 模式为Access 动态:希望成为Trunk 动态:可以成为Trunk 模式为Trunk VLAN 2 VLAN 3

  22. 中继的几种模式和协商2-2 模式

  23. 配置接口为Trunk模式 Switch(config)# interface interface-id Switch(config-if)#switchport mode ? access Set trunking mode to ACCESS unconditionally dynamic Set trunking mode to dynamically negotiate access or trunk mode trunk Set trunking mode to TRUNK unconditionally Switch(config-if)#switchport mode trunk 接口为接入模式 接口为动态协商模式 接口为中继模式

  24. 配置接口为动态协商模式 Switch(config-if)#switchport mode dynamic ? auto Set trunking mode dynamic negotiation parameter to AUTO desirable Set trunking mode dynamic negotiation parameter to DESIRABLE 自动 企望

  25. 查看接口模式 Switch#show interface interface-id switchport Name: Fax/x Switchport: Enabled Administrative Mode: dynamic desirable 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-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 接口模式缺省为 dynamic desirable 封装类型为802.1q

  26. 配置VLAN Trunk实例 VLAN 1 VLAN 1 Port 1-3 Port 24 Port 24 VLAN 2 VLAN 2 Port 4-10 SW1 VLAN 3 Port 11-23 VLAN 3

  27. 配置VLAN Trunk 4-1 第一步:在交换机上添加VLAN SW1#vlan database SW1(vlan)#vlan 2 VLAN 2 added: Name: VLAN0002 SW1(vlan)#vlan 3 VLAN 3 added: Name: VLAN0003 SW1(vlan)#exit APPLY completed. Exiting....

  28. 配置VLAN Trunk4-2 第二步:将接口添加到相应的VLAN中 SW1#config terminal SW1(config)#interface range f0/4 - 10 SW1(config-if-range)#switchport access vlan 2 SW1(config)#interface range f0/11 - 23 SW1(config-if-range)#switchport access vlan 3

  29. 配置VLAN Trunk4-3 第三步:配置交换机之间互联的端口为Trunk SW1(config)#interface f0/24 SW1(config-if)#switchport mode trunk

  30. 配置VLAN Trunk4-4 请学员完成配置 VLAN 1 VLAN 1 Port 1 Port 1-3 Port 24 Port 24 VLAN 2 VLAN 2 Port 4-10 Port 2-10 SW2 Port 11-23 VLAN 3 Port 11-23 VLAN 3

  31. 查看端口状态 SW1#show interface f0/24 switchport Name: Fa0/24 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 VLAN: 1 (default) Voice VLAN: none Administrative private-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 接口工作模式为Trunk Trunk协议类型为802.1q Trunk可以承载所有的VLAN

  32. 从Trunk中添加、删除Vlan 去除VLAN Switch (config-if )# switchport trunk allowed vlan removevlan-list 添加VLAN Switch (config-if)# switchport trunk allowed vlan add vlan-list 检查中继端口允许VLAN的列表 Switch # show interface interface-id switchport

  33. 从Trunk中删除Vlan配置实例 SW1(config-if)#switchport trunk allowed vlan remove 2 SW1(config-if)#end SW1#show interface f0/24 switchport Name: Fa0/24 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 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 VALN 2已经被移除,此时,连接在SW1上的VLAN 2的主机与连接在SW2上的VLAN 2的主机之间不能通

  34. 排除故障 排除故障的步骤 了解故障情况 分析故障可能的原因 通过检测定位故障 分段检测 分层检测 不断缩小故障范围 排除故障

  35. 使用show命令检查配置 查看端口状态 SW1#show interface interface-id switchport 查看VLAN信息 SW1#show vlan brief 查看配置 SW1#show run

More Related