Download - Network and Communications
![Page 1: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/1.jpg)
Network and CommunicationsNetwork and Communications
Hongsik ChoiDepartment of Computer Science
Virginia Commonwealth University
![Page 2: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/2.jpg)
Peer to Peer Networks Peer to Peer Networks
Large number of nodes, symmetric,no central database nor control
How to find the one that I want?
Chord SystemName in ASCII
IP to 160 bit number (N. ID)
Ring of 2^160 node
Store (name,My IP address) at successor(hash(name)))
5bit id example
Find successor or prede. Linear?
Finger table with m entries
)2(%2 mikstart Log n Key 3 14 16 at node 1
![Page 3: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/3.jpg)
Congestion Control Congestion Control
![Page 4: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/4.jpg)
Link management Link management
BufferOutgoing LinkPacket
streams
• Admission (Drop Tail, Random Early Detection(RED))• Scheduling FIFO• Time Division Multiplexing (TDM) and (FDM)• Rate proportional service
![Page 5: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/5.jpg)
Drop Tail FIFODrop Tail FIFO
• Statistical multiplexing: better average delay andloss probabilities (due to buffer overflow). Betterutilization of resources -- Good
• Work conserving: as long as there is a packet thenthe link works at full capacity
• Simple: Good• Packet streams interfere with one another
Guaranteed QoS is harder to achieve• Packets are lost in bursts -- not good for TCP
BufferOutgoing LinkPacket
streams
![Page 6: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/6.jpg)
BufferCapacity C
flow 0flow 1flow 2flow 3 . .
How do we split up bandwidth to different flows?
Streams of packets
MultiplexingMultiplexing
![Page 7: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/7.jpg)
TDM and FDMTDM and FDM
C
r1r2r3r4
r1 + r2 + r3 + r4 = C
TDM: slot time and organize into frameseach “channel” gets certain slotsin a frame.
FDM: bandwidth is split up usinganalog techniques.
BW is reserved for each flow: if flow hasno packets then bw is unused
![Page 8: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/8.jpg)
Processor Sharing: best of both worldsProcessor Sharing: best of both worldsCPU burst and single CPUCPU burst and single CPU
flow 1flow 2.. flow n
C
• Divide bandwidth of the link C equally among activeflows. Active means there are packets present.
• Each active flow gets C/A bandwidth, where A =# active flows
![Page 9: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/9.jpg)
In Network layer
Virtual Circuit versus datagram
1. Admission control
2. Careful route discovery
Packet queuing and service policy
Packet discard policy
Routing algorithm
Packet life time management
![Page 10: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/10.jpg)
Which packet to drop?
New or old
Priority?
Random Early Detection
![Page 11: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/11.jpg)
• Implementing processor sharing or GPS is difficultbecause you have to split bandwidth dynamically
• We’ll look at virtual clock service• It’s actually a packetized version of TDM• We’ll look at packetized GPS (PGPS)
Virtual Clock ServiceVirtual Clock Service
![Page 12: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/12.jpg)
Generalized Processor Sharing (GPS)Generalized Processor Sharing (GPS)
flow 1flow 2.. flow n
CEach flow k is assigneda rate r(k).
Usually,
n
iCir
1)(
Bandwidth for flow k
Aiir
krC
)(
)(A = set of active
flows
![Page 13: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/13.jpg)
Virtual Clock ServiceVirtual Clock Service
Packets arrive into the link buffer:• a(i) = arrival time of the ith packet of flow k• L(i) = length of the packet• d(i) = virtual departure time of the packet
= max{a(i), d(i-1)} + L(i)/r(k)
flow 1flow 2.. flow n
CEach flow k hasrate r(k)
![Page 14: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/14.jpg)
Virtual Clock ServiceVirtual Clock Service
• Packets in the buffer are transmitted accordingto the smallest virtual departure time
• What is going on?• The scheduler is emulating a TDM system
flow 1flow 2.. flow n
Cbuffer
![Page 15: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/15.jpg)
The TDM systemThe TDM system
flow 1flow 2.. flow n
r(1)
r(2)
r(n)
Consider flow k: The ith packet of flow k departs at
d(i) = the time the packet begins transmission + L(i)/r(k)= max{d(i-1), a(i)} + L(i)/r(k)= virtual departure time of virtual clock system
![Page 16: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/16.jpg)
Packetized GPS (Weighted Fair Queueing)Packetized GPS (Weighted Fair Queueing)
flow 1flow 2.. flow n
Cbuffer
GPS emulator thatdetermines virtual
departure times (VDT) ofpackets
arrival timesand packetlengths
VDTs of packets
Packets are transmitted inorder of their VDTs
![Page 17: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/17.jpg)
PerformancePerformance
For Virtual Clock Service and PGPS (or weighted fairqueueing), the departure time of a packet is upperbounded by
virtual departure time + Lmax/C
Lmax = maximum packet size
![Page 18: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/18.jpg)
Weighted Round Robin: AWeighted Round Robin: APractical SchedulerPractical Scheduler
flow 1flow 2.. flow n
Buffers
The buffers are served in round robin fashion BUTa buffer may be skipped under certain conditions
![Page 19: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/19.jpg)
Weighted Round Robin: AWeighted Round Robin: APractical SchedulerPractical Scheduler
flow k
Buffer
• Each time flow is considered, it gets additional credit r(k)• If a flow is considered and its HOL packet has length
at most Credit then its packet is served andCredit = Credit - packet length
Creditr(k)
![Page 20: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/20.jpg)
Random Early Detection Random Early Detection (RED)(RED)
Fixed buffer size for B packetsTail Drop Queueingprob
dropping
1
Occupancy
Dropping can bebursty which can bebad for TCP
![Page 21: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/21.jpg)
Random Early Detection Random Early Detection (RED)(RED)
Fixed buffer size for B packetsREDprob
dropping
1
Occupancy
Dropping some smallfraction early tells TCP to back off
![Page 22: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/22.jpg)
Congestion control in virtual Circuit subnet
![Page 23: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/23.jpg)
Congestion happen -> send warnings to sources
The warning bit – any router along the path can set
Choke packet:
first packet reduce the flow rate by certain percent and ignore for some interval,
if another choke packet, reduce the rate with certain percent and so on
At high speed over long distance, it does not work well
![Page 24: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/24.jpg)
Hop by hop choke
Buffers or loss?
![Page 25: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/25.jpg)
Quality of Service
![Page 26: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/26.jpg)
Jitter- delay variations
Buffering – reliability, bandwidth, delay
Can this smoothing work in server side? Traffic Shaping
![Page 27: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/27.jpg)
![Page 28: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/28.jpg)
Leaky bucket flow control
Incoming trafficBuffer
tokenbucket
tokens generated at rate
Require tokensto launch data
() trafficR(t)
![Page 29: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/29.jpg)
Input
250k
500k
750k
500k w/
10MB/sec bucket
![Page 30: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/30.jpg)
Token bucket allows burst!
Burst length , S
Token bucket capacity, C bytes
Token arrival rate bytes/sec
Maximum output rate, M bytes/sec
Out put burst = C+ S bytes
Number of bytes in S = MS
C+ S = MS
S = C/(M- )
C = 250KB
M = 25MB/sec
sec
S =250KB/(25MB/sec – 2MB/sec)
=10.8msec
![Page 31: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/31.jpg)
If all packets follow same route, we can reserve
1. Bandwidth,
2. buffer space,
3. CPU cycles
If flow is well shaped and follows same route, router have to decide accept new flow or not based on Maximum packet size, minimum packet size,
peak data rate,token bucket size, token rate
What if there is one aggressive flow? Packet scheduling
![Page 32: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/32.jpg)
Fair queueing
Weighted Fair queueing
How to model? GPS
How to implemented ? Virtual clock? Packetized GPS
![Page 33: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/33.jpg)
Protocol for streaming Multimedia (flow based algorithm)
Multicast membership is dynamic
Can resource reservation scheme works?
RSVP(Resource reSerVation protocol):
Multi source multi receiver case
![Page 34: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/34.jpg)
Flow based service
Disadvantage:
It is not scale well.
Require advanced set up
Marinating per flow information is too much
Too much overhead in frequent router code change
Class based? (differentiated services)
expedited forwarding
Assured Forwarding
•4 class
•low medium high
![Page 35: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/35.jpg)
Label Switching and MPLS
Routing
Switching
Forward equivalence class
Data driven setup with colored thread
![Page 36: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/36.jpg)
Internetworking
How networks differ?
Service
Protocol
Addressing
Packet Size
QoS
Error handling
Congestion control
Security
etc
![Page 37: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/37.jpg)
How network can be connected?
Routers (multiprotocol routers) or switch
How to provide Internetwork routing?
Will be covered with IP
Next class we will discuss IP
![Page 38: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/38.jpg)
A Network Calculus for A Network Calculus for PerformancePerformance
R(t): rate of traffic flow at time t
• Simple model: constant rate r, R(t) = r• More complicated model: () traffic
For all x < y,
y
xxydttR )(
burstinessparameter
![Page 39: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/39.jpg)
((,,) Traffic) Traffic
Simple FIFO queue and link
B(t)C
backlog
R(t)
s tfirst packetarriving
B(t)
![Page 40: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/40.jpg)
((,,) Traffic) Traffic
Simple FIFO queue and link
B(t)C
backlog
R(t)
s tfirst packetarriving
B(t)
![Page 41: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/41.jpg)
For FIFO buffer with () traffic,Buffer occupancy is at most + LDelay is at most ( + L)/C
![Page 42: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/42.jpg)
DmaxRin(t)
Bits may be arbitrarily delayed from 0 to Dmax
Rout(t)
)(max)(
max)()()(max
xyinDinin
DxyinindttRindttRouty
Dx
y
x
output is burstier
![Page 43: Network and Communications](https://reader035.vdocument.in/reader035/viewer/2022062803/5681485d550346895db56bd8/html5/thumbnails/43.jpg)
R1(t)R2(t)R3(t)
Rout out = 1 + 2 + 3out = 1 +2 + 3
How do we get such traffic?How do we get such traffic?
Leaky bucket flow control
Incoming trafficBuffer
tokenbucket
tokens generated at rate
Require tokensto launch data
() trafficR(t)