Вы находитесь на странице: 1из 35

Module 2 Overview of Computer Networks

Networks and Communication


Give me names of all employees Who earn more than $100,000
intranet   ISP  

backbone

satellite link desktop computer: server: network link:

CS454/654

2-2

Issues
Q

How do the request and response get transmitted between the requestor and the server?
O O

Protocols to facilitate communication Moving the request and reply messages through the network

What are the modes of communication between the requestor and the responder?
O O

Connectionless service Connection-oriented service

CS454/654

2-3

What is a protocol?
Q

A protocol defines the format and the order of messages sent and received among network entities, and the actions taken on message transmission and receipt Human protocols:
O O O

Whats the time? I have a question introductions machines rather than humans all communication activity in Internet governed by protocols

Network protocols:
O O

CS454/654

2-4

Whats a protocol?
Human protocol Computer protocol

Hi Hi
Got the time?

TCP connection req. TCP connection reply.


Get http://www.cs.uwaterloo.ca/

2:00 time

<index.html>

CS454/654

2-5

Layered Protocols
Q

Divide functionality to different layers and let each layer provide one function. ISO OSI Layered network architecture
O O O

Function layers Interfaces Protocols at each layer

CS454/654

From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms Prentice-Hall, Inc. 2002

2-6

Message Format

CS454/654

From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms Prentice-Hall, Inc. 2002

2-7

Message Transmission (Assume only 3 layers)

CS454/654

2-8

OSI Protocol Summary


Layer Application Presentation Session Transport Network Data link Description Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required. At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes, Protocols in this layer may be connection-oriented or connectionless. Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required. Responsible for transmission of packets between nodes that are directly connected by a physical link. In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. The circuits and hardware that drive the network. It transmits sequences of binary data by analogue signalling, using amplitude or frequency modulation of electrical signals (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). Examples HTTP,FTP , SMTP, CORBA IIOP Secure Sockets (SSL),CORBA Data Rep.

TCP, UDP IP, ATM virtual circuits Ethernet MAC, ATM cell transfer, PPP Ethernet base- band signalling, ISDN

Physical

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-9

Internet Protocols
Application (7) Presentation (6) Session (5) Transport (4) Network (3) Data Link (2) Physical (1) HTML, CGI, Java, FTP Telnet NFS SMTP HTTP HTTP

TCP IP

UDP

X.25

Ethernet RNIS

ATM

FDDI

CS454/654

2-10

TCP/IP Layers
Message Layers Application Messages (UDP) or Streams (TCP) Transport UDP or TCP packets Internet IP datagrams Network interface Network-specific frames Underlying network

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-11

Internet Protocol Stack


Q

application: supporting network applications


O

ftp, smtp, http tcp, udp

application transport network link physical

message segment datagram frame

transport: host-host data transfer


O

network: routing of datagrams from source to destination


O

ip, routing protocols

link: data transfer between neighboring network elements


O

ppp, ethernet

physical: bits on the wire


2-12

CS454/654

Applications and ApplicationLayer Protocols


Q

Application: communicating, distributed processes


O O O

application transport network data link physical

running in network hosts in user space exchange messages to implement app e.g., email, file transfer, the Web one piece of an app define messages exchanged by apps and actions taken use services provided by lower layer protocols

Application-layer protocols
O O O
application transport network data link physical application transport network data link physical

router server

workstation mobile

CS454/654

2-13

Application-Layer Protocols (cont).


Q

API: application programming interface


O O

Defines interface between application and transport layer socket: Internet API

two processes communicate by sending data into socket, reading data out of socket

What transport services does an application need?


O

Data loss

some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer some apps (e.g., multimedia) require a minimum amount of bandwidth to be effective other apps (elastic apps) make use of whatever bandwidth they get some apps (e.g., Internet telephony, interactive games) require low delay to be effective
2-14

Bandwidth

Timing

CS454/654

Transport Service Requirements of Common Applications


Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games financial apps Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss Bandwidth elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic Time Sensitive no no no yes, 100s msec yes, few secs yes, 100s msec yes and no

CS454/654

2-15

Internet Transport Protocol Services


TCP service:
Q

UDP service:
Q

connection-oriented: setup required between client, server reliable transport between sending and receiving process flow control: sender wont overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees

unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee

CS454/654

2-16

Internet Apps: Their Protocols and Transport Protocols


Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NFS proprietary (e.g., Vocaltec) Underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP

CS454/654

2-17

TCP Message Encapsulation over an Ethernet


Application message TCP header IP header TCP Ethernet header IP Ethernet frame
port

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-18

The programmer's conceptual view of a TCP/IP Internet


Application TCP IP Application UDP

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-19

Internet Address Structure


7 Class A: 0 Network ID 14 Class B: 1 0 Network ID 21 Class C: 1 1 0 Network ID 28 Class D (multicast): 1 1 1 0 Multicast address 27 Class E (reserved): 1 1 1 1 0 unused 24 Host ID 16 Host ID 8 Host ID

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-20

Decimal Representation of Internet Addresses


octet 1 Network ID Class A: 1 to 127 0 to 255 octet 2 octet 3 Host ID 0 to 255 Host ID 0 to 255 0 to 255 Host ID 1 to 254 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 240.0.0.0 to 255.255.255.255 0 to 255 1.0.0.0 to 127.255.255.255 Range of addresses

Network ID Class B: 128 to 191 0 to 255 Network ID 0 to 255

Class C:

192 to 223

0 to 255

Multicast address Class D (multicast): Class E (reserved): 224 to 239 240 to 255 0 to 255 0 to 255 0 to 255 0 to 255 1 to 254 1 to 254

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-21

IP Packet Layout

header IP address of source IP address of destination up to 64 kilobytes data

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-22

How to Transfer Data Through the Network


Q

Network is a mesh of interconnected routers Two ways of setting up a connection between two computers O circuit switching: dedicated circuit per call: telephone net O packet-switching: data sent thru net in discrete chunks
2-23

CS454/654

Circuit Switching
End-end resources reserved for call
Q

link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required

CS454/654

2-24

Circuit Switching
Q

Network resources (e.g., bandwidth) divided into pieces


O O

pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into pieces

frequency division time division

CS454/654

2-25

Packet Switching
Q

each end-end data stream divided into packets


O O O

user A, B packets share network resources each packet uses full link bandwidth resources used as needed aggregate resource demand can exceed amount available congestion: packets queue, wait for link use transmit over link wait turn at next link

resource contention:
O O

store and forward: packets move one hop at a time


O O

CS454/654

2-26

Packet Switching
A B
10 Mbs Ethernet statistical multiplexing 1.5 Mbs
queue of packets waiting for output link

45 Mbs

CS454/654

2-27

Message Switching
Q Q Q

Message switching = Packet-switching without segmentation Packet switching: Store and Forward Message remains intact as it traverses the network

Message Message Message Message

0 5 10 15 Time (sec.)

CS454/654

2-28

Packet switching vs Circuit Switching


Q

Packet switching allows more users to use network! 1 Mbit link; each user:
O O

100Kbps when active active 10% of time

N users
Q

circuit-switching:
O

1 Mbps link

10 users 35 users, probability > 10 active less than .004


2-29

packet switching:
O

CS454/654

Packet Switching vs Circuit Switching (2)


Q

Packet switching is great for bursty data O resource sharing O no call setup It incurs excessive congestion: packet delay and loss O protocols needed for reliable data transfer, congestion control How to provide circuit-like behavior? O bandwidth guarantees needed for audio/video apps O still an unsolved problem, but solutions such as ATM have been developed

CS454/654

2-30

Delays in Packet Switching


Q Q

Packets experience delay on end-toend path Sources of delay at each hop:


O

Nodal processing
check bit errors determine output link

Queuing

A B

transmission propagation

time waiting at output link for transmission; depends on congestion level of router

Transmission delay
R=link bandwidth (bps), L=packet length (bits) time to send bits into link = L/R

nodal processing queueing

Propagation delay
d = length of physical link, s = propagation speed in medium (~2x108 m/sec) propagation delay = d/s

CS454/654

2-31

Routing
Q Q Q

Goal: move packets among routers from source to destination It is an issue in packet switched networks datagram network:
O O O

destination address determines next hop routes may change during session analogy: driving, asking directions 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

virtual circuit network:


O O O

CS454/654

2-32

Routing in a Wide Area Network

A Hosts or local networks 3 D

1 Links 4

B 2 C 5

E Routers

CS454/654

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

2-33

Routing Tables
Routings from A To Link Cost local 0 A 1 B 1 C 1 2 3 1 D E 1 2 Routings from B To Link Cost 1 A 1 B local 0 2 1 C 2 D 1 1 4 E Routings from C To Link Cost 2 2 A B 2 1 C local 0 2 D 5 E 5 1

Routings from D To Link Cost A 3 1 B 3 2 C 6 2 D local 0 E 6 1


CS454/654

Routings from E To Link Cost A 4 2 B 4 1 C 5 1 D 6 1 E local 0


2-34

From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. Addison-Wesley Publishers 2000

Network Taxonomy
telecommunication networks

Circuit-switched networks

Packet-switched networks

FDM

TDM

Networks with VCs

Datagram Networks connection-oriented & connectionless


2-35

connectionoriented
CS454/654

Вам также может понравиться