CCNA培训交换机原理及配置_第1页
CCNA培训交换机原理及配置_第2页
CCNA培训交换机原理及配置_第3页
CCNA培训交换机原理及配置_第4页
CCNA培训交换机原理及配置_第5页
已阅读5页,还剩58页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、交换机原理及配置,学习内容,1.交换机特点 2.交换机的三种功能 3.交换机的工作方式 4.交换机的配置,A,B,C,D,物理层,所有设备在同一冲突域 所有设备在同一广播域 所有设备共享相同的带宽,1.交换机特点-集线器和交换机的区别,1.交换机特点集线器:同一个冲突域,接入设备越多冲突机率越大 用CSMA/CD技术 Carrier Sense, Multiple Access with Collision Detection,A,B,C,每port有自己的冲突域 所有的port都在同一广播域,数据链路层,或,1,2,3,1,2,1.交换机特点-交换机和网桥运行在链路层,基于软件实现 只有一个

2、生成树实例 最多16Ports,Bridging,基于硬件实现 (ASIC) 多个生成数实例 更多的Ports,LAN Switching,1.交换机特点-网桥与交换机比较,1.交换机特点,每个端口有自己的冲突域 广播包向所有port转发,缓冲区,交换,地址(MAC)学习 转发/筛选 环路避免,2.交换机的三种功能-Switch 的三个功能,2.交换机的三种功能-Switches 地址学习,初始 MAC 地址表为空 学习源地址,MAC address table,0260.8c01.1111,0260.8c01.2222,0260.8c01.3333,0260.8c01.4444,E0,E1,

3、E2,E3,A,B,C,D,2.交换机的三种功能-Switches地址学习,Station A sends a frame to Station C Switch caches station A MAC address to port E0 by learning the source address of data frames The frame from station A to station C is flooded out to all ports except port E0 (unknown unicasts are flooded),MAC address table,02

4、60.8c01.1111,0260.8c01.2222,0260.8c01.3333,0260.8c01.4444,E0: 0260.8c01.1111,E0,E1,E2,E3,D,C,B,A,2.交换机的三种功能-Switches地址学习,Station D sends a frame to station C 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

5、out to all ports except port E3 (unknown unicasts are flooded),MAC address table,0260.8c01.1111,0260.8c01.2222,0260.8c01.3333,0260.8c01.4444,E0: 0260.8c01.1111,E3: 0260.8c01.4444,E0,E1,E2,E3,D,C,A,B,2.交换机的三种功能-Switches 转发/过滤,Station A sends a frame to station C Destination is known, frame is not flo

6、oded,E0: 0260.8c01.1111,E2: 0260.8c01.2222,E1: 0260.8c01.3333,E3: 0260.8c01.4444,0260.8c01.1111,0260.8c01.2222,0260.8c01.3333,0260.8c01.4444,E0,E1,E2,E3,X,X,D,C,A,B,MAC address table,Station D sends a broadcast or multicast frame Broadcast and multicast frames are flooded to all ports other than the

7、 originating port,0260.8c01.1111,0260.8c01.2222,0260.8c01.3333,0260.8c01.4444,E0,E1,E2,E3,D,C,A,B,E0: 0260.8c01.1111,E2: 0260.8c01.2222,E1: 0260.8c01.3333,E3: 0260.8c01.4444,MAC address table,广播与多播Frame,2.交换机的三种功能-冗余环路避免,冗余路径消除了单故障点 冗余路径的不利后果: 广播风暴, 多个Frame副本, MAC地址表不稳定,Segment 1,Segment 2,Server/ho

8、st X,Router Y,Segment 1,Segment 2,Server/host X,Router Y,Broadcast,Switch A,Switch B,Host X sends a Broadcast,广播风暴,Segment 1,Segment 2,Server/host X,Router Y,Broadcast,Switch A,Switch B,Host X sends a Broadcast,广播风暴,Segment 1,Segment 2,Server/host X,Router Y,Broadcast,Switches continue to propagate

9、broadcast traffic over and over,Switch A,Switch B,广播风暴,多个Frame副本,Segment 1,Segment 2,Server/host X,Router Y,Unicast,Switch A,Switch B,Host X sends an unicast frame to router Y Router Y MAC address has not been learned by either switch yet,Segment 1,Segment 2,Server/host X,Router Y,Switch A,Switch B,

10、Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch yet Router Y will receive two copies of the same frame,多个Frame副本,Segment 1,Segment 2,Server/host X,Router Y,Unicast,Unicast,Switch A,Switch B,Host X sends an unicast frame to Router Y Router Y MAC Ad

11、dress has not been learned by either Switch yet Switch A and B learn Host X MAC address on port 0,Port 0,Port 1,Port 0,Port 1,多个Frame副本,Segment 1,Segment 2,Server/host X,Router Y,Unicast,Unicast,Switch A,Switch B,Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by

12、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,Port 0,Port 1,Port 0,Port 1,多个Frame副本,Complex topology can cause multiple loops to occur Layer 2 has no mechanism to stop the loop,Server/hos

13、t,Workstations,Loop,Loop,Loop,多个环路问题,解决办法: Spanning-Tree Protocol,将一些Port置为Block状态,避免环路的产生,Block,x,One root bridge per network One root port per nonroot bridge One designated port per segment,x,Designated port (F),Root port (F),Designated port (F),Nondesignated port (B),Root bridge,Nonroot bridge,SW

14、 X,SW Y,100baseT,10baseT,生成树协议 STPSpanning-Tree Operations,Switch Y Default priority 32768 (8000 hex) MAC 0c0022222222,Switch X Default priority 32768 (8000 hex) MAC 0c0011111111,BPDU,BPDU = Bridge protocol data unit 桥协议数据单元(2 秒) Root bridge : bridge ID 最小的桥 Non Root bridge: 其它的桥 Bridge ID = Bridge

15、priority + bridge MAC address,生成树协议根桥选择,Switch Y Default priority 32768 MAC 0c0022222222,Switch X Default priority 32768 MAC 0c0011111111,Root bridge,x,Port 0,Port 1,Port 0,Port 1,100baseT,10baseT,Designated port (F),Root port (F),Nondesignated port (B),Designated port (F),生成树协议端口选择,非根桥root port:非根桥

16、上到根桥cost最小的端口 designated port:每一Segment上到根桥cost最小端口根桥的所有端口都是designated port nondesignated port:剩余的所有端口,生成树协议端口最终状态,最终状态 根桥的所有端口: Forwarding 非根桥root port: Forwarding designated port: Forwarding nondesignated port: Blocking,注意:Blocking状态不能转发数据, 但可收发BPDU消息,Link SpeedCost (reratify IEEE spec) Cost (prev

17、ious IEEE spec) - 10 Gbps 21 1 Gbps41 100 Mbps1910 10 Mbps100100,生成树协议路径成本,Switch Y MAC 0c0022222222 Default priority 32768,Switch X MAC 0c0011111111 Default priority 32768,Port 0,Port 1,Port 0,Port 1,Switch Z Mac 0c0011110000 Default priority 32768,Port 0,Can you figure out: What is the root bridge

18、? What are the designated, nondesignated, and root parts? Which are the forwarding and blocking ports?,100baseT,100baseT,生成树:实例,Switch Y MAC 0c0022222222 Default priority 32768,Switch X MAC 0c0011111111 Default priority 32768,Port 0,Port 1,Port 0,Port 1,Switch Z Mac 0c0011110000 Default priority 327

19、68,Port 0,Can you figure out: What is the root bridge? What are the designated, nondesignated, and root parts? Which are the forwarding and blocking ports?,100baseT,100baseT,Designated port (F),Root port (F),Nondesignated port (BLK),Designated port (F),Root port (F),生成树:实例,Spanning-tree transitions

20、each port through several different state:,生成树协议端口状态变化,生成树协议重新计算,生成树协议重新计算,生成树协议汇聚,汇聚发生在 switches ports,当网络拓扑发生变化, switches 必须重新计算 生成树, 这会暂时中断用户访问,blocking,forwarding,Verifying Spanning Tree,wg_sw_a#show spantree vlan number spanning-tree priority,Verifying Spanning Tree,wg_sw_a#show spantree 1 VLAN

21、1 is executing the IEEE compatible Spanning Tree Protocol Bridge Identifier has priority 32768, address 0050.F037.DA00 Configured hello time 2, max age 20, forward delay 15 Current root has priority 1, address 00D0.588F.B600 Root port is FastEthernet 0/26, cost of root path is 10 Topology change fla

22、g not set, detected flag not set Topology changes 53, last topology change occured 0d00h17m14s ago Times: hold 1, topology change 8960 hello 2, max age 20, forward delay 15 Timers: hello 2, topology change 35, notification 2 Port Ethernet 0/1 of VLAN1 is Forwarding Port path cost 100, Port priority

23、128 Designated root has priority 0, address 00D0.588F.B600 Designated bridge has priority 32768, address 0050.F037.DA00 Designated port is Ethernet 0/1, path cost 10 Timers: message age 20, forward delay 15, hold 1,wg_sw_a#show spantree vlan number,3.交换机的工作方式-Switch 转发数据Frame的方式,Cut-through Switch c

24、hecks destination address and immediately begins forwarding frame,Frame,3.交换机的工作方式-Switch 转发数据Frame的方式,Store and forward Complete frame is received and checked before forwarding,Cut-through Switch checks destination address and immediately begins forwarding frame,Frame,Frame,Frame,Frame,Cut-through

25、Switch checks destination address and immediately begins forwarding frame,Frame,Fragment free (modified cut-through)Cat1900 Default Switch checks the first 64 bytes then immediately begins forwarding frame,Frame,Store and forward Complete frame is received and checked before forwarding,Frame,Frame,F

26、rame,3.交换机的工作方式-Switch 转发数据Frame的方式,4.交换机的配置,Catalyst 1900 Menu driven interface Web-based VSM (Visual Switch Manager) IOS CLI (command-line interface),IP address: CDP: Enabled Switching mode: fragment free 100baseT port: Auto-negotiate duplex mode 10baseT port: Half duplex Spanning Tree: En

27、abled Console password: none,Catalyst 1900 的缺省配置,Configuration Modes Global configuration mode wg_sw_a# conf term wg_sw_a(config)# Interface configuration mode wg_sw_a(config)# interface e0/1 wg_sw_a(config-if)#,4.交换机的配置-配置 Switch,4.交换机的配置-配置Switch IP地址,wg_sw_a(config)# int vlan 1 wg_sw_a(config-if

28、)# ip add ip address ip address mask,wg_sw_a(config)#ip address 1 ,wg_sw_a(config)# ip address ip address mask,4.交换机的配置-配置Switch IP地址,wg_sw_a(config)# ip default-gateway ,4.交换机的配置-配置Switch 缺省网关,wg_sw_a(config)#ip default-gateway ,wg_sw_a(config)# ip default-ga

29、teway ip address,4.交换机的配置-配置Switch 缺省网关,wg_sw_a#show ip IP address: 1 Subnet mask: Default gateway: Management VLAN: 1 Domain name: Name server 1: Name server 2: HTTP server: Enabled HTTP port: 80 RIP: Enabled wg_sw_a#,4.交换机的配置-显示Switch IP配置,4.交换机的配置-双工

30、模式,wg_sw_a(config)#interface e0/1 wg_sw_a(config-if)# duplex auto | full | full-flow-control | half,wg_sw_a(config-if)#duplex half,wg_sw_a(config)#interface e0/1 wg_sw_a(config-if)# duplex auto | full | full-flow-control | half,4.交换机的配置-设置双工模式,4.交换机的配置-查看双工模式,4.交换机的配置-管理Mac 地址表,wg_sw_a#show mac-addr

31、ess-table,wg_sw_a#sh mac-address-table Number of permanent addresses : 0 Number of restricted static addresses : 0 Number of dynamic addresses : 6 Address Dest Interface Type Source Interface List - 00E0.1E5D.AE2F Ethernet 0/2 Dynamic All 00D0.588F.B604 FastEthernet 0/26 Dynamic All 00E0.1E5D.AE2B F

32、astEthernet 0/26 Dynamic All 0090.273B.87A4 FastEthernet 0/26 Dynamic All 00D0.588F.B600 FastEthernet 0/26 Dynamic All 00D0.5892.38C4 FastEthernet 0/27 Dynamic All,wg_sw_a#show mac-address-table,4.交换机的配置-管理Mac 地址表,wg_sw_a(config)#,4.交换机的配置-设置永久MAC地址,wg_sw_a(config)#,wg_sw_a(config)#mac-address-table

33、 permanent 2222.2222.2222 ethernet 0/3,设置永久MAC地址,wg_sw_a#sh mac-address-table Number of permanent addresses : 1 Number of restricted static addresses : 0 Number of dynamic addresses : 4 Address Dest Interface Type Source Interface List - 00E0.1E5D.AE2FEthernet 0/2DynamicAll 2222.2222.2222Ethernet 0/

34、3Permanent All 00D0.588F.B604FastEthernet 0/26 Dynamic All 00E0.1E5D.AE2BFastEthernet 0/26 Dynamic All 00D0.5892.38C4FastEthernet 0/27 Dynamic All,wg_sw_a(config)#,wg_sw_a(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/3,设置永久MAC地址,wg_sw_a(config)#,mac-address-table restricted static m

35、ac-address type module/port src-if-list,设置受限MAC地址,wg_sw_a(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1,wg_sw_a(config)#,mac-address-table restricted static mac-address type module/port src-if-list,设置受限MAC地址,wg_sw_a#sh mac-address-table Number of permanent addresses : 1 Number

36、 of restricted static addresses : 1 Number of dynamic addresses : 4 Address Dest Interface Type Source Interface List - 1111.1111.1111Ethernet 0/4StaticEt0/1 00E0.1E5D.AE2FEthernet 0/2 DynamicAll 2222.2222.2222Ethernet 0/3Permanent All 00D0.588F.B604FastEthernet 0/26 Dynamic All 00E0.1E5D.AE2BFastEt

37、hernet 0/26 Dynamic All 00D0.5892.38C4FastEthernet 0/27 Dynamic All,wg_sw_a(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1,wg_sw_a(config)#,mac-address-table restricted static mac-address type module/port src-if-list,设置受限MAC地址,配置端口安全性,wg_sw_a(config-if)#,Configures an interface to be a secured port Define a maximum number of mac addresses allowed in the address table for this port Count can be from 1 to 132 Default is 132,port secure max-mac-count count,wg_sw_a(config-if)#,Configures an interface to be a secured port Define a maximum number of mac addre

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论