38
tele Distributed Systems - Fall 2001 II - 31 © Stefan Leue 2001 Computer Networks Computer Networks "interconnected collection of autonomous computers" [Tanenbaum 1996] Types of Networks 8 Local Area Networks (LANs) high-speed communication on proprietary grounds (on-campus) most typical solution: Ethernet with 100 Mbps 8 Metropolitan Area Networks high-speed communication for nodes distributed over medium-range distances, usually belonging to one organization providing "back-bone" to interconnect LAN's technology often based on ATM, FDDI or DSL typical example: the University-network: iATM based i155 Mbit/s iTransports data and voice (telephony)

Computer Networks - The tele Research Grouptele.informatik.uni-freiburg.de/lehre/ws01/dsys/Lectures/Lecture5.pdf · Computer Networks ♦Protocols Agreement between two communicating

Embed Size (px)

Citation preview

teleDistributed Systems - Fall 2001 II - 31 © Stefan Leue 2001

Computer Networks

♦ Computer Networks"interconnected collection of autonomous computers" [Tanenbaum 1996]

♦ Types of Networks� Local Area Networks (LANs)

– high-speed communication on proprietary grounds (on-campus)– most typical solution: Ethernet with 100 Mbps

� Metropolitan Area Networks

– high-speed communication for nodes distributed over medium-range distances, usually belonging to one organization

– providing "back-bone" to interconnect LAN's – technology often based on ATM, FDDI or DSL

– typical example: the University-network:

�ATM based�155 Mbit/s

�Transports data and voice (telephony)

teleDistributed Systems - Fall 2001 II - 32 © Stefan Leue 2001

Computer Networks

♦ Types of Networks� Wide Area Networks

– communication over long distances– covers computers of different organizations– high degree of heterogeneity of underlying computing infrastructure– involves routers– speeds up to a few Mbps possible, but around 50-100 Kbps more typical– most prominent example: the Internet

� Wireless Networks– end user equipment accesses network through short or mid range radio-

or infrared signal transmission– Wireless WANs

�GSM (up to about 20 Kbps)�UMTS (up to Mbps)�PCS

– Wireless LANs/MANs�WaveLAN (2-11 Mbps, radio up to 150 metres)

– Wireless Personal Area Networks�bluetooth (up to 2 Mbps on low power radio signal, < 10 m distance)

teleDistributed Systems - Fall 2001 II - 33 © Stefan Leue 2001

Computer Networks

♦ Network Type Performance Characteristics

© Pearson Education 2001

teleDistributed Systems - Fall 2001 II - 34 © Stefan Leue 2001

Computer Networks

♦ Network topologies for point-to-point networking

Star• short paths (always 2 hops)• robust against leaf node failure

• but: whole network down if central node fails

• sometimes physical star used to implement logical ring

Ring• varying path lengths• robust against node failure

• basis for Token Ring and FDDI LANs

Tree• varying, relatively long path lengths• robust against leaf node failure

• sensitive to internal node failure

• suitable topology for multicast / broadcast applications

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 35 © Stefan Leue 2001

Computer Networks

♦ Network topologies for point-to-point networking

Mesh• completely connected graph • short paths (always 1 hop)• robust against node failure• expensive point-to-point wireline implementaion• inexpensive shared ether implementation

Intersecting Rings• internetworking for token ring networks• sensitive to bridge node failure

Irregular• most commonly found Wide Area Network topology

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 36 © Stefan Leue 2001

Computer Networks

♦ Protocols� Agreement between two communicating parties how the communication is to

proceed– syntax

�message formats�data representation

– semantics: �when to send which message�appropriate responses�how to detect and handle failures

♦ Services� provide functions to invoker of service� use other services while providing abstraction from the particulars of the used

services

teleDistributed Systems - Fall 2001 II - 37 © Stefan Leue 2001

Computer Networks

♦ Layered protocol architectures

layer n

layer n+1

n-service

n-service

layer n-1

layer n

layer n+1

n-service

n-service

layer n-1

n+1 - protocol

n - protocol

n-1 - protocol

teleDistributed Systems - Fall 2001 II - 38 © Stefan Leue 2001

Computer Networks

♦ Layered protocol architectures

layer n

layer n+1

n-service

n-service

layer n-1

layer n

layer n+1

n-service

n-service

layer n-1

n+1 - protocol

n - protocol

n-1 - protocol

file transfer (ftp)

tcp

ip

teleDistributed Systems - Fall 2001 II - 39 © Stefan Leue 2001

Computer Networks♦ Message formats

� header: sequence numbers, synchronization patterns, message types, etc.� data: user data� trailer: end sequence, error check sum

♦ Encapsulation

header data trailer

n+1-data

n+1-datan-header n-trailer

n+1 datan-header n-trailern-int. contr. inf

n-data

layer n

SAP

teleDistributed Systems - Fall 2001 II - 40 © Stefan Leue 2001

Network Architectures

♦ A generic protocol architecture: the ISO Open Systems Interconnection Basic Reference Model (OSI-BRM)

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 41 © Stefan Leue 2001

Network Architectures

♦ A generic protocol architecture: the ISO Open Systems Interconnection Basic Reference Model (OSI-BRM)

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 42 © Stefan Leue 2001

Network Architectures

♦ Protocol suite/stack� stacked combination of protocol implementation collaborating to provide

application services� there are no efficient implementations of protocol stacks conforming with

OSI-BRM

♦ Most actual protocol implementations follow the Internet Reference Model, forming the Internet Protocol Suite / Stack

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Transport

Internet

Host-to-network

OSI Internet RM

SMTP (simple mail transfer protocol)FTP (file transfer)

telnet (remote login)http (hypertext transfer protocol)

XDR (external data representation)

Internet Protocol Examples

Transmission Control Protocol (TCPUser Datagram Protocol (UDP)

Internet Protocol

teleDistributed Systems - Fall 2001 II - 43 © Stefan Leue 2001

OSI-BRM

♦ Application Layer� Provide services that support the various types of distributed applications� OSI protocols

– electronic mail (X.400, almost entirely extinct these days)– name/directory services (X.500, some residual interest and some

implementations)� Internet protocols

– SMTP (simple mail tranfer protocol)– FTP (file transfer)– telnet (remote login)– http (hypertext transfer protocol)

Application Application

ComputerApplication

ComputerApplication

teleDistributed Systems - Fall 2001 II - 44 © Stefan Leue 2001

OSI-BRM

♦ Presentation Layer� Problem: different computers represent data in different formats� Example: represenation of unsigned short integer 1 in 2 bytes

– “big-endian” (e.g., Motorola 680x0) 0000000000000001– “little-endian” (e.g., Intel 80x86) 1000000000000000

� In the Internet: XDR (external data representation), fixed conventions for the representation of data

– all integers 4-byte big-endians– floating point numbers in IEEE format– texts in ASCII– all fields aligned on 4-byte word boundaries

� Problem: may require two conversions� XDR-to-C compiler exists

Presentation Presentation

Application Application

ComputerApplication

ComputerApplication

teleDistributed Systems - Fall 2001 II - 45 © Stefan Leue 2001

OSI-BRM

♦ Session Layer� Support session oriented traffic (classical database applications, file transfer,

etc.)� Two main functions

– send token management– synchronization/resynchronization after failures

� Non-existent in Internet RM– functions are the responsibility of the application or the application layer

protocols– example: resynchronization in ftp after failure

�maintain pointer to last transmitted byte in source file

Presentation Presentation

Application Application

ComputerApplication

ComputerApplication

Session Session

teleDistributed Systems - Fall 2001 II - 46 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide services for application message exchanges between peer

application entities� Interface with the underlying network

– if application messages are too big for network layer, segment them and reassemble at the receiving end

– multiple network connections for one application connection (if higher bandwitdth needed than what one network connection can deliver)

– multiplex multiple application connections via one network connection, if possible, to efficiently use network bandwidth

Presentation Presentation

Application Application

ComputerApplication

ComputerApplication

Session Session

Transport Transport

teleDistributed Systems - Fall 2001 II - 47 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection across network with well-defined qualities (QoS, quality of

service)– connection establishment delay– connection establishment failure probability– throughput– transit delay– residual error ratio– protection– priority

Presentation Presentation

Application Application

ComputerApplication

ComputerApplication

Session Session

Transport Transport

teleDistributed Systems - Fall 2001 II - 48 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection-oriented as well as connection-less services

– connection-oriented:1. establish connection on a well-defined source service access point

(or port) p and destination service access point p’

2. send messages to ports without providing target address

Transport Transport

teleDistributed Systems - Fall 2001 II - 49 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection-oriented as well as connection-less services

– connection-oriented:1. establish connection on a well-defined source service access point

(or port) p and destination service access point p’

2. send messages to ports without providing target address

Transport Transport

con(hostB) acc(hostB, q) con(hostB, q)acc(hostB, p)

Transport Transportp q

teleDistributed Systems - Fall 2001 II - 50 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection-oriented as well as connection-less services

– connection-oriented:1. establish connection on a well-defined source service access point

(or port) p and destination service access point p’

2. send messages to ports without providing target address

Transport Transport

con(hostB) acc(hostB, q) con(hostB, q)acc(hostB, p)

Transport Transportp q

msg msg

teleDistributed Systems - Fall 2001 II - 51 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection-oriented as well as connection-less services

– connection-less:send messages providing target address for each message sent

� connection-less vs. connection-oriented– connection-less

�no overhead for connection setup and release�potential bandwidth-loss due to complete address information�no possibility to perform error-correction (pushed into application)

– connection-oriented�overhead, but no bandwidth loss�need to reserve network resources�facilitates ensuring connection properties

* order preservation* retransmission

Transport Transport

teleDistributed Systems - Fall 2001 II - 52 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Provide connection-oriented as well as connection-less services

– connection-less:send messages providing target address for each message sent

� connection-less vs. connection-oriented– connection-less

�no overhead for connection setup and release�potential bandwidth-loss due to complete address information�no possibility to perform error-correction (pushed into application)

– connection-oriented�overhead, but no bandwidth loss�need to reserve network resources�facilitates ensuring connection properties

* order preservation* retransmission

Transport Transport

send(hostB, msg) rec(hostB, msg)

teleDistributed Systems - Fall 2001 II - 53 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Ports

– link an application process to a transport connection– permit identifying a remote application process (or service)

�note: use of process id in target node would be unsuitable since pids are generated and destroyed dynamically in most operating systems

– The internet protcocol architecture defines reserved port numbers, e.g.�FTP: 21 (ftp connection establishmen etc.)�FTP-DATA: 20 (ftp data transfer)�TELNET: 23 (terminal connection)�SMTP: 25 (mail delivery)�HTTP: 80 (http requests)

Presentation Presentation

Application Application

ComputerApplication

ComputerApplication

Session Session

Transport Transport

teleDistributed Systems - Fall 2001 II - 54 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Internet Protocols

– UDP (User Datagram Protocol)�provides unreliable, connectionless transport service

* no guarantee of order preservation, delivery* message duplications are possible* facilitates multicast

�application areas: context-free protocols, simple client-server applications, i.e., one request - one reply

* Domain Name Server lookup* SNMP requests* NFS requests* Multimedia protocols that do not require error correction

�UDP header format:

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 55 © Stefan Leue 2001

OSI-BRM♦ Transport Layer

� Internet Protocols– TCP (Transport Control Protocol)

�provides connection-oriented transport service* error-correcting* order preserving* segmentation of application-layer data stream* duplex communication

�transport connection uniquely identified through* network (IP) addresses of sender end receiver* port addresses of sender and receiver* protocol identifier for TCP (=6)

�TCP header and pseudo-header:

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 56 © Stefan Leue 2001

OSI-BRM

♦ Transport Layer� Internet Protocols

– TCP (Transport Control Protocol)�despite complexity, allows for high data rates (experimentally up to

100 Mbit/s)�useable in LAN/MAN/WAN environments�typical applications

* e-mail (SMTP)* file transfer (ftp)* remote terminal (telnet)* remote graphics terminal (X11 for X-Windows)* http

teleDistributed Systems - Fall 2001 II - 57 © Stefan Leue 2001

OSI-BRM♦ Network Layer

Transport Transport

teleDistributed Systems - Fall 2001 II - 58 © Stefan Leue 2001

OSI-BRM♦ Network Layer

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 59 © Stefan Leue 2001

OSI-BRM♦ Network Layer

� Central questions:– adressing: how to identify the target computer– routing: how to route the message most effectively through the network– packet switching: will there be a new path for every packet, or will there

be predescribed paths from source to destination – connection setup and release– end-to-end error detection, ensuring packet ordering, flow-control

� General functionality: network transparency for the transport layer– provide for end-to-end transport connection independent of actual routing

and switching decisions

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 60 © Stefan Leue 2001

OSI-BRM♦ Network Layer

� Packet switching– virtual circuit: a fixed path for all packets of a connection will be

determined at connection setup time�facilitates order preservation�route determination costs only once per connection�inflexible to adapt to changing network loads and configurations

– datagram: routing decision for every packet in every node�full address information in every packet�less overhead for connection establishment, easier to implement�more flexible for short-lived connections

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 61 © Stefan Leue 2001

OSI-BRM♦ Network Layer

� Routing algorithms– objectives

�minimize average packet delay�maximize total throughput�efficient implementation

– conflicting, therefore often used: minimize number of hops (visited nodes) per packet�reduces delay�reduces needed bandwidth�increases throughput

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 62 © Stefan Leue 2001

OSI-BRM♦ Network Layer

� Routing algorithms– static (non-adaptive) algorithms

�determination of network routes for every pair of nodes at network setup time

�no consideration of current network status and load (average values used)

�no change of routes during network operation

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 63 © Stefan Leue 2001

OSI-BRM♦ Network Layer

� Routing algorithms– dynamic (adaptive) algorithms

�determination of network routes based on measurement/estimation of current network load and configuration

* centralized: one central node makes routing decisions* isolated: decision on routing based solely on local traffic and

load information (backward learning, routing, delta-routing)* distributed: nodes are exchanging routing information (distance

vector routing, RIP)

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 64 © Stefan Leue 2001

♦ Data Link Layer

♦ Main functions– error detection and correction

�physical media are prone to signal distortions due to external impulses and material properties

�typical value for error probability of a 32 bit block over telephone wire: 0.0016

�error detection: using check sum (e.g., parity bits)* to detect e bit errors one needs code with Hamming distance of

e+1�error correction: check sum plus exact information, which bit flipped

* to correct e bit errors, need 2e+1 Hamming distance �often used: check sum generated through cyclic reduncancy check

* detects all error burst with a length of up to 16, 99.998 of alllonger bursts

* based on polynom division

OSI-BRM

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 65 © Stefan Leue 2001

♦ Data Link Layer

♦ Main functions– frames: error-detecting and error-correcting codes need frame delimiters

�bit stuffing– acknowledgement and retransmission of erroneous frames

�sequence numbers �go-back-n

– flow control: nodes may receive more traffic than they can deliver to adjacent nodes, but have limited buffer capacity: buffer overflow�sliding window protocol (of size n)

* sending node may race ahead a number of n unacknowledged messages

* if last acknowledged packet is k, and new acknowledgement l>k arrives, then sender may transmit up to sequence number k+n

�includes acknowledgement/retransmission functionality

OSI-BRM

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 66 © Stefan Leue 2001

♦ Data Link Layer

♦ Example� for WANs

– HDLC: High Level Data Link Control (ISO-standardized)�LAP-B: Link Access Procedure - Balanced (CCITT/ITU-T, for X.25)

� for LANs– LLC 2: Logical Link Control Typ 2

OSI-BRM

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

teleDistributed Systems - Fall 2001 II - 67 © Stefan Leue 2001

♦ Physical Layer

♦ Features� defines the physical characteristics of the signal transmissions� example: bit encoding mechanisms

OSI-BRM

Transport Transport

Physical

Network

Data Link

Physical

Network

Data Link

© Prentice-Hall 1996

teleDistributed Systems - Fall 2001 II - 68 © Stefan Leue 2001

Internet Protocol Architecture

♦ Comparison OSI-BRM vs. Internet� presentation and session layers not implemented in Internet architecture, will

be implemented in application (e.g., XDR encoding)� IP provides less functionality than network layer in OSI-BRM� L2 and L1 not specified in Internet architecture

L7 Application

L6 Presentation

L5 Session

L4 Transport

L3 Network

L2 Data Link Control

L1 Physical

smtpftp

telnethttp

TCP

IPLAN

(M)WANproprietary netwoks

OSI-BRM Internet