Vous êtes sur la page 1sur 95

Chapter 1 Foundation

Dr. G. A. Marin

Network Analysis: Foundation

1-1

1970s
Business Environment: IBM's S NA
Hierarchical, orderly, reliable Hi hi l d l li bl S ysdef for Topology and Paths Connection-oriented and guaranteed service at link layer (data l ) (d t only) Low-speed (unreliable) leased lines

Research Environment: TCP/IP


Distributed, disorderly, less reliable Next hop vs fixed paths Connectionless (data only)

Phone Companies (European): X.25 S tandard


Connection-oriented S and PVC with Flow Control VC Assumes noisy lines
Network Analysis: Foundation 1-2

1980s
NS FNet Backbone to Interconnect S uper Computers
TCP/IP official protocol of Arpanet in 1983 ffi i l t l fA ti 56 kbps backbone for 6 super computer centers Thousands of researchers connect their subnets Version 2 (IBM RS 6000s and Fiber) ran at 448 kbps By 1990 1.5 Mbps ANS takes ANStakes over and upgrades to 45 Mbps (Merit MCI IBM) (Merit, MCI,

IBM Develops Advanced Peer-to-Peer Networking LAN Growth Explosive


Ethernet (collisions) Token Ring (no collisions) Novell's Netware (IPX based on XNS ( )
Network Analysis: Foundation 1-3

1990s
Internet
1990: 200,000 computers and 3,000 networks 1995: multiple backbones, 100s regional nets, 10s of thousands of LANS millions of hosts , Doubles yearly!? WWW application (CERN) brings internet to non-academics (mosaic) NREN Gigabit Network funded by ARPA & NS F

Internet S ociety Founded 1992! Commercially Cisco uses IP to grow to Billions in revenue
Network Analysis: Foundation 1-4

1990s (continued) ) 990s ( (co t ued)


MIT, U Pa, IBM, Bellcore Research in highspeed paket switching Frame Relay Forum evolve X.25 y concepts for higher speed W AN lines (1.5Mbps) ATM becomes successful in telephony backbones (multiples of 155mbps) DARPA Funding Next Generation Internet
multi-gigabit per second capabilities
Network Analysis: Foundation 1-5

Foundat on Foundation
Goals:
Lay foundation for understanding how to build a network
Required connectivity Required services Terminology Layered architecture
TCP/IP & OSI

Protocols and Applications Socket Interface Performance Metrics

Overview: Applications Concepts & Terminology Network Architecture Performance Channel Multiplexing

Network Analysis: Foundation

1-6

Appl cat ons Applications


Distributed processes communicating p mm g across network Examples: world wide web, email, FTP, streaming audio & video, chatrooms t i di id h t Use Application Layer Protocols User agent implements the application U ti l t th li ti layer protocol:
Web browser Email mail reader (e.g. outlook) Streaming audio/video media player

Network Analysis: Foundation

1-7

Client-server parad gm ent ser er paradigm


Typical network app has two p pieces: client and server Client:
initiates contact with server (speaks first) typically requests service from server, , Web: client implemented in browser; e-mail: in mail reader
application transport network data link physical

request

reply l
application transport network data l link physical

Server:
provides requested service to client e.g., Web server sends requested Web page, mail server delivers e-mail l d l l

Network Analysis: Foundation

1-8

Internet Protocol Graph

Network Analysis: Foundation

1-9

The Web: the http protocol W pp


http: hypertext transfer p yp f protocol
Webs application layer protocol client/server model client: browser that requests, receives requests receives, displays Web objects server: Web server sends objects in response to requests http1.0: RFC 1945 http1.1: htt 1 1 RFC 2068
PC running Explorer

Server running NCSA Web server Mac running Navigator

Network Analysis: Foundation

1-10

The http protocol more protocol:


http: TCP transport p p service:
client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client http messages (applicationlayer protocol messages) exchanged between browser (http client) and Web server (http server) TCP connection closed

http is stateless p
server maintains no information about p past client requests q Protocols that maintain state are complex! state past history (state) must be maintained if server/client crashes, / li t h their views of state may be inconsistent, must be reconciled
Network Analysis: Foundation

aside

1-11

http example
Suppose user enters URL
www.someSchool.edu/someDepartment/home.index 1a. http client initiates TCP
(contains text, references to 10 jpeg images)

connection to http server (process) at www.someSchool.edu. Port 80 is default for http server.

1b. http server at host

2. http client sends http request message (containing URL) into


TCP connection socket

S h l d iti www.someSchool.edu waiting for TCP connection at port 80. accepts connection, notifying client

3. http server receives request message, message forms response message containing requested

time

object (someDepartment/home.index), sends message into socket d k


Network Analysis: Foundation 1-12

http example (cont.)


4. http server closes TCP 5. http client receives response
connection. ti message containing html file, displays html. Parsing html p y g file, finds 10 referenced jpeg objects

time 6. Steps 1-5 repeated for each p p


of 10 jpeg objects

Network Analysis: Foundation

1-13

E Electronic Mail
Three major components: j p
user agents mail servers simple mail transfer p protocol: smtp
mail server user agent

outgoing message queue user mailbox

SMTP SMTP
mail server

user agent mail server user agent

User Agent a.k.a. il reader k mail d composing, editing, reading mail messages e.g., E d Eudora, Outlook, elm, O tl k l Netscape Messenger outgoing, incoming messages stored on server

SMTP
user agent

user agent

user agent

Network Analysis: Foundation

1-14

E Electronic Mail: mail servers m


Mail Servers
mailbox contains incoming messages (yet to be read) f for user message queue of outgoing (to be sent) mail messages smtp protocol between mail servers to send email messages client: sending mail server server: receiving mail server
mail server user agent user agent mail server user agent

SMTP SMTP
mail server

SMTP
user agent

user agent

user agent

Network Analysis: Foundation

1-15

E Electronic Mail: smtp [RFC 821] m p[ F ]


uses tcp to reliably transfer email msg from client to p y server, port 25 direct transfer: sending server to receiving server three phases of transfer p f f handshaking (greeting) transfer of messages closure command/response interaction commands: ASCII text response: status code and phrase

messages must be in 7-bit ASCII

Network Analysis: Foundation

1-16

Sample smtp interaction mp m p


S: C: S: C: S: C: C S: C: S: C: C: C: S: C: S: 220 hamburger.edu HELO crepes.fr 250 Hello crepes.fr, pleased to meet you MAIL FROM: <alice@crepes.fr> 250 alice@crepes.fr... Sender ok RCPT TO <b b@h b TO: <bob@hamburger.edu> d > 250 bob@hamburger.edu ... Recipient ok DATA 354 Enter mail end with "." on a line by itself mail, Do you like ketchup? How about pickles? . 250 Message accepted for delivery QUIT 221 hamburger.edu closing connection
Network Analysis: Foundation

1-17

Try smtp interaction for yourself: yourself


telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader)

Network Analysis: Foundation

1-18

smtp f nal smtp: final words


smtp uses persistent p p connections smtp requires message (header & body) to be in 7bit ASCII certain character strings not permitted in msg (e.g., CRLF.CRLF). Thus msg has to be encoded (usually into either base-64 or quoted printable) i t bl ) smtp server uses CRLF.CRLF to determine end of message d f

Comparison with http: p p


http: pull email: push both have ASCII command/response interaction, status codes , http: each object encapsulated in its own response msg r sp ns ms smtp: multiple objects sent in multipart msg

Network Analysis: Foundation

1-19

Foundation
Goals:
Lay foundation for understanding how to build a network
Required connectivity Required services Terminology Layered architecture
TCP/IP & OSI

Protocols and Applications Socket Interface Performance Metrics

Overview: Applications Concepts & Terminology Network Architecture Network Software Performance Papers p Problems

Network Analysis: Foundation

1-20

Connect v ty Connectivity
Network exists to connect computers May support a y pp strictly limited number or many If supports t growth, it is said to scale scale.

router server local ISP

workstation mobile

regional ISP

company network n t k
Network Analysis: Foundation 1-21

L nks Links and Nodes


Networks inlude nodes (routers, switches (routers switches, computers..) some of which are directly connected by links. y Links (coax cable, twisted pair, fiber) are either point-to-point or multiple access. Cooperating nodes can provide connectivity across several direct links.
Directly connected Indirectly connected
Network Analysis: Foundation

1-22

Multiple Access Links and Protocols p


Three types of links:
point-to-point (single wire, e.g. PPP, SLIP) broadcast (shared wire or medium; e.g, Ethernet, Wavelan, etc.) Wavelan etc )

switched (e.g., switched Ethernet, ATM etc)


Network Analysis: Foundation

1-23

Switched Network

Network Analysis: Foundation

1-24

A working network
RSVP/IS-C MSS-C RSVP/IS-C MSS-C

ES
8210

RSVP/IS-C MSS-C

ES

Token Ring

PSTN
LAN

ISDN
8260/8265

MSS-S ARIS/GSMP RSVP/IS VLAN DDNS-S DHCP-S

HUBS
RSVP/IS-C MSS-C MSS-S ARIS/GSMP RSVP/IS VLAN DHCP DDNS

ATM OC/12, OC/48


8260/8265

8260/8265

8260/8265

HUBS
MSS-S ARIS/GSMP RSVP/IS VLAN DHCP DDNS

Frame Relay Public Data Network X.25, X.21

HUBS
MSS-S ARIS/GSMP RSVP/IS VLAN DHCP DDNS

LAN

HUBS
MSS-S ARIS/GSMP RSVP/IS VLAN DHCP DDNS

Token Ring

ROUTER 2210/2216
ARIS RSVP/IS DDNS-S DDNS S DHCP-S Firewall IP Sec.

ROUTER 2210
ARIS RSVP/IS DDNS-S DHCP-S Firewall IP Sec.

RSVP/IS-C MSS-C RSVP/IS-C RSVP/IS C MSS-C

ATM

390
39xx, 374X OSA, MAE

SP-2

TCP Sprayer HPR/IP HPR/ATM TN3270 MSS-C --------ARIS/GSMP RSVP/IS IPSEC

BUT COMPLEXITY!
AS/400

Network Analysis: Foundation

1-25

Term nology Terminology


Switched Network: A network of nodes organized systematically to forward data as it moves from source to destination. Circuit Switched: establishes a circuit from entry point to exit point of network, and analog or digital data moves along circuit with strict timing. Packet Switched: N d i P k S i h d Nodes in network send k d discrete blocks or packets of information from one node to next until destination destination.
Network Analysis: Foundation 1-26

Term nology Terminology


One hop: packet moves across a network from one p p f node to a node directly connected. Each movement is a hop toward the destination. Store-and-Forward: P k t is received in its St d F d Packet i di entirety, is stored and processed in an intermediate node, and is then forwarded to an adjacent node. Virtual Circuit: A store-and-forward network that provides circuit like service by setting up an circuit-like end-to-end connection that guarantees certain quality of service.
Network Analysis: Foundation 1-27

Basic Concepts
Host: a node that uses the network (outside the ( network) S witch: a node that implements the network (inside the network) ) Internetwork: A set of independent networks that are interconnected Router/Gateway: a node connected to two or more networks Address: a byte string that identifies a node Routing: a process of forwarding packets across a network based on source and destination addresses. Unicast and Multicast Addresses: addresses assigned to single or multiple destinations destinations.
Network Analysis: Foundation 1-28

Foundat on Foundation
Goals:
Lay foundation for understanding how to build a network
Required connectivity Required services Terminology Layered architecture
TCP/IP & OSI

Protocols and Applications Socket Interface Performance Metrics

Overview: Applications Concepts & Terminology Network Architecture Performance Papers Problems

Network Analysis: Foundation

1-29

Network Architecture Arch tecture


Is the blueprint that guides the design and p g g implementation of a type of network. The blueprint follows a philosophy that falls between s d and pray and guaranteed. b t send d d t d Generally includes a layer reference model. Includes the formats and flows describing formats flows protocols and various layers. May include applets to be used by user-layer applications. Treats user, designer, and service provider perspectives. perspectives

D ffer ng Perspectives Differing Perspect ves


Application programmer cares mostly about pp p g mm m y the services that the network provides (and the cost for those services).
Loss of data? L fd t ? Error-free delivery? Delay?

Network designer cares that network resources are used efficiently and allocated to users f i l ll d fairly. Network provider wants ease of administration and fault management management.
Network Analysis: Foundation 1-31

Network architecture arch tecture


Network must provide:
Connectivity Required service levels q Robustness in case of failures Fairness to users Cost-effective solutions

Again: A network architecture is a blueprint f a way of building a network bl i t for f b ildi t k that will satisfy all its requirements.
Philosophy, algorithms flows Philosophy algorithms, flows, and formats
Network Analysis: Foundation 1-32

OSI Reference Model


Application
S ervice Interface Layer Protocol

Application

Presentation

Layer Protocol

Presentation

S ession

Layer Protocol

S ession

Transport

Layer Protocol

Transport

Network

Network

Network

Network

Data Link

Data Link

Data Link

Data Link

Physical

Physical

Physical

Physical
Network Analysis: Foundation 1-33

Layers, Services, Protocols y , ,


Layers: offer services to higher layers that are requested by parameters being passed to service access points (S APs). S ervices: A set of primitives ( p (operations) that a layer can p ) y perform for its users Protocol: is a set of rules governing the g g format and meaning of frames, packets, or msgs exchanged by p g g y peer entities. Protocols implement the services.
Network Analysis: Foundation 1-34

L ayer O ver view aye e e Layer


Physical Layer : Tr ansmit s bit s over comm channel. H ow t o r epr esent bit s and ensur e r ecept ion. (Physical medium lies logically below .) D at a Link Layer : Takes r aw t r ansmission facilit y and t r ansfor ms t o line fr ee of undet ect ed t r ansmission er r or s. Sends dat a fr ames. Ret r ansmit s if needed. Flow cont r ol usually pr ovided ovided. N et w or k Layer : Get s packet s fr om sour ce t o dest inat ion acr oss a net w or k. Pr ovides r out ing, net w or k congest ion ( ), ,p p g cont r ol (call admission), net - net i/f, per haps account ing t o suppor t net mgt . Tr anspor t Layer : A ccept dat a fr om session layer , segment at ion & r eassembly if needed, pass t o net w or k layer , assur e all pieces ar r i safely at ot h end. Fi st l ll i ive f l t t her d Fir t end-t o-end layer . Mult iplexing, flow cont r ol

Network Analysis: Foundation

1-35

Layer Overview (continued)


S ession Layer: Provides enhanced services to y certain applications over those provided by transport layer. S ynchronization as example. Presentation Layer: Provides additional functions such as translation among different character, numerical, and bit-string , , g representations. Application Layer: S upports protocols needed by b applications such as network virtual t li ti h t k i t l terminal, i l file format conversions, electronic mail, remote j job entry, etc. y,
Network Analysis: Foundation 1-36

T CP/IP & Course Reference Models


Application Layer Application Layer

Course
Transport Layer Transport Layer

TCP/IP

Network Layer

Internet Layer

Data Link Layerr Data Link Layer Host-to-network Physical Layerr

Network Analysis: Foundation

1-37

Networks Interconnected by IP Routers

T CP/IP Application Layer


Contains all higher level protocols including: i l di

Telnet virtual terminal protocol FTP file transfer protocol S MTP S imple Mail Transfer Protocol DNS Domain DNSDomain Name S ervice HTTP W orld-W ide-W eb page trasfer protocol
Network Analysis: Foundation 1-39

T CP/IP Layer Overview


Internet Layer: Heart of the Internet architecture. Hosts p p y insert packets into IP network that travel independently to destination (over distinct subnets). Implements the IP (Internet Protocol) "protocol." Routing and network g y congestion avoidance are key issues.
Transport Layer: End-to-end peer protocol as in OS I model. model Two protocols defined: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP is reliable and connection-oriented. S upports segmentation and reassembly (with sequence no's) as well no s) as flow control. UDP is unreliable and connectionless. Used with aps that do their own thing or voice or video or... or
Network Analysis: Foundation 1-40

Hybrid Model
The hybrid reference model to be used in this course.

Network Analysis: Foundation

1-41

Two major models for layer services i


Connection-oriented service
Like the telephone network. End-to-end agreements made before user traffic flows flows. Greater complexity and greater reliability Like the post office network. Each letter (packet) moves independently through the network. th h th t k Simpler and reliability can be improved with higher-layer services like registered mail. g y g
Network Analysis: Foundation 1-42

Connectionless service

Internet transport protocols services p p


TCP service:
connection-oriented: setup

UDP service:
unreliable data transfer between sending and receiving process gp does not provide: connection setup, reliability, flow control, y congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?

required between client, server reliable transport b l bl 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

Network Analysis: Foundation

1-43

Example N etworks
S ystem Network Architecture (S NA)
IBM's networking architecture used by 10,000+ business networks Mainframe model of computing...hierarchical Followed by Advanced Peer-to-Peer Networking Peer to Peer (APPN) architecture

Novell Netware
Predominant PC-based network architecture...client/server model...downsizing Proprietary protocol stack derived from XNS ...similarities to IP IPX uses 10-byte vs 4-byte (IP) addresses Network Core Protocol (NCP) for connection-oriented transport
Network Analysis: Foundation 1-44

Example N etworks (continued) p ( )


ARPANET
Funded by Advanced Research Projects Agency y j g y (ARPA) in early 60s as command/control network Introduction of packet-switching (vs circuit-switching) circuit switching) Hosts connected to subnet of IMPs (Interface Msg Processors) ) Incredible growth Led to invention of TCP/IP model in 1974 (Vint Cerf Bob Kahn) C f&B bK h ) Protocols integrated into Berkeley UNIX (by BBN) and provided free with UNIX license...explosive! p p
Network Analysis: Foundation 1-45

Example N etworks (continued)


NS FNET
Designed by National S cience Foundation as highspeed successor to ARPANET for university access First Fi t connected six supercomputer centers: S Diego, t d i t t an Di Boulder, Champaign, Pittsburgh, Ithaca, Princeton First TCP/IP WAN Eventually 20 regional networks connected to backbone In 1990 ANS (Advanced Networks and S ervices) took over and renamed ANS NET...45 mbps links & first step towards p p commercialization In 1995 ANS NET sold to AOL and regional networks went to commercial service
Network Analysis: Foundation 1-46

Example N etworks (Continued)


Internet
In mid-80s this collection of IP-based networks began to be viewed as "the Internet" the Internet Growth exponential Defn: Machine on Internet if runs TCP/IP, has IP @, and sends IP packets to other internet hosts Internet S ociety founded in J 1992 an WWW (Word-wide Web) application brought (Word wide millions of non-academic users to Internet in early 90s (web pages, links, ubiguitous URLs)
Network Analysis: Foundation 1-47

X .25 N etworks
A standard developed by CCITT (now IS in 1970s O) Defines the user/network (or host/network) interface Physical layer is X.21 - mostly analog RS -232 used instead Network layer handles addressing, flow-control, delivery confirmation User establishes a "virtual circuit" and sends max 128 byte packets reliably and in order.
both permanent and switched virtual circuits (PVC S (PVC,S VC)

Flow control ensures fast sender does not swamp receiver For non X 25 terminals a Packet assembler/disassembler non-X.25 is used (PAD)
Terminal - X.28 - PAD - X.29 standards also defined.

Note: X 25 limited to 64 kbps; widespread in Europe X.25


Network Analysis: Foundation 1-48

Frame Relay y
Also connection-oriented standaard for moving bits g generally across a p y public network. Takes advantage of fact that leased lines are now fast, digital, reliable --> simple protocols. Predominantly a virtual leased line (PVC) today today. Frames can be up to 1600 bytes and carry a number (dlci) identifying the virtual circuit. Contract ith C t t with carrier f an average service i for i
burst allowed as in S MDS

Generally operates at T1 ( y (1.5mbps) or above ) FR determines start and end of frame, detects some transmission errors, discards bad frames. No flow control yet defined only a CI bit bit.
Network Analysis: Foundation 1-49

BISDN Architecture - AT M
- envisioned for universal networking...

- integrated networking * voice, video, data, and image in the same network - scaleable in distance * LAN, MAN, WAN - scaleable in bandwidth * 1.5 Mbps to several Gbps Asynchronous Transfer Mode
Network Analysis: Foundation 1-50

Motivations
Why connection oriented? - providing service guarantees require idi i t i resources to be reserved in the network - simpler network management Why fixed size cells? - efficient switching - hardware switching Why small size cell? - mainly for voice

Network Analysis: Foundation

1-51

Connection-Oriented vs Co ect o O e ted s Connectionless


Connection-Oriented
Path created (fixed) from transmission site to destination Intermediate nodes set aside resources for the new connection Connection may be allocated a given transmission rate (r bps). Each comm link dedicates bandwidth r to this connection (if needed for connection type) If no path can be found having r bps on all links, call i rejected. ll is j t d
Network Analysis: Foundation 1-52

Connectionless
S ession setup without reserving bandwidth across network network. First-come, first-served and no performance guarantees (changing now). f t ( h i ) No call-admission decision. All users accepted if connected. t d t d Packet waits in queue if needed to be transmitted on next li k i d link. Advantage is that data can be sent without any connection-setup protocols.
Network Analysis: Foundation 1-53

E x a m p le P ro to c o l G ra p h
FTP HTTP V id e o TFTP

TCP

UDP

IP

E th e rn e t

ATM

O th e r N e t A rc h

N o te : O n e a rc h ite c tu re m a y rid e o n to p o f a n o th e r.

Network Analysis: Foundation

1-54

Internet apps: application, transport protocols pp pp , p p


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

Network Analysis: Foundation

1-55

Foundat on Foundation
Goals:
Lay foundation for understanding how to build a network
Required connectivity Required services Terminology Layered architecture
TCP/IP & OSI

Protocols and Applications Socket Interface Performance Metrics

Overview: Applications Concepts & Terminology Network Architecture Performance Channel Multiplexing

Network Analysis: Foundation

1-56

Performance (bandwidth) (bandw dth)


Bandwidth
May imply the width of a frequency band (e g (e.g. 3000Hz) Bandwidth of a communication link means the max bits per second the link supports (e.g. Fast bits-per-second (e g Ethernet is 100 million-bits-per-sec)

Throughput g p

Usually implies achievable performance for the data unit of interest (user data,packet,etc.). Typical measures are bits/sec pkts/sec, etc. bits/sec, pkts/sec etc Depends on input rate to the channel Influenced by protocol and protocol data unit overhead. h d
Network Analysis: Foundation 1-57

Performance (delay)
Delay or latency is the lapsed time between the start and end of an event of interest.
Retrieving data from a disk g Sending a frame on an ethernet link Sending an IP datagram across the Internet.

Measured in time (e.g. 24 milliseconds to send a packet from US east to west coast.) May be interested in one-way or in RTT (round-trip-time).
Network Analysis: Foundation 1-58

Link Delay=Queue+Transmit+Propagate (time) y Q p g ( ) Q Queue time is time a p m m packet/bit waits to begin transmission from a node Transmit time
Size (bits)/Bandwidth (bits per sec)

Propagation time
Distance ( k f t miles) / P Di t (m, km, feet, il ) Propagation S d ti Speed

Propagation speed

3 108 m/sec in a vacuum ( 3.33 ) ( 4.35 ) 2.3 108 m/sec in a cable (5 ) 2 108 m/sec in fiber
sec km k
sec
kn

sec km

Network Analysis: Foundation

1-59

S mple Simple Performance Example


How long does it take to send a 1000 byte t frame over a 1000km 100 Mbps link from the time transmission begins to the time frame is received (no queueing delay)? Ans. Bandwidth should be bps so we must convert b bytes to bi bits. Th we divide by Then di id b bandwidth and add propagation delay. 1000 bytes 8 y = 80 10 sec = 80 sec. Transmission time i 100 10 T i i ti is 1000 10 meters = 4.348 10 sec=4.348 ms Propagation time is 2.3 10 Total time is 4.428 ms. T l i i 4 428
bits sec byte y 6 6 bits

8 meters

sec

Network Analysis: Foundation

1-60

Problem
Calculate the latency (from first bit sent to last bit received) of the following: 10-Mbps Ethernet with a single store-and-forward switch in the path and a packet size of 5,000 bits. Assume that each link introduces a propagation delay of 10 s and that the switch begins retransmitting immediately after it has finished receiving the packet.
10-Mbps

10x10-6 sec
1. Transmit:

10x10-6 sec

Total = 1.02 ms. 5,000 bits 3. Transmit: = 500 106 sec. 6 bits 10 10 sec 6 4. Propagate last bit on second link = 10 10 sec. 5,000 bits = 500 106 sec. bits 10 106 bi sec 2. Propagate last bit on first link = 10 10 6 sec.

Network Analysis: Foundation

1-61

Problem
Two nodes, A and B, are separated by 2000km and are connected by a fiber 10 Mbps point-to-point link. Suppose that node A transmits 1,000 packets per second to node B and that each packet is 1,000 bytes long. Also assume that each packet is delayed for 1 ms in node A. 1. Wh i h d l h 1 What is the delay that each packet experiences from arrival at A to h k i f i l arrival at B? 2. 2 What is the bandwidth of the link? What is the throughput of the link? The ratio of these two quantities determines link "utilization" usually defined as: c c is capacity or bandwidth (bps). Find the utilization of the link. (bps) link
Network Analysis: Foundation 1-62

, where is utilization, is throughput (bps) and

Solut on Solution
The link delay is given by: 8, 000bits 2, 000km d = qt + tt + pd = 1ms + + m 10 Mbps 2.0 108 sec 80 102 2 106 = 0.001sec+ sec+ sec = 0.0118sec = 11.8ms. 6 8 10 10 2 10
The bandwidth of the link is 10Mbps. Node A transmits 1000 pps with each packet 8,000 bits 8.0Mbps; thus, the throughput is 8Mbps. The utilization is clearly 0.8 (notice NO dimension).

Network Analysis: Foundation

1-63

What causes queue delay at A?


Switch needs to move packet or at least pointers from entry port to exit port on the switch. Some delays are possible due to the communication protocol being used. Also, there may be a waiting line forming because the transmitter is busy at the exact moment that a packet is ready to h k i d transmit. (Well consider this later.)
Network Analysis: Foundation 1-64

Bit Length (previous example)


Note: One bit has length just as one packet does.

Propagation Speed: Bandwidth:

2.0 108 m / sec

10 106 bps
Propagation Speed 2.0 108 m / sec 20 BitLength = = = 20 meters bit 6 BandWidth 10 10 bps

2,000,000m This implies that = 100, 000 bits can be 20m/bit held or "stored" on this link at one time.
Network Analysis: Foundation 1-65

Delay Bandw dth Delay-Bandwidth Product


Previous example showed 100,000 bits of 100 000 length 20m fitting on the 2,000 km fiber. y mp g This can be directly computed using
2 106 meters 6 delay bandwidth = (10 10 bps ) 8 2 10 meters / sec = 100, 000bits. Note that delay-bandwidth product is how delay bandwidth many bits sender must transmit before first bit arrives at receiver.
Network Analysis: Foundation 1-66

Performance Terminology Term nology


B byte b bit MB and Mb mega-byte and mega-bit. The "mega" commonly means 106 for network bandwidth (Mbps). The "mega" commonly means 220 for computer file sizes. KB and Kb kilo-byte and kilo-bit The "kilo" commonly means 103 for network bandwidth (Kbps). The "kilo" commonly means 210 for computer file sizes. BUT in this class we will always use 103 for kilo and 106 for mega. It makes arithmetic easier.

Network Analysis: Foundation

1-67

Performance Term (continued) (cont nued)


RTT round-trip time and equals 2 times total one-way delay (latency). Latency means delay and, in this class, we will always specify delay of something in particular. for example, latency between first bit sent and last bit received for a file transfer. Throughput refers to the rate at which data (bits) in which we are interested move from sender to receiver. We may be interested in all bits. We may be interested only in data bits (minus headers). We may or may not penalize throughput for retransmissions in case of errors. Such conditions must y y p g p be specified in any given problem. (Or must be clear because no mention is made of headers or retransmisions...)

Network Analysis: Foundation

1-68

File Transfer and the Train Model

Suppose that a file is to be transferred from A to B over a d km fiber link of bw bps. The total size of the file is fs bytes. HOWEVER, the file cannot be transmitted in a single packet; it must be divided into packet that have a maximum size of ps bytes. How long does it take to transfer the entire file? (Here we have no concerns about errors in transmission.) Example: Suppose a file is to be transferred over a 3000 km link of 155 Mbps. File size is 100 MB and max packet size is 1500 bytes. How much time is required to transfer the file? bytes

Network Analysis: Foundation

1-69

Train Model Solution


n n n 1 A 2 1 2 1 B begin + 1 transfer time + 1 prop delay

First packet arrives after transfer time + propagation delay (1st train car). n 1 packets (cars) remain and one will arrive for each new interval of transfer time. TOTAL transfer time will be one propagation delay plus n (transfertime).

Network Analysis: Foundation

1-70

F le File Transfer Formula


File transfer time tf = pd + n tt where: fs number of packets n = ps bi bits ps(bytes) 8 byte tt = bits bw sec

transfer time

m d ( km ) 1000 km propagation delay pd = 8 m 2 10 sec


Network Analysis: Foundation 1-71

F le File Transfer Example


We were given a link length (distance) of 3000 km, a bandwidth of 155 Mbps, a file size of 100 MB and a maximum packet size of 1500B. Total file transfer time is as follows: 100 106 bytes 00 0 by es n= = 66 667 pkts 66,667 k 1500 bytes bits 1500 bytes 8 byte = 0 077 ms tt = 0.077 ms. 6 bits 155 10 sec 3 106 meters pd = = 15 ms. 8 meters 2 10 sec tf = 66,667 0.077 + 15 = 5.148 seconds.

Network Analysis: Foundation

1-72

Foundat on Foundation
Goals:
Lay foundation for understanding how to build a network
Required connectivity Required services Terminology Layered architecture
TCP/IP & OSI

Protocols and Applications Socket Interface Performance Metrics

Overview: Applications Concepts & Terminology Network Architecture Performance Channel Multiplexing

Network Analysis: Foundation

1-73

A b stra ct C o m m u n ica tio n C h a n n e l S e rve r

C lie n t

Network Analysis: Foundation

1-74

Mult ple Multiple Access protocols


single channel shared by multiple nodes (two or more)

only one node can send s l d s d successfully at a time ssf ll t tim


multiple access protocol:

distributed algorithm that determines how stations share g channel, i.e., determine when station can transmit communication about channel sharing must use channel itself! what to look for in multiple access protocols: p p synchronous or asynchronous information needed about other stations robustness (e.g., to channel errors) ( g, ) performance

Network Analysis: Foundation

1-75

Multiple Access Protocols: a taxonomy p y


Three broad classes: Channel Partitioning
divide channel into smaller pieces (time slots, frequency) allocate piece t node f exclusive use ll t i to d for l i

Random Access allow collisions recover from collisions Taking turns g


tightly coordinate shared access to avoid collisions

Goal: ffi i t fair, simple, decentralized G l: efficient, f i si l d t li d


Network Analysis: Foundation 1-76

Channel Partitioning TDMA g

TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = pkt trans time) in each round ) unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle TDM (Time Division Multiplexing): channel divided into N time slots, one per user; inefficient with low duty slots cycle users and at light load. FDM (Frequency Division Multiplexing): frequency subdivided.
Network Analysis: Foundation 1-77

Channel Partitioning FDMA g


FDMA: frequency division multiple access
channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle idl example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle
frequenc bands cy

Network Analysis: Foundation

1-78

Random Access protocols


When node has packet to send p
transmit at full channel data rate R. no a priori coordination among nodes

two or more trasnmitting nodes -> llisi t t s itti d s collision, random access MAC protocol specifies:
how to detect collisions how to recover from collisions (e.g., via delayed retransmissions)

Examples of random access MAC protocols:


slotted ALOHA ALOHA CSMA and CSMA/CD
Network Analysis: Foundation 1-79

Slotted Aloha
time is divided into equal size slots ( p trans. time) q (= pkt ) node with new arriving pkt: transmit at beginning of next slot if collision: retransmit pkt in future slots with probability p, until successful.

Success (S), Collision (C), Empty (E) slots


Network Analysis: Foundation 1-80

What channel service does an app need? pp


Data loss some apps (e.g., audio) can (e g tolerate some loss other apps (e.g., file transfer, telnet) require f l ) i 100% reliable data transfer Timing some apps (e.g., Internet telephony telephony, interactive games) require low delay to be effective ff ti Bandwidth some apps (e.g., multimedia) require m n mum minimum amount of bandwidth to be effective other apps ( l ti th (elastic apps) make use of whatever bandwidth they get

Network Analysis: Foundation

1-81

Service requirements of common apps


Application file transfer e mail e-mail Web documents real-time audio/video stored audio/video interactive games financial apps Data loss no loss no loss loss-tolerant 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

Network Analysis: Foundation

1-82

Common Fa lures Failures


Bit error Burst error Packet loss Link failure Node failure

Network Analysis: Foundation

1-83

Fa lure Example Failure Example:


Suppose that two nodes, A and B, are connected by a communication link and that node A is transmitting packets to node B. On each transmission attempt B the probability of an error in the packet is e. In this case, transmission fails and the packet must be retransmitted. What is the expected number of transmissions per packet? et , ,... ep ese t t e u be o t e st success u t a s ss o . Let X = 1, 2,... to represent the number of the first successful transmission. (What do we call X ?) What is the probability that X = 1? (Write this as P [ X = 1] .) What is P [ X = 2] ? (Recall the idea of independent events.) What is P [ X = k ] , for any positive integer k ? NOTE : Return to this after review of introductory probability.

Network Analysis: Foundation

1-84

Solut on Solution
The random variable X has a geometric distribution and p X ( k ) = e k 1 (1 e ) , for k = 1, 2,

The expected number of transmissions is

kek 1 (1 e ) =
k =1

1 e

(1 e )

1 . 1 e

Network Analysis: Foundation

1-85

Expected Number of Hops in Linear Network


Suppose that the nodes 1, 2, , n are connect i a straight line as h h d in i h li 1 2 3 n 1 n. Also suppose that a randomly chosen packet is equally likely to belong to the communication of any of the possible pairs. What is the expected number of hops for each packet transmitted?
To begin with we consider the case of 3 nodes (2 nodes is trivial). 1 2 3 We define the random variable H = k for ( k = 1, 2 ) if a random packet travels k hops from source to destination. There are 3 ways to choose two nodes (source & destination) for communication - (1, 2 ) , (1,3) , ( 2,3) . These give us two routes that are 1 hop {1 2, 2 3} and one route that is two hops {1 3}. Because a random packet is equally likely to be traveling any of the 3 routes, we have p ( H = 1) = 2 1 4 Answer: E ( H ) = 1i + 2i = . 3 3 3
Network Analysis: Foundation 1-86

2 1 and p ( H = 2 ) = . 3 3

E(hops) in a Linear Network General Case


In general there are n k routes of length k for k = 1, 2,..., n 1. (HW: prove this assertion by induction on the number of nodes n 2.) We can check this quickly by noting that

( number of routes of length k ) = ( n k ) = k =


k =1 k =1 k =1

n 1

n 1

n 1

( n 1) n .
2

The

n last expression equals , which is the total ways to pick pairs from n nodes. 2 From this it follows that the probability that a random packet is on a route of length k is p ( H = k ) = 2 (n k ) nk = . ( n 1) n ( n 1) n 2
n 1 k =1

We can now find the expected number of hops as E ( H ) = k i p ( H = k )


n 1 n 1 2 (n k ) 2 2n n 1 2 = k = k i( n k ) = ( n 1) n k ( n 1) n k 2 ( n 1) n ( n 1) n k =1 k =1 k =1 k =1 n 1

( n 1) n 2 i ( n 1) n ( 2n 1) = n 2n 1 = n + 1 . 2n i 6 3 3 ( n 1) n 2 ( n 1) n
Network Analysis: Foundation 1-87

Multiplexing (example continues) p g( mp )


Suppose that 10 nodes are connected in place of node A and are sharing the 10Mbps link to B. Actual traffic is 8 Mbps.
A1 A2 B A10

Network Analysis: Foundation

1-88

Recall TDMA and FDMA D FD


Example: FDMA 4 users

frequency time TDMA

frequency time

Network Analysis: Foundation

1-89

Cons der Consider node A1 A


Suppose each 1 sec interval is divided into 10 time slots and 1-sec node A1 is assigned the first time slot from each second. If incoming y g p , traffic is evenly distributed among all input nodes, then each node will use 80% of its assigned 1 Mbps channel and total channel utilization will remain at 0.8. If all traffic is originating at node A1, then no more than 1 Mbps of total traffic can be sent to B even though link utilization would only be 0.08.
Network Analysis: Foundation

1-90

Recall Slotted Aloha


time is divided into equal size slots ( p trans. time) q (= pkt ) node with new arriving pkt: transmit at beginning of next slot if collision: retransmit pkt in future slots with probability p, until successful. Throughput analysis requires probabilistic methods

Success (S), Collision (C), Empty (E) slots


Network Analysis: Foundation 1-91

Slotted Aloha Throughput Analysis g p y


Recall throughput implies the number of packets per unit time that successfully cross the network. To make tractable, we assume that each workstartion transmits the same length packet (every time) and we take the "slot" time to be equal to packet transmission time. We also take this to be our "unit time." Assume that there are n stations on the network and that the sum of all arrivals at these stations has a Poisson distribution with mean arrival rate of per unit time (or slot-time length). We make the simplifying assumption that the sum of all arrivals plus retransmissions (due to "collisions") has a Poisson distribution with mean arrival rate of per unit time.
Network Analysis: Foundation 1-92

Slotted Aloha Continues Cont nues


Suppose any terminal begins transmitting a packet. What is the probability that the packet transmits successfully? In slotted Aloha success occurs if no other terminal got a packet ready for transmission during the previous slot, that is, if there are no other arrivals during i i d i unit time. Let X be a random variable (RV) that gives b d i bl ( ) h i the number of arrivals plus retransmissions in unit time. X has a Poisson distribution with mean ; thus, thus k! the slot prior to our given transmission is P [ X = 0] = e . Because the rate of transmission attempts is per unit time and the probability of success (for a given attempt) is e , then the throughput must be e .
Network Analysis: Foundation 1-93

P[ X = k]=

k e

. The probability of no "other" arrivals during

Max hrouput in Pure Aloha M Th ti P Al h

Network Analysis: Foundation

1-94

From Tanenbaum Computer Networks p


A large population of ALOHA users manages to generate 50 requests/sec (including orginals plus retransmissions). Time is slotted in units of 40 ms. (a) What is the probability of success in the first attempt? (b) What is the probability of exactly k collisions and then a success? (c) What is the channel throughput? 1000 = 25 slots per second. The load is 2 frames/slot. p 40 Success occurs if no other transmission so that prob of success is s = e 2 . ( ) For (a): There are For (b): p ( k ) = (1 e 2 ) e 2 .
k

For (c): The throughput is 2e 2 = 0.27 frames per slot (assuming slotted ALOHA).
Network Analysis: Foundation

1-95

Vous aimerez peut-être aussi