1 / 93

第七章 Ethernet 及其接入技术

第七章 Ethernet 及其接入技术. 7.1 Ethernet 及其组网基础. 7.2 PPP 协议. 7.3 Ethernet 接入. 开篇题外话,好名字很关键: 1) 以太网是 学术上性能最差 的 LAN ,但经过技术改进和市场迎合,已成为最重要的两种网络技术之一。 Ether :表示宇宙中 无处不在 的一种“物质”, Ethernet :代表现实中 无处不在 的一种“网络”; 2) suning , gome ,胡锦涛,王鼎 ( 清朝宰相,陕西蒲城人 ) “六尺巷” 千里捎信只为墙,让他三尺又何妨? 万里长城今犹在,不见昔日秦始皇。.

stesha
Download Presentation

第七章 Ethernet 及其接入技术

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. 第七章 Ethernet及其接入技术 • 7.1 Ethernet及其组网基础 • 7.2 PPP协议 • 7.3Ethernet接入 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  2. 开篇题外话,好名字很关键: 1)以太网是学术上性能最差的LAN,但经过技术改进和市场迎合,已成为最重要的两种网络技术之一。 Ether :表示宇宙中 无处不在的一种“物质”, Ethernet :代表现实中 无处不在的一种“网络”; 2) suning,gome,胡锦涛,王鼎(清朝宰相,陕西蒲城人) “六尺巷” 千里捎信只为墙,让他三尺又何妨? 万里长城今犹在,不见昔日秦始皇。

  3. 1. 局域网LAN 1.1定义 局域网LAN - Local Area Network • LAN LANs are high-speed, low-error data networks that cover a relatively small geographic area (up to a few thousand meters). LANs connect workstations, peripherals, terminals, and other devices in a single building or other geographically limited areas. A local area network (LAN) is a computer network that interconnects computers within a limited area such as a home, school, computer laboratory, or office building using network media.[1] The defining characteristics of LANs, in contrast to wide area networks (WANs), include their smaller geographic area, and non-inclusion of leased telecommunication lines . http://en.wikipedia.org维基百科 我们将位于有限区域(几公里)、信息传输速率高(>=10M)、归属于某一单位或组织的网络称为局域网。

  4. 1.2 局域网介质访问方式 (MAC-Media Access Control) • 设备如何访问传输介质 • 各个设备的访问次序 • 固定分配(TDM、FDM) • 随机分配(ALOHA类、CSMA -Carrier Sense Multiple Access类) • 预约分配(令牌-TOKEN、开槽环 等)

  5. 1.3 局域网分类 匹配负载 T H H WS 总线形 : 特点:各站共享同一带宽的传输介质,具有广播性。 访问方法:TDM、FDM、ALOHA类、 CSMA 类、TOKEN(令牌)

  6.  局域网分类 WS WS WS WS 环形(Ring) : 特点:结点有信息收发/转发功能(有源结点); 访问方法: Token(令牌)、Slot-Ring(开槽环)

  7.  局域网分类 结点 主机 I级 交换中心 结点 结点 主机 II级 交换中心 结点 结点 主机 结点 星形(Star) :## 特点:由交换机组成(多级)交换中心。电话交换机(线路交换)、分组(包)交换机(L2 、 L3),路由器等 访问方法: 不需要

  8. 1.4Ethernet介质访问方式 CSMA – Carrier Sense Multiple Access 载波监听多址接入 发送之前,先监测信道忙闲。 信道 立即发送 闲 暂时不发送(由于传播时延,信道可能被别的用户占用 ) 继续监测 忙 迟延一段时间再监测

  9. 1-坚持CSMA: 第0步:新报文进入缓冲器,等待发送; 第1步:监测信道 若信道空闲,立即发送报文,发完返回第0步; 若信道忙,则继续坚持监测,转至第1步 • 0(非)-坚持CSMA 第0步:新报文进入缓冲器,等待发送; 第1步:监测信道,若信道空闲,立即发送报文,发完返回第0步; 若信道忙,放弃监测,选择随机延时t,开始延时; 第2步:延时结束,转至第1步。 • P-坚持CSMA 第0步:新报文进入缓冲器,等待发送。 第1步:监测信道 若信道空闲,在[0,1]内选择一个随机数r,若r≤P,立即发送报文,发完返回第0步;否则,暂停监测信道,选择随机延时t开始,继续。 若信道忙,继续监测,转至第1步。 第2步:延时结束,转至第1步。

  10. P-坚持CSMA (注解:此法实际为1—坚持(以概率)p发送CSMA,几乎所有的教材和技术书籍一直在沿用错误的表示形式) Ethernet MAC 采用CSMA/CD( collision detection)访问协议 某站监测到信道空闲时,即使本站要发送数据,但需延时9.6μs( 0.96μs for FE, 0.096μs for GE),以提供帧间间隔和链路控制器的恢复时间,向信道发送数据;在发送数据的同时,检测是否发生碰撞? 如发生碰撞,则停止传送帧的内容,发送特定序列(Jammed Signal ,32~48比特),确保所有站检测到碰撞 。 “发前监测,边发边测”

  11. CSMA/CD - A Simple Definition A network station wishing to transmit will first check the cable plant to ensure that no other station is currently transmitting (CARRIER SENSE). The communications medium is one cable, therefore, it does allow multiple stations access to it with all being able to transmit and receive on the same cable (MULTIPLE ACCESS). Error detection is implemented throughout the use of a station "listening" while it is transmitting its data. Two or more stations transmitting causes a collision (COLLISION DETECTION) A jam signal is transmitted to network by the transmitting stations that detected the collision, to ensure that all stations know of the collision. All stations will "backoff" for a random time. Detection and retransmission is accomplished in microseconds. 11 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University 2014/9/13

  12. 二、LAN的协议标准 • OSI模型1和2层与LAN的对比 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  13. LAN的协议标准(续) • IEEE 802 Active Working Groups and Study Groups • 802.1 Higher Layer LAN Protocols Working Group , IEEE 802系列标准的总体介绍,LAN的体系结构,网络互联,网络管理等 • 802.3 Ethernet Working Group ,CSMA/CD逻辑总线介质访问控制子层与物理层的规范 • 802.11 Wireless LAN Working Group,无线局域网技术 • 802.15 Wireless Personal Area Network (WPAN) Working Group • 802.16 Broadband Wireless Access Working Group • 802.17 Resilient Packet Ring Working Group (弹性分组环) • 802.18 Radio Regulatory TAG(Technical Advisory Group ) • 802.19 Coexistence TAG • 802.20 Mobile Broadband Wireless Access (MBWA) Working Group • 802.21 Media Independent Handoff Working Group • 802.22 Wireless Regional Area Networks • 802.23 Emergency Services Working Group • 802.24Smart Grid TAG • 802.25 Omni-Range Area Network 13 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University 2014/9/13

  14. IEEE 802 Active Working Groups and Study Groups • IEEE 802.15Wireless PAN • IEEE 802.15.1 Bluetooth certification • IEEE 802.15.2 IEEE 802.15 and IEEE 802.11 coexistence • IEEE 802.15.3 High-Rate wireless PAN (e.g., UWB, etc.) • IEEE 802.15.4 Low-Rate wireless PAN  (e.g.,  ZigBee,  Wireless HART, MiWi, etc.) • IEEE 802.15.5 Mesh networking for WPAN • IEEE 802.15.6 Body area network • Comments: • A personal area network (PAN) is a computer network used for data transmission among devices such as computers,telephones and personal digital assistants. PANs can be used for communication among the personal devices themselves (intrapersonal communication), or for connecting to a higher level network and the Internet (an uplink). • ZigBee is used in applications that require only a low data rate, long battery life, and secure networking. ZigBee has a defined rate of 250 kbit/s, best suited for periodic or intermittent data or a single signal transmission from a sensor or input device. • WirelessHART is a wireless sensor networking technology based on the Highway Addressable Remote Transducer Protocol (HART) • MiWi and MiWi P2P are proprietary wireless protocols designed by Microchip Technology that uses small, low-power digital radios based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs). 14 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University 2014/9/13

  15. Inactive Working Groups and Study Groups (停止活动) • 802.2 Logical Link Control Working Group,逻辑链路控制协议(LLC),是数据链路层的上半部分 • 802.5 Token Ring Working Group,令牌环(Token Ring)介质访问控制子层与物理层规范 • 802.12 Demand Priority Working Group • Disbanded  Working Groups and Study Groups (解散) • 802.4 Token Bus Working Group,令牌总线(Token Bus)介质访问控制子层与物理层规范 • 802.6 Metropolitan Area Network Working Group,城域网(MAN)介质访问控制子层与物理层的规范 • 802.7 Broadband TAG (Technical Advisory Group ) • 802.8 Fiber Optic TAG • 802.9 Isochronous LAN Working Group,语音与数据综合业务局域网(ISLN)技术 • 802.10 Security Working Group • 802.14 Cable Modem Working Group (Temporarily housed off-site),电缆电视(Cable-TV) • QOS/FC Executive Committee Study Group Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  16. IEEE802标准之间的关系 802.10 802.1 802.2 802.3 802.4 802.5 802.6 802.9 802.11 … Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  17. 三、以太网类型概述 3.1 features of Ethernet • What is Ethernet ? • ETHERNET • Ethernet is the most widely used local area network (LAN) technology. • Ethernet was designed to fill the middle ground between long-distance, low-speed networks and specialized, computer-room networks carrying data at high speeds for very limited distances. • Ethernet is well suited to applications where a local communication medium must carry sporadic(零星的), occasionally heavy traffic at high peak data rates. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  18. The features of Ethernet are as followings: • ETHERNET • Specified by IEEE 802.3,最早由Xeror、DEC和Intel三公司发明 • MAC: CSMA/CD,carrier sense multiple access/collision detection • broadcast networks • 逻辑总线, the implementation is usually a star-bus , e.g., hub • 物理拓扑 • 总线,星,扩展星型 • Ethernet and IEEE 802.3 are implemented through hardware. Typically, the physical part of these protocols is either an interface card in a host computer or circuitry on a primary circuit board (主板) within a host computer. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  19. 3.2 types of Ethernet Ethernets can be classified as four types according to their speeds: 10M,100M, 1G, 10G extended star: link stars at different levels together Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  20. 10BASE 5 10BASE 2 10BASE-T 10BROAD 36 10BASE-F 介 质 粗同轴(75Ω) 细同轴(75Ω) UTP CATV同轴(75Ω) 一对光纤 调制 Manchester Manchester Manchester DPSK Manchester 拓扑 结构 总线 总线 星型 总线/星型 星型 最大 距离(m) 500 200 100 3600 1000-2000 • 10M Ethernet • What is Manchester coding ? Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  21. 100M Ethernet (FE: Fast Ethernet) 100 BASE-T4 • 适用于UTP-3/4/5或STP。 • 4对双绞线,其中3对传数据,1对传冲突检测信号。 • 传输码8B6T(triple)(8个比特用6个三元码元表示,28<36),码元速率100*6/8*1/3=25 MHz • 最大网段100m • RJ-45 • 100 BASE-TX • 适用于UTP-5或STP • 2对双绞线,1对发送,1对接收 • 传输码4B/5B,码元速率 100*5/4=125 MHz • 最大网段100m • RJ-45,DB-9; 全双工 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  22. 100M Ethernet (FE: Fast Ethernet) • 100 BASE-FX • 适用于单模(62.5μm)和多模(125μm) • 传输码4B/5B,码元速率125MHz。 • 最大网段长150m、412m、2000m、10Km •         SC、ST连接器 (园、方型) • 全双工传输 部分词缩写注解: BASE 代表 基带 T 代表 双绞线(Twisted Pair)        F 代表 光纤 Fiber Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  23. 1000M Ethernet (GE: Giga-bit Ethernet),传输速率为1 Gb/s 的以太网,由IEEE 802.3z制订 1)1000 BASE-X(IEEE 802.3z) (1)1000 BASE-LX (long) 长波长激光1.27~1.35μm,可采用多模(50μm、62.5μm,传输距离<500m)、单模(9μm,传输距离<5Km)。 (2)1000 BASE-SX (Short) 短波长激光0.77~0.86μm,仅支持多模光纤 50μm <550m 62.5μm <275m (3)1000 BASE-CX (Cable) 高质量双绞线或同轴电缆,有效距离<25m,由IEEE 802.3z起草。 2)1000 BASE-T(IEEE 802.3ab) (Twisted) 采用UTP-5,有效长度<100m. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  24. 3.3 GE 工作原理 • 收发两方可流控方式工作; • 为保证Ethernet的工作直径,在短帧后加入“载波扩展”(0~448字节)(注:GE仅采用星型结构或点对点结构,在半双工模式时,仅在一组突发帧的首个帧存在载波扩展,后续帧不需要;在全双工模式时,不需要载波扩展) Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  25. 对多个短MAC帧可采用连续突发方式发送以提高效率;对多个短MAC帧可采用连续突发方式发送以提高效率; • 采用8B/10B编码; • 定义了MAC/PHY的接口GMII(Gigabit Medium Independent Interface)(8位数据接口,125MHz时钟,包括控制、状态、扩展信号); •   BWT ( Busy Waiting Time)为0.096μs. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  26. GE Medium Options (log scale) Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  27. 10GE Distance Options (log scale)extend from 5km to 10/40 km for long wavelength fiber log scale 27 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University 2014/9/13

  28. 3.4 Ethernet使用的光纤连接器 • 光纤连接器图形 • FC连接器ferrule connector (金属箍(gu), 金属环) • -使用螺丝旋紧方式

  29. LC连接器 -使用卡接方式 • Lucent发明,体积小 • 光纤连接器图形 • ST连接器straight tip • -使用卡接方式

  30. 四、GE标准及GMII GMII:千兆比特媒质无关接口(detailed in next slide) Short(long)-haul: 短途(程)、长途 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  31. 以太网层次结构 AUI:attachment unit interface ,附件单元接口 ; RS: Reconciliation SublayerPLS: Physical layer signaling ,物理层信令; MAU:media attachment unit;Short (long)-haul: 短途(程)、长途; MII/GMII/XGMII are widely used Question:Why the MII/GMII/XGMII interfaces are defined? Or what are the purposes defining these interfaces? Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  32. 五、以太网帧格式 5.1 10M Ethernet frame format • Preamble - The alternating pattern of 1's and 0's tells receiving stations that a frame is Ethernet or IEEE 802.3. The Ethernet frame includes an additional byte that is the equivalent of the Start of Frame (SOF) field specified in the IEEE 802.3 frame. (10101010b) • Start-of-Frame (SOF, 10101011) - The IEEE 802.3 delimiter byte ends with two consecutive 1 bits, which serve to synchronize the frame-reception portions of all stations on the LAN. SOF is explicitly specified in Ethernet. 7 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  33. 10M Ethernet frame format • destination and source addresses - The first 3 bytes of the addresses are specified by the IEEE on a vendor-dependent basis. The last 3 bytes are specified by the Ethernet or IEEE 802.3 vendor. The source address is always a unicast (single-node) address. The destination address can be unicast,multicast 【多播,组播】(group), or broadcast (all nodes). • type (Ethernet) - The type specifies the upper-layer protocol to receive the data after Ethernet processing is completed. This field presents the length of the frame in IEEE 802.3. (类型数值总是大于最大802.3数据包的长度,故两种含义可共存) 对于数据长度小于46字节的帧,要将数据“填充”到46字节 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  34. 10M Ethernet frame format • data (Ethernet)- After physical-layer and link-layer processing is complete, the data contained in the frame is sent to an upper-layer protocol, which is identified in the type field. Although Ethernet version 2 does not specify any padding, in contrast to IEEE 802.3, Ethernet expects at least 46 bytes of data. • frame check sequence (FCS) - This sequence contains a 4 byte CRC value that is created by the sending device and is recalculated by the receiving device to check for damaged frames. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  35. 字节 1 7 1 6 6 2 46~1500 4 1 SSD 同步码 起始符 宿地址 源地址 类型/长度 数据 FCS SED 5.2 FE frame format • SSD:流起始界 Stream Start Delimiter • SED:流结束界 Stream End Delimiter • SSD采用5b中的JK字符: 1100010001 • SED采用5b中的TR字符: 0110100111 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  36. 六、以太组网中的设备network elements in Ethernet networking(自学) • 中继器 (Repeaters) 完成两个相同(/不同)的网络物理层信号的放大(或物理层帧的变换) • Repeaters The purpose of a repeater is to regenerate and retime network signals at the bit level allowing them to travel a longer distance on the media. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  37. 集线器 (Hub) 功能:接收收到的信号,去除噪声并放大信号,沿计划路线传播该信号。集线器工作在 OSI 模型的第一层:物理层。 使用场合: 1、以太网连线距离为 100 米左右。当超过该距离时,传输信号变得极为微弱,以至于无法识别,使用集线器可以初步解决这一问题。 2、在小距离范围内,多台主机需要通过同一个物理端口联接互联网,可以使用集线器解决这一问题。 优点:价格低廉,无需软件设置。 缺点: 1、扩展的地理范围有限。 2、增加了广播域和冲突域的范围,降低了网络效率。 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  38. Hub (multi-port repeater ) • The purpose of a hub is to regenerate and retime network signals. This is done at the bit level to a large number of hosts (e.g. 4, 8, or even 24) using a process known as concentration. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  39. (a) RJ-45直通连接 (b) RJ-45交叉连接 RJ-45插头和插座的结构 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  40. 网桥 (Bridge) 功能:接收并放大收到的信号,根据目的地 MAC地址决定是否转发该信号。网桥使用暂存的桥接表进行决定。网桥工作在 OSI模型的第二层:数据链路层。 使用场合: 使用网桥可以将一个大的网段分为多个不同的冲突域。 优点: 过滤部分网络业务量,减小冲突域,增加效率; 无需软件设置。 缺点: 尚未分割广播域,容易引起广播风暴,可导致网络瘫痪。 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  41. Bridge • A bridge connects network segments and must make intelligent decisions about whether to pass signals on to the next segment. • A bridge can improve network performance by eliminating unnecessary traffic and minimizing the chances of collisions. The bridge divides traffic into segments and filters traffic based on the station or MAC address. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  42. 交换机 (Switch) 功能: 接收并放大收到的信号,根据目的地 MAC(或IP) 地址和相应控制算法决定是否转发该信号。交换机使用暂存的交换表进行转发决定。交换机工作在 OSI 模型的第2/3层(2/3层交换)。 使用场合: 1、可以将一个大的网段分为多个不同的段。 2、是划分虚拟局域网 (VLAN:Virtual LAN) 的核心设备。 优点: 过滤部分网络业务量,减小冲突域,增加效率。 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  43. 交换机 (Switch) • Switching Table • 每个端口一台计算机 • 每个端口多台计算机(MACs) Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  44. Ethernet交换原理 工作原理: 接收某端口的数据包,分析源宿MAC地址 ①    DA与某个端口中的SAj相同,则输出到j端口。 ②   若未找到匹配地址,向可能的(所有)端口转发; ③  如SA不在转发地址表,将SA与其输入端口i 的关系加入到动态表中。 交换方式: • 存储转发(Store & Forward) • 切(直)通方式(Cut through) Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  45. 路由器(Router) 完成两个相同(/不同)(LAN)网络的第三层PDU的转发或变换 。 The purpose of a router is to examine incoming packets (Layer 3 data), choose the best path for them through the network, and then switch them to the proper outgoing port. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  46. 路由器(Router) 功能: 1、router间可使用路由协议(e.g., OSPF),交换各自的“最短路径信息”,本地router整合从邻接(Adjacent)router来的信息,计算到达各个网络目的地的最佳路径; 2、基于路由表、访问控制列表进行数据包转发; 3、路由器工作在 OSI模型的第三层:网络层。 Could you list the similarities and differences between a router and a data switch? 使用场合: 1、连接不同类型的局域网; 2、连接局域网到广域网,构成互联网; 3、是网络最佳路由计算和数据转发的核心智能设备。 优点: 1、基于 IP源和目的地址进行最佳路由计算,进行转发决定; 2、隔离冲突域和广播域,增加网络效率。提高安全性。 缺点: 路由器需要复杂的软件来进行配置与设置。 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  47. 路由器(Router) • Router Interface Port A router can have many different types of interface ports. • a serial port which is a WAN connection. • the console (控制台) port connection which allows direct connection to the router to be able to configure it (ex RS-232,Etherent, etc. ) • an Ethernet port which is a LAN connection. • AUI (Attachment Unit Interface) connector for the Ethernet connection. Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  48. 路由器(Router) Connecting separate networks together Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  49. 网关(Gateway) 实现两个不同的网络在第三层(或)及其以上层PDU的转换和/或交换(用户PDU、信令PDU)。 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

  50. 七、以太组网-Virtual LAN • Vendor-specific solution and implementation strategies • Roughly equated to a broadcast domain • A group of end-stations, on multiple physical LAN segments, that are not constrained by their physical location and can communicate as if they were on a common LAN • VLAN Membership by MAC Address • Layer 2 VLAN: MAC Address VLAN 1212354145121 1 2389234873743 2 3045834758445 2 5483573475843 1 Dr. Zhanqi XU,National Key Lab on ISN, Xidian University

More Related