630 likes | 760 Vues
Computer Network. 张 辉 hzhang@buaa.edu.cn 82338088. Textbook 计算机网络(第四版) Adrew S. Tanenbaum 清华大学出版社 Computer Networking: A Top-Down Approach Featuring the Internet by Kurose and Ross ( 高等教育出版社). 教学内容.
E N D
Computer Network 张 辉 hzhang@buaa.edu.cn 82338088 • Textbook • 计算机网络(第四版) Adrew S. Tanenbaum 清华大学出版社 • Computer Networking: A Top-Down Approach Featuring the Internet by Kurose and Ross (高等教育出版社) 1: Introduction
教学内容 • 计算机网络是计算机技术与通信技术的交叉学科。本课程以计算机网络体系结构为总纲,系统、分层次地讲述计算机网络的基本概念和工作原理,包括物理层、数据链路层、网络层、传输层和应用层的功能、接口和主要协议,重点介绍Internet核心协议族TCP/IP。 1: Introduction
教学目标 • 了解有关计算机网络的基本概念,掌握计算机网络的基本工作原理和主要技术,学会计算机网络应用原理及其方法。 • 以计算机网络体系结构的分层模型为基础,重点掌握Internet。采用的TCP/IP协议族的工作原理,为今后各种计算机网络及其相关应用、学习和研究打下基础。 1: Introduction
What Will We Cover? • 网络简介 • 网络体系结构 • 网络物理层(传输媒介、接口、信号) • 数据链路层(网络检错、同步、HDLC、PPP) • 局域网技术(Ethernet、Token Ring、Token bus 、ATM) • 网络层(IP 编址、subnetting、VLSM、CIDR 、 IPv6 ) • 路由原理(RIP、OSPF、BGP)、广域网 • 传输层(TCP 、UDP) • 流量控制、拥塞控制及网络性能 • 应用层(SMTP、ftp、Web、DNS等) • 网络安全及网络管理 • 网络新技术(MPLS、Multicasting、Grid、NGI等) 1: Introduction
goal: overview, “feel” of networking more depth, detail later in course approach: descriptive use Internet as example Overview: what’s the Internet what’s a protocol? network edge network core access net, physical media performance: loss, delay protocol layers, service models backbones, NAPs, ISPs Network history Part I: Introduction 1: Introduction
计算机网络与其它网络的关系 1: Introduction
计算机网络的构成 计算机网络运行在通信传输子网之上,由用户资源子网和通信 传输子网组成业务网。 1: Introduction
millions of connected computing devices: hosts, end-systems pc’s workstations, servers PDA’s phones running network apps communication links fiber, copper, radio, satellite routers: forward packets of data thru network router workstation server mobile local ISP regional ISP company network What’s the Internet: “nuts and bolts” view 1: Introduction
protocols: control sending, receiving of msgs e.g., TCP, IP, HTTP, FTP, PPP Internet: “network of networks” loosely hierarchical public Internet versus private intranet Internet standards RFC: Request for comments IETF: Internet Engineering Task Force What’s the Internet: “nuts and bolts” view router workstation server mobile local ISP regional ISP company network 1: Introduction
communication infrastructure enables distributed applications: WWW, email, games, e-commerce, database., voting, more? communication services provided: connectionless connection-oriented cyberspace [Gibson]: “a consensual hallucination experienced daily by billions of operators, in every nation, ...." What’s the Internet: a service view 1: Introduction
human protocols: “what’s the time?” “I have a question” introductions … specific msgs sent … specific actions taken when msgs received, or other events network protocols: machines rather than humans all communication activity in Internet governed by protocols What’s a protocol? protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt 1: Introduction
a human protocol and a computer network protocol: TCP connection reply. Get http://www.buaa..edu.cn/index.htm Got the time? 2:00 <file> time What’s a protocol? Hi TCP connection req. Hi Q: Other human protocol? 1: Introduction
协议 protocol • 协议:计算机网络同等层次中,通信双方进行信息交换时必须遵守的规则。 协议的组成: 1. 语法(syntax):以二进制形式表示的命令和相应的结构 2. 语义(semantics):由发出的命令请求,完成的动作和回送的响应组成的集合 3. 定时关系(timing):有关事件顺序的说明 1: Introduction
Who is Who on the Internet ? • Internet Architecture Board (IAB): The IAB is responsible for defining the overall architecture of the Internet, providing guidance and broad direction to the IETF. • Internet Engineering Task Force (IETF):The IETF is the protocol engineering and development arm of the Internet. Subdivided into many working groups, which specify Request For Comments or RFCs. • IRTF (Internet Research Task Force):The Internet Research Task Force is a composed of a number of focused, long-term and small Research Groups. • The Internet Engineering Steering Group (IESG): The IESG is responsible for technical management of IETF activities and the Internet standards process. Standards. Composed of the Area Directors of the IETF working groups. 1: Introduction
Internet Standardization Process • All standards of the Internet are published as RFC (Request for Comments). But not all RFCs are Internet Standards ! • available: http://www.ietf.org • A typical (but not only) way of standardization is: • Internet Drafts • Proposed Standard • Draft Standard (requires 2 working implementation) • Internet Standard (declared by IAB) • David Clark, MIT, 1992: "We reject: kings, presidents, and voting. We believe in: rough consensus and running code.” 1: Introduction
network edge: applications and hosts network core: routers network of networks access networks, physical media: communication links A closer look at network structure: 1: Introduction
end systems (hosts): run application programs e.g., WWW, email at “edge of network” client/server model client host requests, receives service from server e.g., WWW client (browser)/ server; email client/server peer-peer model: host interaction symmetric e.g.: teleconferencing The network edge: 1: Introduction
Goal: data transfer between end sys. handshaking: setup (prepare for) data transfer ahead of time Hello, hello back human protocol set up “state” in two communicating hosts TCP - Transmission Control Protocol Internet’s connection-oriented service TCP service[RFC 793] reliable, in-order byte-stream data transfer loss: acknowledgements and retransmissions flow control: sender won’t overwhelm receiver congestion control: senders “slow down sending rate” when network congested Network edge: connection-oriented service 1: Introduction
Goal: data transfer between end systems same as before! UDP - User Datagram Protocol [RFC 768]: Internet’s connectionless service unreliable data transfer no flow control no congestion control App’s using TCP: HTTP (WWW), FTP (file transfer), Telnet (remote login), SMTP (email) App’s using UDP: streaming media, teleconferencing, Internet telephony Network edge: connectionless service 1: Introduction
mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” The Network Core 1: Introduction
network core Communication networks Broadcast networks End nodes share a common channel (TV, radio…) Switched networks end nodes send to one (or more) end nodes Circuit switching Dedicated circuit per call (telephone, ISDN) (physical) Packet switching Data sent in discrete portions (the Internet) Datagram networks Each packet switched independently Virtual circuit networks Pre-established path (logical) 1: Introduction
End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required pieces allocated to calls resource piece idle if not used by owning call (no sharing) Network Core: Circuit Switching 1: Introduction
Example: 4 users FDM frequency time TDM frequency time Circuit Switching: FDM and TDM 1: Introduction
Circuit Switching • Three phases • circuit establishment • data transfer • circuit termination • If circuit not available: “Busy signal” • Examples • Telephone networks • ISDN (Integrated Services Digital Networks) 1: Introduction
Each phone call is allocated 64kb/s. So, a 2.5Gb/s trunk line can carry about 39,000 calls. Circuit Switching Telephone Network Destination “Callee” Source “Caller” Central Office “C.O.” Central Office “C.O.” Trunk Exchange 1: Introduction
Circuit Switching • A node (switch) in a circuit switching network Node incoming links outgoing links 1: Introduction
Numerical example • How long does it take to send a file of 80k bytes from host A to host B over a circuit-switched network? • All links are 1.536 Mbps • Each link uses TDM with 24 slots • 500 msec to establish end-to-end circuit Work it out! Rate 1.536 Mbps /24 = 64,000 bps Total time 500ms+ 80*8kb/64kbps=10500 ms 1: Introduction
Symbols • Mbps • megabits per second 106 bits per second • MBps • megabytes per second • Gbps, Kbps, • bandwidth • the total information flow over a given time 1: Introduction
分组 packet • 邮政系统 • 信件-收信人地址-发信人地址 • 数据报(DataGram) • 自带寻址信息 • 能独立地从数据源“行走”到目的终点的数据包(packet) 1: Introduction
each end-end data stream divided into packets user A, B packets share network resources each packet uses full link bandwidth resources used as needed, Bandwidth division into “pieces” Dedicated allocation Resource reservation Network Core: Packet Switching resource contention: • 资源可能供不应求 • 拥塞: 分组排队, 等待链路资源 • 在路由器上存储转发: 分组一次移动一跳 • 通过链路传输 • 等待下一条链路 1: Introduction
A B Packet Switching R2 Source Destination R1 R3 R4 • It’s the method used by the Internet. • Each packet is individually routed packet-by-packet, using the router’s local routing table. • The routers maintain no per-flow state. • Different packets may take different paths. • Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers. 1: Introduction
Packet-switching versus circuit switching: human restaurant analogy other human analogies? D E Network Core: Packet Switching 10 Mbs Ethernet C A statistical multiplexing 1.5 Mbs B queue of packets waiting for output link 45 Mbs 1: Introduction
Packet Structure and switching • Data are sent as formatted bit-sequences, so-called packets. • Packets have the following structure: • Header and Trailer carry control information (e.g., destination address, check sum) • Each packet is passed through the network from node to node along some path (Routing) • At each node the entire packet is received, stored briefly, and then forwarded to the next node (Store-and-Forward Networks) Header Data Trailer 1: Introduction
Packet Switching • A node in a packet switching network Node incoming links outgoing links Memory 1: Introduction
1 Mb/s链路 每个用户: 100Kb/s 当“激活” 激活时间为 10% 电路交换: 10 用户 分组交换: 对 35个用户来说, 概率: > 10个用户同时激活小于 .0017 分组交换使得更多用户可“同时”使用网络! 分组交换vs. 电路交换 N users 1 Mbps link 1: Introduction
在突发性数据传输过程中表现优异 资源共享 无须事先建立连接 过度拥塞: 导致分组延迟和丢失 需要协议来保障可靠的数据传输, 拥塞控制 Q: 如何在分组交换网中提供电路交换的性能? 为音频/视频(audio/video)应用提供带宽保障 仍然是一个需要解决的问题 分组交换是不是 “winner”? 分组交换vs. 电路交换 1: Introduction
Goal: move packets among routers from source to destination we’ll study several path selection algorithms datagram network: destination address determines next hop routes may change during session analogy: driving, asking directions virtual circuit network: each packet carries tag (virtual circuit ID), tag determines next hop fixed path determined at call setup time, remains fixed thru call routers maintain per-call state Packet-switched networks: routing 1: Introduction
C 3 3 2 2 D B 1 3 2 1 1 1 2 3 1 2 3 1 1 E 2 2 A 3 3 Virtual circuit network SVC 1 SVC 2 Note: Packet headers don’t need to contain the full destination address of the packet - only contain virtual circuit identifier (VCI) 1: Introduction
Why does the Internet use packet switching? • Efficient use of expensive links: • The links are assumed to be expensive and scarce. • Packet switching allows many, bursty flows to share the same link efficiently. • “Circuit switching is rarely used for data networks, ... because of very inefficient use of the links” - Gallager • Resilience to failure of links & routers: • ”For high reliability, ... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted” - Tanenbaum 1: Introduction Source: Networking 101
Q: How to connection end systems to edge router? residential access nets institutional access networks (school, company) mobile access networks Keep in mind: bandwidth (bits per second) of access network? shared or dedicated? Access networks and physical media 1: Introduction
Dialup via modem up to 56Kbps direct access to router (conceptually) ISDN: intergrated services digital network: 128Kbps all-digital connect to router ADSL: asymmetric digital subscriber line up to 1 Mbps home-to-router up to 8 Mbps router-to-home Residential access: point to point access 1: Introduction
Residential access: cable modems Diagram: http://www.cabledatacomnews.com/cmic/diagram.html 1: Introduction
Cable Network Architecture • HFC: hybrid fiber coax • asymmetric: up to 10Mbps upstream, 1 Mbps downstream Typically 500 to 5,000 homes cable headend home cable distribution network (simplified) 1: Introduction
company/univ local area network (LAN) connects end system to edge router Ethernet: shared or dedicated cable connects end system and router 10 Mbs, 100Mbps, Gigabit Ethernet deployment: institutions, home LANs soon Institutional access: local area networks 1: Introduction
shared wireless access network connects end system to router wireless LANs: radio spectrum replaces wire e.g., Lucent Wavelan 10 Mbps wider-area wireless access CDPD: wireless access to ISP router via cellular network router base station mobile hosts Wireless access networks 1: Introduction
ADSL or cable modem router/firewall/NAT (Network Address Translation) NAT enables a LAN to use one set of IP addresses for internal traffic and a second set of addresses for external traffic. It makes all necessary IP address translations. Ethernet wireless access point Home network components wireless laptops to/from cable headend cable modem router/ firewall wireless access point Ethernet 1: Introduction
physical link: transmitted data bit propagates across link guided media: signals propagate in solid media: copper, fiber unguided media: signals propagate freely e.g., radio Twisted Pair (TP) two insulated copper wires Category 3: traditional phone wires, 10 Mbps ethernet Category 5 TP: 100Mbps ethernet Physical Media 1: Introduction
Coaxial cable: wire (signal carrier) within a wire (shield) baseband: single channel on cable broadband: multiple channel on cable bidirectional common use in 10Mbs Ethernet Physical Media: coax, fiber Fiber optic cable: • glass fiber carrying light pulses • high-speed operation: • 100Mbps Ethernet • high-speed point-to-point transmission (e.g., 5 Gps) • low error rate 1: Introduction
signal carried in electromagnetic spectrum no physical “wire” bidirectional propagation environment effects: reflection obstruction by objects interference Physical media: radio Radio link types: • microwave • e.g. up to 45 Mbps channels • LAN (e.g., waveLAN) • 2Mbps, 11Mbps • wide-area (e.g., cellular) • e.g. CDPD, 10’s Kbps • satellite • up to 50Mbps channel (or multiple smaller channels) • 270 Msec end-end delay • geosynchronous versus LEOS 1: Introduction
packets experience delay on end-to-end path four sources of delay at each hop nodal processing: check bit errors determine output link queueing time waiting at output link for transmission depends on congestion level of router transmission A propagation B nodal processing queueing Delay in packet-switched networks 1: Introduction