Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computer Networks Foundation All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system,

Similar presentations


Presentation on theme: "Introduction to Computer Networks Foundation All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system,"— Presentation transcript:

1 Introduction to Computer Networks Foundation All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of Professor Nen-Fu Huang (E-mail: nfhuang@cs.nthu.edu.tw).

2 Foundation - 2 Outline n Applications n Network Connectivity n Network Architecture n Network Performance

3 Foundation - 3 Applications n Most people know about the Internet (a computer network) through applications l World Wide Web l On line games l Email (Gmail, hotmail,…) l Online Social Network (Facebook, twitter,…) l Streaming Audio Video (Youtube, ppstream, kkbox, …) l File Sharing (dropbox, …) l Instant Messaging (Skype, IM+, MSN, Line, WeChat,…) l …

4 Foundation - 4 Example of an application A multimedia application including video-conferencing

5 Foundation - 5 Application Protocol n URL l Uniform resource locater l http://www.sharecourse.net/sharecourse/ http://www.sharecourse.net/sharecourse/ n HTTP l Hyper Text Transfer Protocol n TCP l Transmission Control Protocol n 17 messages for one URL request l 6 to find the IP (Internet Protocol) address l 3 for connection establishment of TCP l 4 for HTTP request and acknowledgement  Request: I got your request and I will send the data  Reply: Here is the data you requested; I got the data l 4 messages for tearing down TCP connection

6 Foundation - 6 Outline n Applications n Network Connectivity n Network Architecture n Network Performance

7 Foundation - 7 Network Connectivity n Important terminologies l Link l Nodes l Point-to-point l Multiple access l Switched Network  Circuit Switched  Packet Switched l Packet, message l Store-and-forward Multiple access Point-to-point

8 Foundation - 8 Network Connectivity n Terminologies (contd.) l Hosts l Switches l Spanning tree l internetwork l Router/gateway l Host-to-host connectivity l Address l Routing l Unicast/broadcast/multicast l LAN (Local Area Networks) l MAN (Metropolitan Area Networks) l WAN (Wide Area Networks) (b) Interconnection of networks (a) A switched network

9 Foundation - 9 How datagrams are delivered in an Internet ? R WAN LAN R R R R R Datagram LAN

10 Foundation - 10 Cost-Effective Resource Sharing n Resource: links and nodes n How to share a link ? l Multiplexing l De-multiplexing Multiplexing multiple logical flows over a single physical link Switch 1 Switch 2

11 Foundation - 11 Cost-Effective Resource Sharing FDM frequency time TDM frequency time 4 users Example: n FDM: Frequency Division Multiplexing n Synchronous Time-division Multiplexing (TDM)  Time slots/data transmitted in predetermined slots

12 Foundation - 12 Cost-Effective Resource Sharing n Statistical Multiplexing l Data is transmitted based on demand of each flow. l What is a flow? l Packets vs. Messages l FIFO, Round-Robin, Priorities (Quality-of-Service (QoS)) l Congested ? A switch multiplexing packets from multiple sources onto one shared link Switch 1 Switch 2

13 Foundation - 13 Logical Channels n Logical Channels l Application-to-Application communication path or a pipe Process communicating over an abstract channel Host 1 Application Host 2

14 Foundation - 14 Network Reliability n Network should hide the errors n Bits are lost l Bit errors (1 to a 0, and vice versa) l Burst errors – several consecutive errors n Packets are lost (Congestion) n Links and Node failures n Messages are delayed n Messages are delivered out-of-order n Third parties eavesdrop

15 Foundation - 15 Outline n Applications n Network Connectivity n Network Architecture n Network Performance

16 Foundation - 16 Network Architecture Example of a layered network system Application Programs Process-to-process Channels Host-to-Host Connectivity Hardware

17 Foundation - 17 Protocols n Protocol defines the interfaces between l the layers in the same system and with l the layers of peer system n Building blocks of a network architecture n Each protocol object has two different interfaces l Service interface: operations on this protocol l Peer-to-peer interface: messages exchanged with peer

18 Foundation - 18 Protocol Interfaces Service and Peer Interfaces for a protocol Service interface Protocol High-level object High-level object Peer-to-peer interface Service interface Protocol High-level object High-level object Host 1 Host 2

19 Foundation - 19 Protocols n Protocol Specification: pseudo-code, state transition diagram, message format n Interoperable: when two or more protocols that implement the specification accurately n IETF: Internet Engineering Task Force l Define Internet standard protocols

20 Foundation - 20 Protocol Architecture Example of a protocol architecture nodes are the protocols and links the “depends-on” relation IP TCP UDP FTP HTTP DNS IP TCP UDP FTP HTTP DNS Internet

21 Foundation - 21 Encapsulation High-level messages are encapsulated inside of low-level messages IP TCP Application program Application program TCP Application program Application program Data TCP Data TCP Data TCP Data IP TCP Data IP TCP Data IP Internet

22 Foundation - 22 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection Application Presentation Session Transport Network Data Link Physical Network Physical Application Presentation Session Transport Network Data Link Physical Data Link Physical Internet Router

23 Foundation - 23 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection Application Presentation Session Transport Network Data Link Physical Network Physical Data Link Physical LAN (Ethernet) Router Switch Data Link Physical Switch Physical Data Link WAN

24 Foundation - 24 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection Application Presentation Session Transport Network Data Link Physical Network Physical Data Link Physical LAN (Ethernet + WiFi) Router Switch Data Link Physical Access Point (AP) Physical Data Link WAN

25 Foundation - 25 Description of Layers n Physical Layer ( 如何將原始資料在 link 上傳輸 ) l Handles the transmission of raw bits over a communication link  Coaxial cable  Twisted pair  Optical Fiber  Air space (wireless radio channel) l Different Signal Coding schemes

26 Foundation - 26 Description of Layers n Data Link Layer ( 如何將 frame 傳給直接相連的主機或設備 ) l Collects a stream of bits into a frame l How to transmit a frame to a directly connected host (destination) ? l MAC (Media Access Control Protocol)  CSMA/CD (IEEE 802.3 Ethernet)  CSMA/CA (IEEE 802.11 Wireless LAN) l Layer 2 devices l Switches l Bridges Multiple access Point-to-point Preamble SFD DA SA Type LLC PAD FCS

27 Foundation - 27 Description of Layers n Network Layer ( 如何將封包透過 Internet 送給目的地主機 ) l How to transmit frames to a host via the Internet ? l Handles routing among nodes within a packet-switched network l Data exchanged between nodes in this layer is called a packet l IP protocol l Routers l Routing protocols  RIP  OSPF  BGP l Routing Tables The lower three layers are implemented on all network nodes

28 Foundation - 28 Description of Layers n Transport Layer ( 提供不同主機 processes 之間的資料傳送 ) l Implements a process-to-process channel l Unit of data exchanges in this layer is called a message l TCP (Transmission Control Protocol) – Reliable service l UDP (User Datagram Protocol) – Unreliable service

29 Foundation - 29 Description of Layers n Session Layer l Provides a name space that is used to tie together the potentially different transport streams that are part of a single application n Presentation Layer l Concerned about the format of data exchanged between peers n Application Layer l Standardize common type of exchanges l FTP/E-mail/DNS/HTTP/Browsers/FB, …. The transport layer and the higher layers typically run only on end- hosts and not on the intermediate switches and routers

30 Foundation - 30 Internet Architecture n Defined by IETF n Three main features l Does not imply strict layering. The application is free to bypass the defined transport layers and to directly use IP or other underlying networks Application Subnetwork IP TCP UDP

31 Foundation - 31 Internet Architecture l An hour-glass shape – wide at the top, narrow in the middle and wide at the bottom. IP serves as the focal point for the architecture Internet Architecture IP Net1 Net2 ….. Netn TCP UDP FTP HTTP DNS SNMP

32 Foundation - 32 Internet Architecture l In order for a new protocol to be officially included in the architecture, there needs to be both a protocol specification and at least one (and preferably two) representative implementations of the specification

33 Foundation - 33 Outline n Applications n Network Connectivity n Network Architecture n Network Performance

34 Foundation - 34 Network Performance n Bandwidth l Width of the frequency band l Number of bits per second that can be transmitted over a communication link n 1 Mbps: 1 x 10 6 bits/second n 1 x 10 -6 seconds to transmit each bit or imagine that a timeline, now each bit occupies 1 micro second space. n On a 2 Mbps link the width is 0.5 micro second. n Smaller the width more will be transmission per unit time.

35 Foundation - 35 Bandwidth Bits transmitted at a particular bandwidth can be regarded as having some width: (a) bits transmitted at 1Mbps (each bit 1 μs wide); (b) bits transmitted at 2Mbps (each bit 0.5 μs wide). 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

36 Foundation - 36 Network Performance n Latency = Propagation time + transmission time + queuing time n Propagation time = distance/speed of light n Transmission time = size/bandwidth n One bit transmission => propagation is important ( 短資料很快就送完, 但需要 長時間才能傳到對方, 資料已送完, 但前導資料還未到達對方 ) l Propagation time >> transmission time n Large bytes transmission => bandwidth is important ( 長資料很慢才能送完, 未 送完前, 前導資料已到對方 ) l Transmission time >> propagation time Switch 1 Switch 2

37 Foundation - 37 Delay X Bandwidth n The channel between a pair of processes can be viewed as a pipe n Latency (delay): length of the pipe n Bandwidth: width of the pipe n Delay x Bandwidth means how many data can be stored in the pipe n For example, delay of 80 ms and bandwidth of 100 Mbps  80 x 10 -3 seconds x 100 x 10 6 bits/second  8 x 10 6 bits = 8 M bits = 1 MB data. Network as a pipe

38 Foundation - 38 Delay X Bandwidth n Relative importance of bandwidth and latency depends on application l For large file transfer, bandwidth is critical l For small messages (HTTP, NFS, etc.), latency is critical l Variance in latency (jitter) can also affect some applications (e.g., audio/video conferencing)

39 Foundation - 39 Delay X Bandwidth l if the sender keeps the pipe full, delay x bandwidth is the number of bits the sender must transmit before the first bit arrives at the receiver l Takes another one-way latency to receive a response from the receiver l The sender will not fully utilize the network if the sender does not fill the pipe  send a whole delay × bandwidth product’s worth of data before it stops to wait for a signal  在停下來等對方回應之前應該要傳送 delay × bandwidth 的資料量

40 Foundation - 40 Throughput n Infinite bandwidth l RTT (Round Trip Time) dominates l Throughput = TransferSize / TransferTime l TransferTime = RTT + TransferSize/Bandwidth l Its all relative l 1-MB file to 1-Gbps link looks like a 1-KB packet to 1-Mbps link RTT TransferTime

41 Foundation - 41 Summary n A layered architecture for computer network l Physical Layer l Data Link Layer l Network Layer l Transport Layer l Session layer / Presentation Layer /Application layer n Two performance metrics used to analyze the performance of computer networks l Bandwidth l Delay


Download ppt "Introduction to Computer Networks Foundation All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system,"

Similar presentations


Ads by Google