Introduction to Computer Networks Chapter 1 Foundation University

  • Slides: 38
Download presentation
Introduction to Computer Networks Chapter 1: Foundation University of Ilam By: Dr. Mozafar Bag-Mohammadi

Introduction to Computer Networks Chapter 1: Foundation University of Ilam By: Dr. Mozafar Bag-Mohammadi 1

Outline n Introduction n Statistical Multiplexing n Inter-Process Communication n Network Architecture n Performance

Outline n Introduction n Statistical Multiplexing n Inter-Process Communication n Network Architecture n Performance Metrics 2

Introduction n Building a network to support diverse ranges of applications q q n

Introduction n Building a network to support diverse ranges of applications q q n Distributed computing. Multimedia. Telecommunication. E-commerce, etc. What kind of technology do we need? q q Hardware. Software. 3

First Step n What is computer Network? q q n Different views. Differences from

First Step n What is computer Network? q q n Different views. Differences from other networks, Its generality. What is requirements? Different perspective: q q q Network provider Network designer Application programmer 4

Design goals n n n Connectivity Scalability Simplicity q q n Efficiency q q

Design goals n n n Connectivity Scalability Simplicity q q n Efficiency q q n For designers. Most importantly for users. cost performance Support for common user services. 5

Building Blocks n Nodes: PC, special-purpose hardware… q q n hosts switches, routers and

Building Blocks n Nodes: PC, special-purpose hardware… q q n hosts switches, routers and gateways Links: coaxial cable, optical fiber… q point-to-point q multiple access … 6

Switched Networks A network can be defined recursively as. . . q two or

Switched Networks A network can be defined recursively as. . . q two or more nodes connected by a link, or q two or more networks connected by two or more nodes 7

Strategies n Circuit switching: carry bit streams q q q n Packet switching: store-and-forward

Strategies n Circuit switching: carry bit streams q q q n Packet switching: store-and-forward messages q q n Connection oriented. Original telephone network Dedicated resource. Connectionless (IP) or connection oriented (ATM) Shared resource. Packet switching is the focus of computer Networks. 8

Addressing and Routing n Address: byte-string that identifies a node q n n usually

Addressing and Routing n Address: byte-string that identifies a node q n n usually unique Routing: process of forwarding messages to the destination node based on its destination address Types of addresses q q q unicast: node-specific broadcast: all nodes on the network multicast: some subset of nodes on the network 9

Multiplexing (resource sharing) n n Time-Division Multiplexing (TDM) Frequency-Division Multiplexing (FDM) L 1 R

Multiplexing (resource sharing) n n Time-Division Multiplexing (TDM) Frequency-Division Multiplexing (FDM) L 1 R 1 L 2 R 2 L 3 Switch 1 Switch 2 R 3 10

Statistical Multiplexing n n n On-demand time-division Schedule link on a per-packet basis Packets

Statistical Multiplexing n n n On-demand time-division Schedule link on a per-packet basis Packets from different sources interleaved on link q q n n scheduling fairness, quality of service Buffer packets that are contending for the link Buffer (queue) overflow is called congestion … 11

Packet Switching n A node in a packet switching network incoming links Node outgoing

Packet Switching n A node in a packet switching network incoming links Node outgoing links Memory 12

Inter-Process Communication n n Turn host-to-host connectivity into process-to-process communication regardless where the process

Inter-Process Communication n n Turn host-to-host connectivity into process-to-process communication regardless where the process are. Give a unified view and fill gaps between what applications expect and what the underlying technology provides. Host Application Channel Application Host 13

IPC Abstractions Request/Reply (Client-server) n Guarantee delivering data, and might protect privacy and integrity.

IPC Abstractions Request/Reply (Client-server) n Guarantee delivering data, and might protect privacy and integrity. distributed file systems (NFS) digital libraries (web) File Transfer (FTP) q q Stream-Based- sequence or stream of bits. n Video on demand: q n n n Video Conferencing- q n q sequence of frames. Delay constrained, but can be fetched before hand. For example, a 1/4 NTSC with 352 x 240 pixels and 24 bit color. (352 x 240 x 24)/8=247. 5 KB Assuming 30 frame per second => 7500 KBps = 60 Mbps tightly delay bounded. VIC From Berkeley. Both application can tolerate packet loss. 14

Reliability in the network? What Goes Wrong in the Network? n Bit-level errors (electrical

Reliability in the network? What Goes Wrong in the Network? n Bit-level errors (electrical interference), a bit is corrupted or a burst error. n Packet-level errors (congestion) q q n Messages are delayed Messages are deliver out-of-order Packet loss Third parties eavesdrop Link and node failures 15

Performance Metrics n Bandwidth (throughput) q q q data transmitted per time unit link

Performance Metrics n Bandwidth (throughput) q q q data transmitted per time unit link versus end-to-end notation n KB = 210 bytes Mbps = 106 bits per second Latency (delay) q q q time to send message from point A to point B one-way versus round-trip time (RTT) components Latency = Propagation + Transmit + Queue Propagation = Distance / c (light speed) Transmit = Size / Bandwidth 16

Bandwidth versus Latency n Relative importance q q n Latency bounded- sending 1 -byte

Bandwidth versus Latency n Relative importance q q n Latency bounded- sending 1 -byte by client, 1 ms vs 100 ms dominates sending a message on a 1 Mbps or 100 Mbps link Bandwidth Bounded- sending 25 MB image: 1 Mbps vs 100 Mbps dominates 1 ms vs 100 ms delayed channel. Infinite bandwidth q RTT dominates Throughput = Transfer. Size / Transfer. Time = RTT + 1/Bandwidth x Transfer. Size q 1 -MB file to 1 -Gbps link the same as 1 -KB packet to 1 Mbps link. 17

Delay x Bandwidth Product n n Amount of data “in flight” or “in the

Delay x Bandwidth Product n n Amount of data “in flight” or “in the pipe” Example: 100 ms x 45 Mbps = 560 KB We are usually more interested in 2 times of this value Since it take RTT to hear from receiver. 18

Layering n n n Use abstractions to hide complexity and decompose to manageable components.

Layering n n n Use abstractions to hide complexity and decompose to manageable components. Abstraction naturally lead to layering Alternative abstractions at each layer Application programs Request/reply Message stream channel Host-to-host connectivity Hardware 19

Layering n Advantages q q q n Modularity – protocols easier to manage and

Layering n Advantages q q q n Modularity – protocols easier to manage and maintain Abstract functionality –lower layers can be changed without affecting the upper layers Reuse – upper layers can reuse the functionality provided by lower layers Disadvantages q Information hiding – inefficient implementations 20

Protocols n n Building blocks of a network architecture, or layer abstraction. Each protocol

Protocols n n Building blocks of a network architecture, or layer abstraction. Each protocol object has two different interfaces q q n service interface: operations on this protocol peer-to-peer interface: messages exchanged with peer Term “protocol” is overloaded q q specification of peer-to-peer interface module that implements this interface 21

Interfaces Host 2 Host 1 High-level object Protocol Service interface Peer-to-peer interface High-level object

Interfaces Host 2 Host 1 High-level object Protocol Service interface Peer-to-peer interface High-level object Protocol 22

Protocol Machinery n Protocol Graph q Nodes are protocols and edge are depends on.

Protocol Machinery n Protocol Graph q Nodes are protocols and edge are depends on. q most peer-to-peer communication is indirect q peer-to-peer is direct only at hardware level Host 2 Host 1 File application Digital Video library application MSP RRP HHP 23

Protocol Machinery (cont) n n Multiplexing and Demultiplexing (demux key) Encapsulation (header/body) Application program

Protocol Machinery (cont) n n Multiplexing and Demultiplexing (demux key) Encapsulation (header/body) Application program Host 2 Host 1 Application program Data RRP RRP Data HHP HHP RRP Data 24

ISO OSI Reference Model n n n ISO – International Standard Organization OSI –

ISO OSI Reference Model n n n ISO – International Standard Organization OSI – Open System Interconnection Started to 1978; first standard 1979 q n ARPANET started in 1969; TCP/IP protocols ready by 1974 Goal: a general open standard q allow vendors to enter the market by using their own implementation and protocols 25

ISO Architecture End host Telnet, FTP, TFTP MSB, integer Manage TCP streams Message, P

ISO Architecture End host Telnet, FTP, TFTP MSB, integer Manage TCP streams Message, P 2 P(process) Packet, routing Frame, CRC Raw bit pipe End host Application Presentation Session Transport Network Data link Physical One or more nodes within the network • The last 3 protocols are implemented in all elements in the Network. 26

Encapsulation n n A layer can use only the service provided by the layer

Encapsulation n n A layer can use only the service provided by the layer immediate below it Each layer may change and add a header to data packet data data data data 27

OSI Model Concepts n n n Service – says what a layer does Interface

OSI Model Concepts n n n Service – says what a layer does Interface – says how to access the service Protocol – says how is the service implemented q a set of rules and formats that govern the communication between two peers 28

Physical Layer (1) n n Service: move the information between two systems connected by

Physical Layer (1) n n Service: move the information between two systems connected by a physical link Interface: specifies how to send a bit Protocols: coding scheme used to represent a bit, voltage levels, duration of a bit Examples: coaxial cable, optical fiber links; transmitters, receivers 29

Datalink Layer (2) n Service: q q q framing, i. e. , attach frame

Datalink Layer (2) n Service: q q q framing, i. e. , attach frame separators send data frames between peers others: n n n arbitrate the access to common physical media ensure reliable transmission provide flow control Interface: send a data unit (packet) to a machine connected to the same physical media Protocols: physical layer addresses, implement Medium Access Control (MAC) (e. g. , CSMA/CD)… 30

Network Layer (3) n Service: q q q deliver a packet to specified destination

Network Layer (3) n Service: q q q deliver a packet to specified destination perform segmentation/reassemble others: n n packet scheduling buffer management Interface: send a packet to a specified destination Protocols: define global unique addresses; construct routing tables 31

Transport Layer (4) n Services: q q q n n n provide an error-free

Transport Layer (4) n Services: q q q n n n provide an error-free and flow-controlled end-to-end connection multiplex multiple transport connections to one network connection split one transport connection in multiple network connections Interface: send a packet to specified destination Protocols: implement reliability and flow control Examples: TCP and UDP 32

Session Layer (5) n Service: q q q n n full-duplex access management, e.

Session Layer (5) n Service: q q q n n full-duplex access management, e. g. , token control synchronization, e. g. , provide check points for long transfers Interface: depends on service Protocols: token management; insert checkpoints, 33

Presentation Layer (6) n n n Service: convert data between various representations Interface: depends

Presentation Layer (6) n n n Service: convert data between various representations Interface: depends on service Protocol: define data formats, and rules to convert from one format to another 34

Application Layer (7) n Service: any service provided to the end user Interface: depends

Application Layer (7) n Service: any service provided to the end user Interface: depends on the application Protocol: depends on the application n Examples: FTP, Telnet, WWW browser n n 35

Internet Architecture n n Defined by Internet Engineering Task Force (IETF). Developed in mid

Internet Architecture n n Defined by Internet Engineering Task Force (IETF). Developed in mid 60 s in the ARPANET project. No assumption about the network tech. FTP HTTP NV TFTP UDP TCP IP NET 1 NET 2 … NET n 36

Internet Architecture n n n Hourglass Design, IP is the focal point. Delivery is

Internet Architecture n n n Hourglass Design, IP is the focal point. Delivery is separated from end-to-end process channel. No restrict layering Application vs Application Protocol (FTP, HTTP) Application TCP UDP IP Network 37

OSI vs. TCP/IP n n OSI: conceptually define services, interfaces, protocols Internet: provide a

OSI vs. TCP/IP n n OSI: conceptually define services, interfaces, protocols Internet: provide a successful implementation Application Presentation Session Transport Network Datalink Physical OSI Application Transport Internet Host-tonetwork Telnet FTP TCP DNS UDP IP LAN Packet radio TCP 38