版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、刘 扬 DataLink and Layer,1-1,Chapter 5Link Layer and LANs,Computer Network 2011,刘 扬 DataLink and Layer,1-2,Chapter 5: The Data Link Layer,Our goals: understand principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing rel
2、iable data transfer, flow control: done! instantiation and implementation of various link layer technologies,刘 扬 DataLink and Layer,1-3,Link Layer,5.1 Introduction and services 5.2 Error detection and correction 5.3 Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Hubs and switch
3、es,刘 扬 DataLink and Layer,1-4,Link Layer: Introduction,Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram,data-link layer has responsibili
4、ty of transferring datagram from one node to adjacent node over a link,刘 扬 DataLink and Layer,1-5,Link layer: context,Datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link Each link protocol provide
5、s different services e.g., may or may not provide rdt over link,刘 扬 DataLink and Layer,1-6,Link layer: context,transportation analogy trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transp
6、ortation mode = link layer protocol travel agent = routing algorithm,刘 扬 DataLink and Layer,1-7,Link Layer Services,Framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identify source, dest different f
7、rom IP address! Reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit error link (fiber, some twisted pair) wireless links: high error rates Q: why both link-level and end-end reliability?,刘 扬 DataLink and Layer,1-8,Link Layer Services (more),
8、Flow Control: pacing between adjacent sending and receiving nodes Error Detection: errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame Error Correction: receiver identifies and corrects bit error(s) without resorting to re
9、transmission Half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but not at same time,刘 扬 DataLink and Layer,1-9,帧的定义和功能,组帧(Framing) 将比特流分成离散的帧,并计算每个帧的校验和。 组帧方法: 字符计数法 带字符填充的首尾字符定界法 带位填充的首尾标记定界法 物理层编码违例法,刘 扬 DataLink and Layer,1-10,字符计数法,在帧头中用一个域来表示整个帧的字符个数 缺点:若计数出
10、错,对本帧和后面的帧有影响,A character stream. (a) Without errors. (b) With one error.,刘 扬 DataLink and Layer,1-11,带字符填充的首尾字符定界法,起始字符 FLAG,结束字符FLAG 字符填充, “ESC”插入删除技术 缺点:局限于8位字符和ASCII字符传送。,刘 扬 DataLink and Layer,1-12,带位填充的首尾标记定界法,帧的起始和结束都用一个特殊的位串“01111110”,称为标记(flag) “0”比特插入删除技术,刘 扬 DataLink and Layer,1-13,Adapto
11、rs Communicating,link layer implemented in “adaptor” (aka NIC) Ethernet card, PCMCI card, 802.11 card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc.,receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to rcving node adap
12、ter is semi-autonomous link 48 bits Bit time: .1 microsec for 10 Mbps Ethernet ;for K=1023, wait time is about 50 msec,刘 扬 DataLink and Layer,1-71,Ethernets CSMA/CD (more),Exponential Backoff: Goal: adapt retransmission attempts to estimated current load heavy load: random wait will be longer first
13、collision: choose K from 0,1; delay is K 512 bit transmission times after second collision: choose K from 0,1,2,3 after ten collisions, choose K from 0,1,2,3,4,1023,刘 扬 DataLink and Layer,1-72,CSMA/CD efficiency,Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame Efficie
14、ncy goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA, but still decentralized, simple, and cheap,刘 扬 DataLink and Layer,1-73,10BaseT and 100BaseT,10/100 Mbps rate; called “fast ethernet” T stands for Twisted Pair Nodes connect to a hub: “star topology”; 100 m
15、max distance between nodes and hub,刘 扬 DataLink and Layer,1-74,Hubs,Hubs are essentially physical-layer repeaters: bits coming from one link go all other links at the same rate no frame buffering no CSMA/CD at hub: adapters detect collisions provides net management functionality,刘 扬 DataLink and Lay
16、er,1-75,Manchester encoding,Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to synchronize to each other no need for a centralized, global clock among nodes! Hey, this is physical-layer stuff!,刘 扬 DataLink and Layer,1-76,Gbit Ethernet,uses standard Ethernet fra
17、me format allows for point-to-point links and shared broadcast channels in shared mode, CSMA/CD is used; short distances between nodes required for efficiency uses hubs, called here “Buffered Distributors” Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now !,刘 扬 DataLink and Layer,1-77,Link
18、Layer,5.1 Introduction and services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Interconnections: Hubs and switches,刘 扬 DataLink and Layer,1-78,Interconnecting with hubs,Backbone hub interconnects LAN segments Extends max distance betwee
19、n nodes But individual segment collision domains become one large collision domain Cant interconnect 10BaseT full duplex Switching: A-to-A and B-to-B simultaneously, no collisions,刘 扬 DataLink and Layer,1-87,More on Switches,cut-through switching: frame forwarded from input to output port without fi
20、rst collecting entire frame slight reduction in latency combinations of shared/dedicated, 10/100/1000 Mbps interfaces,刘 扬 DataLink and Layer,1-88,Institutional network,刘 扬 DataLink and Layer,1-89,Switches vs. Routers,both store-and-forward devices routers: network layer devices (examine network laye
21、r headers) switches are link layer devices routers maintain routing tables, implement routing algorithms switches maintain switch tables, implement filtering, learning algorithms,刘 扬 DataLink and Layer,1-90,Summary comparison,刘 扬 DataLink and Layer,1-91,Synthesis: a day in the life of a web request,
22、journey down protocol stack complete! application, transport, network, link putting-it-all-together: synthesis! goal: identify, review, understand protocols (at all layers) involved in seemingly simple scenario: requesting www page scenario: student attaches laptop to campus network, requests/receiv
23、es ,刘 扬 DataLink and Layer,1-92,A day in the life: scenario,Comcast network /13,Googles network /19,05,web server,DNS server,school network /24,web page,刘 扬 DataLink and Layer,1-93,A day in the life connecting to the Internet,connecting laptop needs to get i
24、ts own IP address, addr of first-hop router, addr of DNS server: use DHCP,router (runs DHCP),DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.1 Ethernet,Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server,Ethernet demuxed to IP demuxe
25、d, UDP demuxed to DHCP,刘 扬 DataLink and Layer,1-94,A day in the life connecting to the Internet,DHCP server formulates DHCP ACK containing clients IP address, IP address of first-hop router for client, name & IP address of DNS server,router (runs DHCP),encapsulation at DHCP server, frame forwarded (
26、switch learning) through LAN, demultiplexing at client,Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router,DHCP client receives DHCP ACK reply,刘 扬 DataLink and Layer,1-95,A day in the life ARP (before DNS, before HTTP),before sending HTTP request, need IP a
27、ddress of : DNS,DNS query created, encapsulated in UDP, encapsulated in IP, encasulated in Eth. In order to send frame to router, need MAC address of router interface: ARP,ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface,client now knows MA
28、C address of first hop router, so can now send frame containing DNS query,刘 扬 DataLink and Layer,1-96,A day in the life using DNS,IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router,IP datagram forwarded from campus network into comcast network, routed (tables cre
29、ated by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server,demuxed to DNS server DNS server replies to client with IP address of ,Comcast network /13,DNS server,刘 扬 DataLink and Layer,1-97,A day in the life TCP connection carrying HTTP,to send HTTP request, client first opens TCP
30、socket to web server,TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server,TCP connection established!,05,web server,web server responds with TCP SYNACK (step 2 in 3-way handshake),刘 扬 DataLink and Layer,1-98,A day in the life HTTP request/reply,HTTP request sent
31、into TCP socket,IP datagram containing HTTP request routed to ,IP datgram containing HTTP reply routed back to client,05,web server,web server responds with HTTP reply (containing web page),web page finally (!) displayed,刘 扬 DataLink and Layer,1-99,Chapter 5: Summary,principles behind da
32、ta link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing instantiation and implementation of various link layer technologies Ethernet switched LANS, VLANs PPP virtualized networks as a link layer: MPLS synthesis: a day in the life of a we
33、b request,刘 扬 DataLink and Layer,1-100,Chapter 5: lets take a breath,journey down protocol stack complete (except PHY) solid understanding of networking principles, practice . could stop here . but lots of interesting topics! wireless multimedia security network management,刘 扬 DataLink and Layer,1-1
34、01,Chapter 5: Summary,principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing instantiation and implementation of various link layer technologies Ethernet switched LANS PPP virtualized networks as a link layer: ATM, M
35、PLS,刘 扬 DataLink and Layer,1-102,Course Overview undergraduate course,Chapter 1,Chapter 3,Chapter 4,Chapter 2,Introduction,Application Layer,Network Layer,Transport Layer,Chapter 5,Link Layer and LANs,刘 扬 DataLink and Layer,1-103,Chapter 1 Introduction,什么是因特网 ?,1,具体构成描述 服务描述 什么是协议,网络边缘,2,端系统、客户机和服务器
36、 无连接服务和面向连接服务,刘 扬 DataLink and Layer,1-104,Chapter 1 Introduction,网络核心,3,电路交换、分组交换与报文交换 分组交换网络:数据报网络和虚电路网络,接入网和物理媒体,4,网络接入 物理媒体,ISP和因特网主干,5,刘 扬 DataLink and Layer,1-105,Chapter 1 Introduction,分组交换网络中的时延和分组丢失,6,时延的类型 排队时延和分组丢失 因特网中的时延和路由,协议层次和它们的服务模型,7,分层的体系结构 分层、报文、报文段、数据报和帧,OSI 参考模型与TCP协议,8,计算机网络和因
37、特网的历史,9,刘 扬 DataLink and Layer,1-106,Chapter 2 Application Layer,应用层协议原理,1,网络应用程序体系结构 进程通信 应用层协议 应用需要什么样的服务 因特网运输协议提供的服务,刘 扬 DataLink and Layer,1-107,Chapter 2 Application Layer,Web应用和HTTP协议,2,HTTP概况 非持久连接和持久连接 HTTP报文格式 用户与服务器交互:Cookie Web缓存 条件GET方法,文件传送协议:FTP,3,刘 扬 DataLink and Layer,1-108,Chapter
38、2 Application Layer,因特网中的电子邮件,4,SMTP 与HTTP的对比 邮件报文格式和MIME 邮件访问协议,DNS:因特网的目录服务,5,DNS提供的服务 DNS工作机理概述 DNS记录和报文,刘 扬 DataLink and Layer,1-109,Chapter 2 Application Layer,P2P文件共享,6,TCP套接字编程,7,TCP套接字编程 一个Java客户机/服务器应用程序例子,UDP套接字编程,8,刘 扬 DataLink and Layer,1-110,Chapter 3 Transport Layer,概述和运输层服务,1,运输层和网络层的关系 因特网运输层概述,多路复用与多路分解,2,无连接运输:UDP,3,UDP报文段结构 UDP检查和,刘 扬 DataLink and Layer,1-111,Chapter 3 Transport Layer,可靠数据传输的原理,4
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2025学年度一级建造师试题预测试卷含答案详解【模拟题】
- 2024-2025学年度六盘水职业技术学院单招《职业适应性测试》高频难、易错点题带答案详解(满分必刷)
- 2024-2025学年度火电电力职业鉴定过关检测试卷【全优】附答案详解
- 2024-2025学年度注册核安全工程师题库(夺冠)附答案详解
- 2024-2025学年度电梯考试模拟题库附完整答案详解(典优)
- 2024-2025学年咨询工程师预测复习含完整答案详解(必刷)
- 2024-2025学年山东电子职业技术学院电视播音主持期末考试考前冲刺练习【达标题】附答案详解
- 2024-2025学年天津铁道职业技术学院单招《职业适应性测试》经典例题附答案详解(预热题)
- 2024-2025学年度公务员(省考)题库检测试题打印附参考答案详解(培优)
- 2024-2025学年度临床执业医师考试综合练习附参考答案详解【典型题】
- 2023年北京天文馆招考聘用笔试题库含答案解析
- 海岸工程海岸防护概论
- 静态与动态分析指标
- 《铁路技术管理规程》普速铁路部分
- YS/T 690-2009天花吊顶用铝及铝合金板、带材
- GB/T 4937.3-2012半导体器件机械和气候试验方法第3部分:外部目检
- GB/T 4456-2008包装用聚乙烯吹塑薄膜
- 散打裁判规则与裁判法
- CB/T 615-1995船底吸入格栅
- 历年高考数学真题精选45 排列组合
- 风电项目达标投产实施细则
评论
0/150
提交评论