交换机原理培训

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Spanning-Tree 端口状态
Spanning-tree transitions each port through several different state:
Blocking Listening Learning Forwarding
Spanning-Tree重计算
100baseT
x
x
BPDU
Designated port
Port 1
x
Nondesignated port (BLK)
10baseT
关键: 收敛时间
• 当网络拓扑发生变化,STP从转发到阻塞
• 当网络拓扑发生变化,STP从阻塞到转发
Duplex概述
Half duplex (CSMA/CD) • Unidirectional data flow • Higher potential for collison • Hubs connectivity Switch
Spanning-Tree:
Switch Z Mac 0c0011110000 Default priority 32768 Port 0
Designated port (F)
100baseT
Port 0 Switch X MAC 0c0011111111 Default priority 32768 Port 1
Switches 如何过滤 帧
MAC address table
A
E0: E2: E1: E3:
0260.8c01.1111 0260.8c01.2222 0260.8c01.3333 0260.8c01.4444
B
0260.8c01.1111
E0
C
E2
X X
E1
0260.8c01.3333
D
E3
• One root bridge per network • One root port per nonroot bridge • One designated port per segment
100baseT
Designated port (F)
Root bridge
Root port (F)
Nonroot bridge
Designated port
MAXAGE
Switch X MAC 0c0011111111 Default priority 32768 Root Bridge Port 1
Port 0
Port 0
Root port (F)
Switch Y MAC 0c0022222222 Default priority 32768
广播风暴
Server/host X
Router Y
Segment 1
Switch A
Broadcast
Switch B
Segment 2
Switches continue to propagate broadcast traffic over and over
MAC数据库不稳定
Server/host X Unicast Port 0 Router Y Segment 1 Unicast Port 0 Switch B Port 1 Segment 2 • • • • • Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch yet Switch A and B learn Host X MAC address on port 0 Frame to Router Y is flooded Switch A and B incorrectly learn Host X MAC address on port 1
交换机原理与配置
学习目标
学习完本部分内容后,能够: • 描述第二层交换的操作 • 理解Spanning Tree 的作用和基本原理 • 查看交换机的配置和操作 • 理解VLAN的概念并配置 VLAN • 了解VTP的概念并配置 VTP • 配置 trunk
传统LAN中冲突消耗带宽
“I could have walked to Finance by now.”
Bridging
• Primarily software based • One spanning-tree instance per bridge • Usually up to 16 ports per bridge
LAN Switching
• Primarily hardware based (ASIC) • Many spanning-tree instances per switch • More ports on a switch
Hub
Full duplex • Point-to-point only • Attached to dedicated switched port • Requires full-duplex support on both ends • Collision free • Collision detect circuit disabled
Switch A
Port 1
解决方案: Spanning-Tree Protocol
x
Block
Provides a loop free redundant network topology by placing certain ports in the blocking state
Spanning-Tree 的操作
HUB
“I knew I should’ve stayed home.”
HUB
为什么要对LAN分段?- 提高用户带宽
Bridge or Router
LAN分段
• 使用下列设备
– Bridges – Routers – Switches
使用 Bridges分段
Bridge
HUB HUB
每个分段有更少的用户 Bridges 存储并转发所有的 frames 与协议无关, 即插即用
SW X SW Y Designated port (F) Nondesignated port (B)
x
10baseT
Spanning-Tree Protocol Root Bridge 选举
Switch X Default priority 32768 (8000 hex) MAC 0c0011111111
0260.8c01.4444
0260.8c01.2222
• Station A sends a frame to station C
• Destination is known, frame is not flooded
具有冗余链路的拓扑
Server/host X
Router Y Segment 1
Root port (F)
Port 0
Root port (F)
Switch Y MAC 0c0022222222 Default priority 32768
Designated port (F)
Port 1
Nondesignated port (BLK)
100baseT Can you figure out: • What is the root bridge? • What are the designated, nondesignated, and root parts? • Which are the forwarding and blocking ports?
BPDU
Switch Y Default priority 32768 (8000 hex) MAC 0c0022222222
BPDU = Bridge protocol data unit (default = sent every 2 seconds) Root bridge = Bridge with the lowest bridge ID Bridge ID = Bridge priority + bridge MAC address In the example, which switch has the lowest bridge ID?
Segment 2
– Redundant topology eliminates single points of failure – Redundant topology causes broadcast storms, multiple frame copies, and MAC address table instability problems
– 转发/过滤
– 避免环路
Switches 如何学习
MAC address table E3: 0260.8c01.4444
A B
0260.8c01.1111
E0 E2
E1 E3
0260.8c01.3333
C
D
0260.8c01.2222
0260.8c01.4444
• Station D sends a frame to station C
配置 Switch
• • • • 地址配置 网关配置 端口速率配置 端口安全配置
交换机上的端口
Cat2924 10BaseT/100BaseT ports
Fiber port f0/1 to f0/24 Null
Cat2924c
f0/1 to f0/22 f0/22 to f0/24
配置 SwΒιβλιοθήκη Baidutch IP Address
wg_sw_a(config)#
ip address {ip address} {mask}
wg_sw_a(config)#ip address 10.5.5.11 255.255.255.0
• Simultaneous, multiple communications(多个通信域)
• High-speed uplinks
• Improved network response(高响应)
• Increased user productivity(提高用户使用报告率)
交换的三个功能
– 地址学习
• Fragment free(碎片隔离) (modified cut-through)—Cat2900 Default
Switch checks the first 64 bytes then immediately begins forwarding frame
Frame
采用交换的好处
• Number of collisions reduced
帧如何通过一个 Switch
• Cut-through(直通式)
Switch checks destination address and immediately begins forwarding frame Frame
• Store and forward(存储转发)
Complete frame is received and checked before forwarding Frame Frame Frame
Spanning-Tree Protocol 路径代价
Link Speed Cost (reratify IEEE spec) Cost (previous IEEE spec) ---------------------------------------------------------------------------------------------------10 Gbps 2 1 1 Gbps 4 1 100 Mbps 19 10 10 Mbps 100 100
• Switch caches station D MAC address to port E3 by learning the source Address of data frames • The frame from station D to station C is flooded out to all ports except port E3 (unknown unicasts are flooded)
Bridges 被 switches代替
使用 Routers分段
HUB
HUB
更好的管理性, 更多的功能, 多条路径 更复杂 费用过高
使用 Switches分段
• • • •
启用成倍的高速率数据交换。 低延时 增加了可用带宽和网络 应用在所有网络中
Bridging 与 LAN Switching
相关文档
最新文档