June 4, 2016 | Author: Gokila Rajaiah | Category: N/A
Chapter 1 Foundation Dr. G. A. Marin
Network Analysis: Foundation
1-1
1970s Business Environment: IBM's SNA Hierarchical, Hi hi l orderly, d l reliable li bl Sysdef for Topology and Paths Connection-oriented and guaranteed service at link layer (d t only) (data l ) 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 Standard Connection-oriented SVC and PVC with Flow Control Assumes noisy lines Network Analysis: Foundation
1-2
1980s NSFNet Backbone to Interconnect Super Computers TCP/IP official ffi i l protocol t l off Arpanet A t in i 1983 56 kbps backbone for 6 super computer centers Thousands of researchers connect their subnets Version 2 (IBM RS6000s and Fiber) ran at 448 kbps By 1990 1.5 Mbps ANStakes ANS takes over and upgrades to 45 Mbps (Merit (Merit, MCI MCI, IBM)
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 & NSF
Internet Society Founded 1992! Commercially Cisco uses IP to grow to Billions in revenue Network Analysis: Foundation
1-4
1990s 990s ((continued) (co t ued)) MIT, U Pa, IBM, Bellcore Research in highspeed paket switching Frame Relayy Forum evolve X.25 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 p processes communicating mm g across network Examples: world wide web, email, FTP, streaming t i audio di & video, id chatrooms… h t Use Application Layer Protocols U User agentt implements i l t the th application li ti layer protocol: Web – browser Email – mail reader (e.g. outlook) Streaming audio/video – media player
Network Analysis: Foundation
1-7
Client-server ent ser er parad paradigm gm Typical network app has two pieces: client and server p Client:
application transport network data link physical
initiates contact with server
(“speaks first”) typically requests service from server,, Web: client implemented in browser; e-mail: in mail reader
Server: provides requested service to client
request
reply l application transport network data link l physical
e.g., Web server sends requested Web
page, maill server delivers d l e-maill
Network Analysis: Foundation
1-8
Internet Protocol Graph
Network Analysis: Foundation
1-9
The W Web: the http p protocol p http: p hypertext yp transfer f protocol Web’s 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 protocol: more http: p TCP transport 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 p is “stateless” server maintains no information about past client requests p q
aside
Protocols that maintain “state” state are complex! past history (state) must be maintained if server/client / li t crashes, h their views of “state” may be inconsistent, must be reconciled Network Analysis: Foundation
1-11
http example Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. http client initiates TCP
connection to http server (process) at www.someSchool.edu. Port 80 is default for http server.
2. http client sends http request message (containing URL) into TCP connection socket
time
(contains text, references to 10 jpeg images)
1b. http server at host
S h l d waiting iti www.someSchool.edu for TCP connection at port 80. “accepts” connection, notifying client
3. http server receives request message forms response message, message containing requested
object (someDepartment/home.index), sends d message into socket 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 p y html. Parsing g html file, finds 10 referenced jpeg objects
time 6. Steps p 1-5 repeated p for each of 10 jpeg objects
Network Analysis: Foundation
1-13
Electronic Mail E
outgoing message queue user mailbox user agent
Three major j components: p user agents mail servers simple p mail transfer protocol: smtp
User Agent a.k.a. k ““mail il reader” d ” composing, editing, reading mail messages e.g., Eudora, E d Outlook, O tl k elm, l Netscape Messenger outgoing, incoming messages stored on server
mail server
SMTP SMTP mail server
user agent
SMTP
user agent mail server
user agent
user agent
user agent
Network Analysis: Foundation
1-14
Electronic Mail: mail E m servers user agent
Mail Servers mailbox contains incoming messages (yet to be read) for user f 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
SMTP SMTP mail server
user agent
SMTP
user agent mail server
user agent
user agent
user agent
Network Analysis: Foundation
1-15
Electronic Mail: smtp E m p [[RFC F 821]] uses tcp p to reliably y transfer email msg from client to server, port 25 direct transfer: sending server to receiving server three p phases of f transfer 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 mp smtp m p interaction 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: 250
[email protected]... Sender ok RCPT TO TO: 250
[email protected] ... Recipient ok DATA 354 Enter mail mail, end with "." on a line by itself 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: final smtp f nal words smtp p uses persistent 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 d of f message
Comparison p with http: p http: pull email: push both have ASCII command/response interaction,, status codes http: each object encapsulated in its own r sp ns ms response msg 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 y support pp a strictly limited number or many • If supports t growth, it is said to “scale scale.”
router server
workstation mobile
local ISP
regional ISP
company n t network k Network Analysis: Foundation
1-21
Links L nks and Nodes Networks inlude nodes (routers, (routers switches switches, computers..) some of which are directly connected by y links. 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 p Access Links and Protocols 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
ES
RSVP/IS-C MSS-C
MSS-S ARIS/GSMP RSVP/IS VLAN DDNS-S DHCP-S
Token Ring
PSTN LAN
ISDN 8260/8265
HUBS MSS-S ARIS/GSMP RSVP/IS VLAN DHCP
RSVP/IS-C MSS-C
ATM OC/12, OC/48 8260/8265
HUBS
DDNS
MSS-S ARIS/GSMP RSVP/IS VLAN DHCP DDNS
39xx, 374X OSA, MAE
SP-2
8260/8265
HUBS MSS-S ARIS/GSMP RSVP/IS VLAN DHCP
DDNS
390
8260/8265
Frame Relay
ROUTER 2210/2216 ARIS RSVP/IS DDNS S DDNS-S DHCP-S Firewall IP Sec.
Public Data Network X.25, X.21
ATM
HUBS MSS-S ARIS/GSMP RSVP/IS VLAN DHCP
LAN
DDNS
Token Ring
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
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. P k S Packet Switched: i h d Nodes N d in i network k send 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: p packet p moves across a network from f one node to a node directly connected. Each movement is a hop toward the destination. Store-and-Forward: St d F d P Packet k t is received i d in i its 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 circuit-like like” service by setting up an 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) Switch: 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 Arch Architecture tecture Is the “blueprint” p that guides g the design g and implementation of a type of network. The blueprint follows a philosophy that falls b t between “s “send d and d pray”” and d “guaranteed.” “ t d” Generally includes a layer reference model. Includes the “formats formats and flows” flows describing protocols and various layers. May include applets to be used by user-layer applications. Treats user, designer, and service provider perspectives. perspectives
Differing D ffer ng Perspect Perspectives ves Application pp programmer p g mm cares mostly m y about the services that the network provides (and the cost for those services). Loss L of f data? d t ? Error-free delivery? Delay?
Network designer cares that network resources are used efficiently and allocated ll d to users f fairly. i l Network provider wants ease of administration and fault management. management Network Analysis: Foundation
1-31
Network arch architecture tecture Network must provide:
Connectivity Required q service levels Robustness in case of failures Fairness to users Cost-effective solutions
Again: A network architecture is a “bl “blueprint” i t” f for a way of f building b ildi a network t k that will satisfy all its requirements. Philosophy, Philosophy algorithms, algorithms flows, flows and formats Network Analysis: Foundation
1-32
OSI Reference Model Application
Layer Protocol
Application
Service Interface
Presentation
Session
Transport
Layer Protocol
Presentation
Layer Protocol
Session
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, y , Services,, Protocols Layers: offer services to higher layers that are requested by parameters being passed to service access points (SAPs). Services: A set of primitives ((operations) p ) that a layer y can p perform for its users Protocol: is a set of rules g governing g the format and meaning of frames, packets, or msgs g exchanged g by yp peer entities. Protocols implement the services. Network Analysis: Foundation
1-34
L ayer O ver aye e view 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 ), net - net i/f,, per p haps p account ing g cont r ol ((call admission), 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 l layer , assur e allll pieces i ar r iive safely f l att ott h her end. d Fi Fir stt end-t o-end layer . Mult iplexing, flow cont r ol
Network Analysis: Foundation
1-35
Layer Overview (continued) Session Layer: y Provides enhanced services to certain applications over those provided by transport layer. Synchronization as example. Presentation Layer: Provides additional functions such as translation among different character,, numerical,, and bit-string g representations. Application Layer: Supports protocols needed b applications by li ti such h as network t k virtual i t l tterminal, i l file format conversions, electronic mail, remote jjob entry, y, etc. Network Analysis: Foundation
1-36
T CP/IP & Course Reference Models Application Layer
Application Layer
Course
TCP/IP Transport Layer
Transport Layer
Network Layer
Internet Layer
Data Data Link Link Layerr 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 i l di including:
Telnet virtual terminal protocol FTP file transfer protocol SMTP Simple Mail Transfer Protocol DNSDomain DNS Domain Name Service 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 packets into IP network that travel independently p y insert p to destination (over distinct subnets). Implements the IP (Internet Protocol) "protocol." Routing and network g avoidance are key y issues. congestion Transport Layer: End-to-end peer protocol as in OSI model Two protocols defined: Transmission Control model. Protocol (TCP) and User Datagram Protocol (UDP). TCP is reliable and connection-oriented. Supports segmentation and reassembly (with sequence no's) no s) as well 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
Connectionless service Like the post office network. Each letter (“packet”) moves independently th through h the th network. t k Simpler and reliability can be improved with higher-layer g y services like registered g mail. Network Analysis: Foundation
1-42
Internet transport p protocols p services TCP service:
connection-oriented: setup required between client, server reliable l bl transport between b sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees
UDP service: unreliable data transfer between sending and receiving g process p does not provide: connection setup, reliability, y flow control, congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?
Network Analysis: Foundation
1-43
Example N etworks System Network Architecture (SNA) IBM's networking architecture used by 10,000+ business networks Mainframe model of computing...hierarchical Followed by Advanced Peer-to-Peer Peer to Peer Networking (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 p N etworks (continued) ( ) ARPANET Funded byy Advanced Research Projects j Agency 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 C f&B Cerf Bob bK Kahn) h ) Protocols integrated into Berkeley UNIX (by BBN) and p provided free with UNIX license...explosive! p Network Analysis: Foundation
1-45
Example N etworks (continued) NSFNET Designed by National Science Foundation as highspeed successor to ARPANET for university access Fi t connected First t d six i supercomputer t centers: t San Diego, Di Boulder, Champaign, Pittsburgh, Ithaca, Princeton First TCP/IP WAN Eventually 20 regional networks connected to backbone In 1990 ANS (Advanced Networks and Services) took over and renamed ANSNET...45 mbps p links & first step p towards commercialization In 1995 ANSNET 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 the Internet" Internet Growth exponential Defn: Machine on Internet if runs TCP/IP, has IP @, and sends IP packets to other internet hosts Internet Society founded in Jan 1992 WWW (Word-wide (Word wide Web) application brought 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 ISO) in 1970s 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 (PVC,S SVC)
Flow control ensures fast sender does not swamp receiver For non non-X.25 X 25 terminals a Packet assembler/disassembler is used (PAD) Terminal - X.28 - PAD - X.29 standards also defined.
Note: X X.25 25 limited to 64 kbps; widespread in Europe Network Analysis: Foundation
1-48
Frame Relay y Also connection-oriented standaard for moving bits generally g y across a p 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. C t t with Contract ith carrier i ffor an average service i burst allowed as in SMDS
Generallyy operates at T1 ((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 idi service i guarantees t require 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 Co ect o O e ted vs 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, callll iis rejected. j t d Network Analysis: Foundation
1-52
Connectionless Session setup without reserving bandwidth across network network. First-come, first-served and no performance f guarantees t (changing ( h i now). ) No call-admission decision. All users accepted t d if connected. t d Packet waits in queue if needed to be transmitted i d on next lilink. k 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
TCP
TFTP
UDP
IP
E th e rn e t
O th e r N e t A rc h
ATM
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: pp application, pp , transport p protocols p Application e-mail remote terminal access Web file transfer streaming g multimedia remote file server Internet telephony
Application layer protocol
Underlying transport protocol
smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary p p y (e.g. RealNetworks) NFS proprietary (e.g., Vocaltec)
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 (bandw (bandwidth) 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 bits per second the link supports (e.g. (e g Fast 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 bits/sec, pkts/sec, pkts/sec etc. 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 g data from a disk 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 y Q p g (time) ( ) Queue Q time m is time m ap packet/bit waits to begin transmission from a node Transmit time
Size (bits)/Bandwidth (bits per sec)
Propagation time
Di t Distance ((m, kkm, ffeet, t miles) il ) / P Propagation ti Speed S d
Propagation speed
3 × 108 m/sec in a vacuum ( 3.33 μ ) ( 4.35 ) 2.3 × 108 m/sec in a cable ( 5 μkmsec ) 2 × 108 m/sec in fiber sec kkm
μ sec kn
Network Analysis: Foundation
1-59
Simple S mple Performance Example How How long does itt take to send a 1000 byte 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 Then we divide di id by b bandwidth and add propagation delay. 1000 bytes y ×8 = 80 ×10 sec = 80 μ sec. T Transmission i i time ti iis 100 ×10 1000 × 10 meters = 4.348 ×10 sec=4.348 ms Propagation time is 2.3 ×10 T Total l time i is i 4.428 4 428 ms. bits
6 bits
−6
sec
3
8 meters
byte y
−3
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
10x10-6 sec
⎫ ⎪ ⎪ ⎪ ⎪ ⎬ ⇒ Total = 1.02 ms. 5,000 bits ⎪ 3. Transmit: = 500 × 10−6 sec. 6 bits ⎪ 10 ×10 sec ⎪ −6 4. Propagate last bit on second link = 10 ×10 sec.⎪⎭ 5,000 bits −6 = 500 × 10 sec. bi 10 ×106 bits sec 2. Propagate last bit on first link = 10 ×10 −6 sec.
1. Transmit:
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. What 1 Wh is i the h delay d l that h eachh packet k experiences i from f arrival i l at A to arrival at B? 2 What is the bandwidth of the link? What is the throughput of the link? 2. The ratio of these two quantities determines link "utilization" usually defined as:
ρ=
λ
, where ρ is utilization, λ is throughput (bps) and
c c is capacity or bandwidth (bps). (bps) Find the utilization of the link. link Network Analysis: Foundation
1-62
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 h a packet k is i ready d to transmit. (We’ll 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 2 0 × 108 m / sec meters BitLength = = = 20 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-Bandwidth Delay Bandw dth Product Previous example showed 100,000 100 000 bits of length 20m “fitting” on the 2,000 km fiber. y computed mp using g This can be directly ⎛ 2 × 106 meters ⎞ 6 delay × bandwidth = ⎜ ⎟ × (10 × 10 bps ) 8 ⎝ 2 × 10 meters / sec ⎠ = 100, 000bits. Note that delay delay-bandwidth bandwidth product is how 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 y or mayy not penalize p throughput g p for retransmissions in case of errors. Such conditions must 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. bytes How much time is required to transfer the file?
Network Analysis: Foundation
1-69
Train Model Solution n
1 A 2
n n
begin
B 1
+ 1 transfer time 2
1
+ 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
File F le Transfer Formula File transfer time tf = pd + n × tt where: ⎡ fs ⎤ number of packets n = ⎢ ⎥ ⎢ ps ⎥
transfer time
⎛ bits bi ⎞ ps(bytes) × 8 ⎜ ⎟ byte ⎝ ⎠ tt = ⎛ bits ⎞ bw ⎜ ⎟ sec ⎝ ⎠
⎛ m ⎞ d ( km ) × 1000 ⎜ ⎟ km ⎝ ⎠ propagation delay pd = 8⎛ m ⎞ 2 × 10 ⎜ ⎟ sec ⎝ ⎠ Network Analysis: Foundation
1-71
File F le 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 00 × 10 06 bytes by es ⎤ n=⎢ 66 667 pkts k ⎥ = 66,667 1500 byte s ⎢ ⎥ bits 1500 bytes × 8 byte = 0.077 tt = 0 077 ms 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
Multiple Mult ple Access protocols single channel shared by multiple nodes (two or more)
l one node only d can send s d successfully s ssf ll att a time tim multiple access protocol:
distributed algorithm g that determines how stations share channel, i.e., determine when station can transmit communication about channel sharing must use channel itself! what to look for in multiple p access protocols: p • synchronous or asynchronous • information needed about other stations • robustness ((e.g., g , to channel errors)) • performance
Network Analysis: Foundation
1-75
Multiple p Access Protocols: a taxonomy y Three broad classes: Channel Partitioning divide channel into smaller “pieces” (time slots, frequency) allocate ll t piece i tto node d f for exclusive l i use
Random Access allow collisions “recover” from collisions “Taking g turns” tightly coordinate shared access to avoid collisions
G l: efficient, Goal: ffi i t f fair, i si simple, l d decentralized t li d Network Analysis: Foundation
1-76
Channel Partitioning g TDMA
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, slots one per user; inefficient with low duty cycle users and at light load. FDM (Frequency Division Multiplexing): frequency subdivided. Network Analysis: Foundation
1-77
Channel Partitioning g FDMA FDMA: frequency division multiple access
frequenc cy bands
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
Network Analysis: Foundation
1-78
Random Access protocols When node has p packet to send transmit at full channel data rate R. no a priori coordination among nodes
two t or more trasnmitting t s itti nodes d s -> “collision”, “ llisi ” 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 q size slots ((= p pkt trans. time)) 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 pp need? Data loss some apps (e.g., (e g audio) can tolerate some loss other apps (e.g., file transfer, f telnet) l ) require 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 minimum m n mum amount of bandwidth to be “effective” other th apps (“ (“elastic l ti apps”) make use of whatever bandwidth they get
Network Analysis: Foundation
1-81
Service requirements of common apps Data loss
Bandwidth
Time Sensitive
file transfer e-mail e mail Web documents real-time audio/video
no loss no loss loss-tolerant loss-tolerant
no no no yes, 100’s msec
stored audio/video interactive games financial apps
loss-tolerant loss-tolerant no loss
elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic
Application
yes, few secs yes, 100’s msec yes and no
Network Analysis: Foundation
1-82
Common Fa Failures lures Bit error Burst error Packet loss Link failure Node failure
Network Analysis: Foundation
1-83
Failure Fa lure Example: Example Suppose that two nodes, A and B, are connected by a communication link and that node A is transmitting packets to node B. B On each transmission attempt 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 X = 1,, 2,... ,... to represent ep ese t the t e number u be of o the t e first st successful success u transmissi t a s ss o on.. Let (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
∞
1− e
k =1
(1 − e )
∑ kek −1 (1 − e ) =
2
=
1 . 1− e
Network Analysis: Foundation
1-85
Expected Number of Hops in Linear Network Suppose that h the h nodes d 1, 2, , n are connect in i a straight i h line li as 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 and p ( H = 2 ) = . 3 3
2 1 4 Answer: E ( H ) = 1i + 2i = . 3 3 3 Network Analysis: Foundation
1-86
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 n −1
n −1
n −1
∑ ( number of routes of length k ) = ∑ ( n − k ) = ∑ k = k =1
k =1
k =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 ) n−k = . ⎛ ( n − 1) n ⎞ ( n − 1) n ⎜ ⎟ 2 ⎝ ⎠ n −1
We can now find the expected number of hops as E ( H ) = ∑ k i p ( H = k ) k =1
n −1 n −1 2 (n − k ) 2 2n n −1 2 = ∑k = k i( n − k ) = k− k2 ∑ ∑ ∑ ( n − 1) n k =1 ( n − 1) n k =1 ( n − 1) n ( n − 1) n 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 p g (example ( mp continues)) 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 D and FDMA FD Example: FDMA
4 users
frequency time TDMA
frequency time
Network Analysis: Foundation
1-89
Consider Cons der node A1 A Suppose each 11-sec sec interval is divided into 10 time slots and node A1 is assigned the first time slot from each second. If incoming p nodes,, then each traffic is evenlyy distributed amongg all input 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 q size slots ((= p pkt trans. time)) 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 g p Analysis 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 Cont Continues 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 d i unit during i time. i Let X be b a random d variable i bl (RV) ( ) that h gives i the number of arrivals plus retransmissions in unit time. X has a Poisson distribution with mean γ ; thus, thus P[ X = k]=
γ k e −γ
. The probability of no "other" arrivals during
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
Max T h M hrouputt in i Pure P Aloha Al h
Network Analysis: Foundation
1-94
From Tanenbaum Computer p Networks 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 p second. The load is 2 frames/slot. 40 Success occurs if no other transmission so that prob of success is s = e −2 . ) There are For ((a):
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