710 likes | 905 Views
CMU SSD8: Networks and Distributed Computing. Tan Yi Software College Northwestern Polytechnical University. Computer Networks. 1950s Computers 1970s Connect super-computers at major research centers 1990s Personal computing,Internet,WWW, wireless 3G phones
E N D
CMU SSD8: Networks and Distributed Computing Tan Yi Software College Northwestern Polytechnical University
Computer Networks • 1950s Computers • 1970s Connect super-computers at major research centers • 1990s Personal computing,Internet,WWW, wireless 3G phones • 2010s Smart dust (智能微尘), nano-fabrication,wearable networks,biological computing,swarm computing • Trend: larger numbers of smaller machines
Networks • Potential of networking: • move bits everywhere, cheaply, and with desired performance characteristics • Break the space barrier for information • Network provides “connectivity”
What’s a Computer Network? • Software/Programming Perspective: • A collection of Software protocols that enable computers to communicate • TCP,UDP,IP,
What is a Computer Network? • Hardware Perspective: • A set of hardware and interconnection technologies for data communication • Switches, Routers, Bridges • Cables, Optical Fibers, Telephone lines
Connectivity • Building Blocks • links: coax cable, optical fiber... • nodes: general-purpose workstations... • Directconnectivity:
What is Internet ? • Hardware and software perspective • Network infrastructer
Network Core 1939 Telephone switch 1999 Network switch
Circuit switching • A dedicated communication path is established between two stations through the nodes of the network • The dedicated path is called a circuit-switched connection or circuit • A circuit occupies a fixed capacity of each link for the entire lifetime of the connection. Capacity unused by the circuit cannot be used by other circuit • Data is not delayed at the switches
Circuit switching(线路交换) A node in a Circuit-switching network
线路交换 • 线路交换通信包括以下几个阶段 • 线路的建立 • 数据的传输 • 线路的终止 • “Busy Signal” if capacity for a circuit not available. • Most important circuit-switching networks: • Telephone networks • ISDN (Integrated Services Digital Networks)
Multiplexing(复用) in Circuit switching • TDM (time-division multiplexing) • 时分复用 • FDM (frequency-division multiplexing) • 频分复用
TDM (时分复用) • 每一个输入都独占使用所有的频带 • 服务时间是共享的
FDM (频分复用) • 商用的广播与电视 • 每一个输入都可以持续的访问通信介质 • 频谱共享
packet switching (分组交换) • 应用程序为了完成其任务而交换报文(Message) • 源主机将长报文划分为较小的数据块,称之为分组(Packet) • 分组有如下的结构: • 在源和目的之间,分组都通过通信链路和分组交换机(packet switch) • 多数分组交换机在链路的输入端使用存储转发传输(store-and-forward) • No capacity is allocated for packets
Packet switching 开销:每一个分组都带有自描述的报头,缓存 以及应用程序的延迟
Datagram Packet Switching(数据报交换) • 网络节点独立处理每一个分组 • 如果主机A连续发送两个分组给主机B,这两个分组可能采用不同的路径 • 意味着: • 分组序列接收到的顺序与发送时的顺序可能是不同的 • 每一个分组首部必须包含目的地的全地址
Virtual-Circuit(虚电路) Packet switching • 线路交换与分组交换的融合 • 所有数据以分组形式传送 • 发送方发送的所有分组都经过一个预先确立的路径(虚电路) • 保证了分组的发送顺序 • Packets from different virtual circuits may be interleaved
Example Applet 1 • Transmission Delay
网络软件由协议组织 人类的协议与网络协议 TCP 连接响应 Get http://www.awl.com/kurose-ross 几点了? 2:00 <file> 时间 什么是协议? 你好 TCP 连接请求 你好
类比:航空旅行 协议:不同地方的执行的一系列服务
航空旅行的组织:不同的视角 协议:不同地方的层次:每一层执行了一个服务
Application Presentation Session Transport Network Datalink Physical 协议的参考层次 TCP/IP Model TCP/IP Protocols OSI Ref Model 自顶向下方法首先讨论应用层,然后向下学习 Application FTP Telnet HTTP Transport TCP UDP Internetwork IP Host to Network Ethernet PacketRadio Point-to-Point
Internet 协议栈 • 应用层:支持网络应用 • ftp,smtp,http • 传输层:主机对主机的数据传输 • Tcp,udp • 网络层:数据报的从源到目的的路由 • IP,路由协议 • 链路层: • 物理层:
E.g.: transport take data from app add addressing, reliability check info to form “datagram” send datagram to peer wait for peer to ack receipt analogy: post office network link physical application transport network link physical application transport network link physical application transport network link physical application transport network link physical data data data ack Layering: logicalcommunication transport transport
network link physical application transport network link physical application transport network link physical application transport network link physical application transport network link physical data data Layering: physical communication
M M H H H H H H H H H H H H t t t t l n l t n n t n M M M M application transport network link physical application transport network link physical M M Protocollayering and data Each layer takes data from above • adds header information to create new data unit (“encapsulation”) • passes new data unit to layer below source destination message segment datagram frame
Design Perspectives • Network users: services that their applications need, e.g., guarantee that each message it sends will be delivered without error within a certain amount of time • Network designers:cost-effective design e.g., that network resources are efficiently utilized and fairly allocated to different users • Network providers: system that is easy to administer and manage e.g., that faults can be easily isolated and it is easy to account for usage
接入技术 • 住宅接入 • HFC (hybrid fiber coaxial cable) • DSL • 公司接入 • LAN • 无线接入 • WiFi 802.11
WiFi • WiFi(802.11) • 高带宽 • 大的无线传播范围 (100-200m) • 802.11b(11Mbps), 802.11g(54Mbps) • 笔记本与PDA连接Internet • 蓝牙
HTTP • 1990-1993: The idea of a web “browser” is contemplated – poor interfaces hinder browser use • 1993 Marc Andreessen posts Mosaic on an ftp site. Support: • Hyperlinks (超级连接) • Embedded images (嵌入式图像) • Dcember 1993:Mosaic growth makes the front page of New York Times • 1994 Marc Andressen leave college to form Mosaic Corp. (now Netscape 网景公司)
Socket • An abstraction for a network connection introduced in the mid-1970 in Unix systems • A program (typically C) would “open” a socket and either • Read: listen for incoming data • Write: send a message to another machine • Basis for RPC: Remote Procedure Calls
The Socket Abstraction • A Client/Server Mode • Client plugs into a server port • Connection creates a bi-director
More on Sockets • Available on all modern operating systems • Associated with a protocol • TCP • UDP • Java provides a Socket API