程序代写代做代考 assembly distributed system Computer Systems

Computer Systems
Introduction to Networks (Part II)
Dr. Mian M. Hamayun
m.m.hamayun@bham.ac.uk

Lecture Objective
The objective of this lecture is to develop a basic understanding of different types of network delays, protocol layering and OSI model.
Slide #2 of 36

Lecture Outline
 Packet Loss and Delays
 What is a Protocol?
 Protocol Layers and Encapsulation
 Open Systems Interconnection Model
 Large Messages and Message Consistency  Ports and Addressing
 Summary
Slide #3 of 36

How do loss and delay occur?
 Packets queue in router buffers
 packet arrival rate to link (temporarily) exceeds output link
capacity
 packets queue, wait for turn
A
B
packet being transmitted (delay)
packets queueing (delay)
free (available) buffers: arriving packets dropped (loss) if no free buffers
Slide #4 of 36

How do loss and delay occur?
transmission
A
B
propagation
dnodal = dproc + dqueue + dtrans + dprop
 dproc: nodal processing  check bit errors
 determine output link  typically < msec nodal processing queueing  dqueue: queueing delay  time waiting at output link for transmission  depends on congestion level of router Slide #5 of 36 How do loss and delay occur? transmission A B propagation dnodal = dproc + dqueue + dtrans + dprop  dtrans: transmission delay  L: packet length (bits)  R: link bandwidth (bps)  dtrans = L/R very different nodal processing queueing  dprop: propagation delay  d: length of physical link  s: propagation speed in medium (~2x108 m/sec) dtrans and dprop  dprop = d/s Slide #6 of 36 Caravan Analogy 100 km 100 km ten-car caravan toll booth toll booth  cars “propagate” at 100 km/hr  toll booth takes 12 sec to service car (bit transmission time)  car~bit; caravan ~ packet  Q: How long until caravan is lined up before 2nd toll booth?  time to “push” entire caravan through toll booth onto highway = 12*10 = 120 sec  time for last car to propagate from 1st to 2nd toll both: 100km/(100km/hr)= 1 hr  A: 62 minutes Slide #7 of 36 Caravan Analogy (more) 100 km 100 km ten-car caravan toll booth toll booth  suppose cars now “propagate” at 1000 km/hr  and suppose toll booth now takes one min to service a car  Q: Will cars arrive to 2nd booth before all cars serviced at first booth?  A: Yes! after 7 min, 1st car arrives at second booth; three cars still at 1st booth. Slide #8 of 36 Packet Loss  queue (aka buffer) preceding link in buffer has finite capacity  packet arriving to full queue dropped (aka lost)  lost packet may be retransmitted by previous node, by source end system, or not at all A buffer (waiting area) packet being transmitted B packet arriving to full buffer is lost Slide #9 of 36 Throughput  throughput: rate (bits/time unit) at which bits transferred between sender/receiver  instantaneous: rate at given point in time  average: rate over longer period of time server, with file of F bits to send to client server sends bits (fluid) into pipe link capacity Rs bits/sec pipe that can carry fluid at rate Rs bits/sec) link capacity Rc bits/sec pipe that can carry fluid at rate Rc bits/sec) Slide #10 of 36 Throughput (more)  Rs < Rc What is average end-end throughput? Rs bits/sec Rc bits/sec  Rs > Rc What is average end-end throughput?
Rs bits/sec
bottleneck link
Rc bits/sec
link on end-end path that constrains end-end throughput
Slide #11 of 36

What is a Protocol?
 To effectively communicate, network devices use protocols
 Set of guidelines
 Must specify:
 The sequence of messages to be exchanged  The format of the data in the messages
 Implemented by pair of software modules in sending and receiving computer
Slide #12 of 36

Protocol – Example 1
 Transport protocol: transmits message of a length from a sending process to a receiving process.
 A process wishing to send message passes it to transport protocol module
 Transport software divides message into packets  These are then transmitted using network protocol  Inverse operations are performed at other end
Slide #13 of 36

Protocol – Example 2
Slide #14 of 36

Message: Frame
10101010 1010101 etc…
Slide #15 of 36

Message: Frame
Slide #16 of 36

Inside a Frame: Packet
Slide #17 of 36

Protocol Layers
 Network software arranged in hierarchy of layers
 Each layer presents interface to layer above
 Every computer in network should have these layers
 Layers communicate with those above and below through procedure calls
Slide #18 of 36

Conceptual Layering of Protocol Software
Message sent
Message received
Layer n
Layer 2
Layer 1
Sender
Communication medium
Recipient
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair,
Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012
Slide #19 of 36

Protocol Layers
 Each layer accepts items of data in a specified format from layer above
 Transformations applied to encapsulate data  Then data passed to layer below
Slide #20 of 36

Protocol Layers – Example
Slide #21 of 36

Encapsulation – in Layered Protocols
 Complete set of protocol layers is a protocol suite or protocol stack
Slide #22 of 36

Open Systems Interconnection (OSI) Model
Slide #23 of 36

OSI Protocol Summary
Slide #24 of 36

Pros and Cons of Protocol Layering
 Simplifies and generalizes software interfaces accessing communication services
 Downside: performance costs.
 N layers = N control transfers
 N copies of the data due to encapsulation
 Hence, data transfer rate much lower than available network bandwidth
Slide #25 of 36

What does the Internet Use?
 Differs slightly from OSI model
 Application, presentation and session layers not clearly
distinguished in Internet protocol stack
► Applications decide how to treat these
 Session layer integrated with transport layer
Slide #26 of 36

Large Messages
 Problem: entire message may need more than one frame
 An Ethernet frame can only hold 1500 bytes of data  Any large messages will have to be broken down
Slide #27 of 36

Message Consistency
 Reliable data transfer
 Sender & Receiver communicate using TCP
 If there are errors in the packets, the receiver notifies sender and the sender resends those packets again.
 If it was one large packet, there could be issues due to poor connection
Slide #28 of 36

Slide #29 of 36

How could we define what the packet order should be?
Each packet contains a sequence number!
Slide #30 of 36

Ports
 Transport layer’s task is to provide a network- independent message transfer service between pairs of network ports
 Software defined destination points at a host computer  Port 25 for email…
 Attached to processes
Slide #31 of 36

Addressing
 Transport layer must deliver messages to destinations with transport addresses
 Composed of network address and a port number  Numeric identifier
 In the Internet, every host computer is assigned an IP number  Identifies it and the subnet to which it is connected
Slide #32 of 36

Datagram Packet Delivery
 Datagram – like a letter/telegram
 Delivery of each packet is a one-shot process  Network retains no info once delivered
 Sequence of packets may take different routes from host to destination, so may arrive out of sequence
 Datagrams contain:
 Full network address of source and destination
 Internet’s network layer based on datagram delivery
Slide #33 of 36

Hosts, Routers, and Link Layer Switches
Slide #34 of 36

Summary
In this lecture we have been introduced to:
 The different sources of delays in networks
 The notion of a protocol and protocol layering  The OSI Model
 Packet Assembly, Ports & Addressing
Slide #35 of 36

References / Links
 Chapter #1: Computer Networks and the Internet,
Computer Networking: A Top-Down Approach (7th edition) by Kurose & Ross
Slide #36 of 36