Top Banner
 Lecture 1 A Network of Interconnected Objects The TCP/IP stack Part of the material used for this slides has been obtained from: Computer Networking: A Top Down Approach , 4 th edition. Jim Kurose, Keith Ross. Addison-Wesley, July 2007.
75

A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

May 05, 2018

Download

Documents

dinhthien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Lecture 1

A Network of Interconnected ObjectsThe TCP/IP stack

Part of the material used for this slides has been obtained from:Computer Networking: A Top Down Approach , 4th edition. Jim Kurose, Keith Ross. Addison-Wesley, July 2007.

Page 2: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Starting Point

Wireless Networks as an 

Access Technology to 

Internet

“Internet Protocol (IP) everywhere”

Page 3: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Wireless Access Networks

Access Points = {WIFI, WIMAX, GSM/GPRS, UMTS, HSDPA, LTE...} 

Page 4: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Wireless Access Networks

Page 5: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Mobile Communication Networking

Mobile Internet Applications

IMS

SIP

TCP/UDP

 IP

TCP/UDP

LINK

PHY

WLANs

 Johan Zuidweg (4th part)

 Miquel Oliver (3rd part)

Anna Sfairopoulou (2nd part)

Boris Bellalta (1st part)

Page 6: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Some Internet Objects

Page 7: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

What's the Internet

• Millions of connected computing devices: • Hosts = end systems running 

network applications• Routers / Switches = network 

elements 

Page 8: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Structure

Page 9: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

What's the Internet: a service view

 → The Network provides communication services to applications. → The different services are characterized by their capability to provide:

● Data loss ● Timing (delay)● Throughput ● Security 

 → What services provide the current Internet?● IP is a best­effort (there are no loss & delay guarantees)● A reliable service (based on TCP)● A non­reliable service (based on UDP)

Page 10: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

10

Types of Traffic vs User perception● Elastic flows (TCP­based): use all the available bandwidth, fair.

● Streaming/Rigid flows (UDP­based): use only the required bandwidth.

Rigid Traffic (UDP)

User Perception

B

B

 Video/audio streaming Voice over IP

 Web (HTTP) FTP, e­mail, ...

Multimedia

Elastic Traffic (TCP)User Perception

MinimumBandwidth

Good 

Bad

Better 

Worst

Page 11: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Transport service requirements of common apps

Page 12: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Circuit switching● At each link between the source and destination a portion of 

bandwidth is reserved for that communication (data transfer).

● Before to start the communication, the circuit must be established (e.g. mobile phone call). 

● Benefits:

● Once the circuit is created, the communication does not suffer any “interference” from other communications.

● Disadvantages:

● Very low efficiency (if there is no data to be transmitted, nobody can take profit of the reserved bandwidth).

● Low network capacity.

Page 13: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Packet switching● There is no bandwidth reservation at any link between the 

source and destination.

● All decision (routing to next hop) are taken based on each individual “packet”.

● Benefits:

● Simple, does not require any extra signaling.● Better use of the transmission resources   Higher capacity.→

● Disadvantages:

● Unpredictable network performance (for each communication) as it depends on the behavior of the others.

Page 14: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

Packet switching

A “packetizer” function encapsulates (adds the necessary headers) a sequence of bits in a “packet”.The overall packet has length of L (data + header) bits.

Codec Packetizer

bitsvoice packets

t1 2 3

L bits

Time beetwen packets

File10 

MBytesPacketizer

packets

t1 2 3

L bits

bits

streaming flow

elastic flow

Page 15: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

Packet switching

Access Point

PC

Web Server

VoIP/WLANphone

VoIP/WLANphone

Router A

Switch

ADSL/Switch

Router C

Router B

VoIP phone

Network elements forward packets to its destination through other network elements (routing).

End points (final systems) generate the data.

Optical Fiber links

Page 16: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

Internet: a network of queues

Access Point

PC

Web Server

VoIP/WLANphone

VoIP/WLANphone

Router A

Switch

ADSL/Switch

Router C

Router B

HTTP request

HTTP response

HTTP request Web Server

PC clientsHTTP response

Router A Router B Router C

Router C Router B

Request delay? Response delay?

Queue

If the link is full, packets have to wait its turn in a queue!!!!

Page 17: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

17

End­to­end vs Hop by Hop retransmissions

1 2 5

Data

ACK/NAK

End­to­end 

1 2 5

Data

ACK/NAK

Hop­by­hop

3

Data

ACK/NAK4

Data

ACK/NAK

Data

ACK/NAK

3

Data

4

Data Data

Page 18: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

What is a protocol?

● network protocols: between objects (machines) all communication activity in Internet is governed by protocols

● protocols define format, ● order of msgs sent and received among network

entities, ● actions taken on msg transmission, receipt

Page 19: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

TCP/IP protocol stack

application: supporting network applicationsFTP, SMTP, HTTP

transport: process­process data transferTCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring  network elements Ethernet, WLANs

physical: wired / wireless

Page 20: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Layer information: Headers

Each layer can only modify its own headers

bit

Page 21: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Protocol Stack

Operating System

(software)

User space(software)

Hardware

Page 22: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Protocol Stack

application: supporting network applicationsFTP, SMTP, HTTP

transport: process­process data transferTCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring  network elements Ethernet, WLAN

physical: bits “on the wire/wireless”

Page 23: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Link Layer● Frame transfer between two directly connected (1 hop) node.

● The services provided at the link layer depend on the specific link­layer protocol that is employed over the link.

Page 24: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

24

Data Link Layer functions●Link Layer

– Hop­to­hop addressing

– Framing

– Error control (detection and correction)

– Retransmissions and flow control● Reduce errors.● Flow control (avoid to saturate the receiver).

– Medium Access Control●PHY Layer

– Transmission / Reception 

Page 25: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

25

Why addresses? Address = identifier

Layer­2 address: Broadcast medium: to identify the sender and destination nodes.

Point­to­point: not required

0A:1C:2E:AA:02:55

0A:1C:2E:AA:04:25

B1:CB:11:A0:25:11

All nodes will inspect the destination address before to discardor to process the received packet.

Page 26: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

26

Segmentation & Reassembly

To accommodate arbitrary message size, a layer may have to deal with messages that are too long or too short for its protocol➔ Segmentation & Reassembly:  a layer breaks long messages 

into smaller blocks and reassembles these at the destination

1 long message

2 or more blocks

2 or more short messages

1 block

Page 27: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

27

Error Control and Detection

Let assume:Pb – Probability of bit error  F – Frame size in bits

Pr{no errors}= (1­ Pb)F

Pr{one or more bits in error} = 1 ­ (1­ Pb)F

Example: 

Pb = 10­6, F = 8*1500 bitsPr {Frame error} = 1 – (1­10­6) 8*1500 = 1.2*10­2

Page 28: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  28

Error DetectionEDC= Error Detection and Correction bits (redundancy)D = Data protected by error checking, may include header fields

● error detection not 100% reliable!● protocol may miss some errors, but rarely● larger EDC field yields better detection and correction

otherwise

Page 29: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

29

Automatic Repeat Request (ARQ)Purpose: to ensure a sequence of information packets is delivered in “order” and without errors or duplications despite transmission errors & losses 

● Three basic schemes: Stop­and­Wait ARQ Go­Back N ARQ Selective Repeat ARQ

● Basic elements of ARQ: Error­detecting code with high error coverage ACKs (positive acknowledgments NAKs (negative acknowlegments) Timeout mechanism

Page 30: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

30

Automatic Repeat Request (ARQ)Efficiency and other metrics: computed in full­duplex channels.

● Different channels from Tx to Rx and from Rx to Tx.

● Selective Repeat is the most efficient.

Real broadcast systems: half­duplex channel. There is no possibility to transmit simultaneously in both cases.

– Stop & Wait option becomes the unique solution.

Improvements: Block transmissions with Stop & Wait ARQs, Piggy­backing, Hybrid­ARQs...

f

C [bps]

f

C [bps]

Data and ACKs in the same bandwidth Data and ACKs in separated channels

Page 31: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

31

ARQ: Stop & Wait

time time

Sender Receiver

ACK

Packet

In this case:Same propagation delay. Why?Different transmission delay. Why?

Page 32: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Multiuser Environments● A group of stations share the communication medium

● Broadcast networks

● Each transmission is received by all the stations

● Circuit­switching (TDM) vs Packet­switching (e.g. random access).

The packets are distributed in different nodes... which complicates the MAC...

Page 33: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  33

Multiple Access protocols● Single shared broadcast channel ● Two or more simultaneous transmissions by nodes: interference 

● collision if node receives two or more signals at the same time

multiple access protocol (MAC)● Coordinates the access to the shared medium● Defines when and how the stations should transmit

● Performance: Depending on the technique used the performance of the network differs.

● Metrics: Total number of packets/s, delay, reliability, cost, max. number of stations, etc.

Page 34: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

MAC Techniques

Page 35: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Static Channelization

● Bandwidth allocation: Give a portion of the shared medium to each user

● Highly efficient for constant­bit rate traffic● Examples:

Page 36: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

FDMA

● Divide channel into M frequency bands● Each station transmits and listens on assigned 

bands● Each station transmits at most C/M bits/s

Page 37: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

TDMA

● Dedicate 1 slot per station in transmission cycles

● Each station transmits at C bps 1/M of the time

Page 38: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

FDMA/TDMA

Page 39: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Random Access

● When a node transmits uses all the available bandwidth

● If more than one node transmit at the same time a collision occurs

● Random access protocols

● Determine the way nodes access the channel and share it

● Minimize and specify how to recover from collisions

Page 40: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Aloha

Page 41: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Aloha Performance

G

S

● Only 18.4% maximum performance!!

● S: Efficiency, 

Page 42: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

S­Aloha

Page 43: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

S­Aloha Performance

G

S

● High performance increase compared with Aloha.

● At which cost?? Synchronization is needed

S­Aloha

Aloha

Page 44: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

CSMA­NP

Page 45: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

CSMA Performance

G

S

● The performance depends on the propagation time

● Better than Aloha for low propagation times

Page 46: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  46

“Reservation” MAC protocols

channel partitioning MAC protocols:● share channel efficiently and fairly at high load● inefficient at low load: delay in channel access, 1/N 

bandwidth allocated even if only 1 active node! 

Random access MAC protocols● efficient at low load: single node can fully utilize channel● high load: collision overhead

“taking turns” protocols● look for best of both worlds!

Page 47: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Reservation

Page 48: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Protocol Stack

application: supporting network applicationsFTP, SMTP, HTTP

transport: process­process data transferTCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring  network elements Ethernet, WLAN

physical: bits “on the wire/wireless”

Page 49: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Network Layer

forwardingtable

Routing protocols path selection RIP, OSPF, BGP

IP protocol addressing conventions datagram format packet handling conventions

ICMP protocolerror reportingrouter “signaling”

Transport layer: TCP, UDP (reliability, flow control)

Link layer (node-to-node communication)

Physical layer (bits coding and modulation)

Networklayer

Page 50: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Network layer● The network layer receives a data segment from transport● Network layer encapsulates the data segments into datagrams● All routers have a network layer, they check the datagram and 

route it according to its destination

Internet Protocol (IP) is the worldwide used as network protocol

applicationtransportnetworkdata linkphysical

networkdata linkphysical

applicationtransportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

segment

Sending hostReceiving host

datagram

datagram

datagram

data

gram

Page 51: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Network functions

1. routing: determine route taken by packets from source to dest. (routing algorithms)

2. forwarding: move packets from router’s input to appropriate router output

Page 52: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Addressing

● Address: “interface” unique identifier.

● Network address: Network “interface” identifier.

● A node can have multiple interfaces. 

● Each interface has a link­layer and a network layer address:

 network­layer (logical or IP) address:11000001100100010011100000001111  Binary:  32 bits

www.upf.eduName (easy for humans)

  Decimal with dots  4 numbers dot separated 193.145.56.15

  link­layer (MAC or physical) address:  00­16­EA­2E­C5­84

Page 53: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Routing: Motivation

How to route the packet along the network:

Several ways to reach the destination, but which one is better?

● According to the “cost” (that means the delay, throughput, reliability, money, a combination of them …)

● The nodes should decide how to route each packet  routing algorithms!

● The network is alive, decisions on routing may change at any moment

Page 54: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

u

yx

wv

z

2

2

13

1

1

2

5

3

5Graph: G = (N,E)N = set of routers = { u, v, w, x, y, z }E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }

Routing: Graph abstraction

Remark: Graph abstraction is also useful in other network contextsExample: P2P, where N is set of peers and E is set of TCP connections

Link cost c(x,x’) = cost of link (x,x’)   ­ e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion

Cost of path (x1, x2, x3,…, xp) =

= c(x1,x2) + c(x2,x3) + … + c(xp­1,xp)  

Routing algorithm: algorithm that finds least-cost path

Question: What’s the least-cost path between u and z ?

Page 55: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Protocol Stack

application: supporting network applicationsFTP, SMTP, HTTP

transport: process­process data transferTCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring  network elements Ethernet, WLANs

physical: bits “on the wire/wireless”

Page 56: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Transport protocols

● provide logical communication between application processes running on different hosts.● transport protocols run in end systems ● send side: 

– breaks app messages into segments, passes to  network layer

● rcv side: 

– reassembles segments into messages, passes to app layer

 Two transport protocol available to apps: TCP and UDP

Page 57: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Logical end­to­end transport

“logical”: it is independent ofthe “physical” path or theLow­layer protocols followed by packets.

Page 58: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Transport services

1) reliable, in­order delivery (TCP)congestion control flow control connection setup 

2) unreliable, unordered delivery: UDP

no­frills extension of “best­effort” IP

Transport services not available: 

● delay guarantees

● bandwidth guarantees

Page 59: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Transport vs. Network layer

● network layer: data communication between hosts (end­to­end) ● transport layer: data communication between processes (end­to­end)

Host 1

IP address

Proc. 1 Proc. M

port/socket

Host 2

IP address

Proc. 1 Proc. M

? ?

Multiplexing

port/socket

Page 60: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Application / Process

● Application: group or processes (at least 1 process)

● Process: part of an application which handles with some specific functions.

● Example:● Application: Remote Weather Monitoring

● Two process: 

– measure the weather (e.g. temperature)

– send the information to the its destination through a network.

● Some times: 1 application = 1 process

Page 61: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Mux / Demux

Mux: gathering data from multiple sockets, enveloping data with header (later used for demultiplexing)

Demux: delivering received segments to correct socket

Page 62: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  62

Connection / Connectionless

● Connection oriented: there are state­information about transfer status in both emitter and receiver.

● The TCP protocol.

● Required for congestion control, flow control, retransmissions, etc.

● Connectionless oriented: the opposite case

● The UDP protocol.

Page 63: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  63

Principles of Congestion Control

● Congestion: informally: “too many sources sending too much data too fast for network to handle” 

● manifestations:– lost packets (buffer overflow at routers)– long delays (queueing in router buffers)

Page 64: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  64

Causes/costs of congestion: scenario 1 ● two senders, two receivers● one router, infinite buffers ● no retransmission

● large delays when congested● maximum achievable throughput

unlimited shared output link buffers

Host Aλ in : original data

Host B

λ out

For connection

Page 65: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  65

Causes/costs of congestion: scenario 2 ● two senders, two receivers● one router, finite buffers ● sender retransmits lost packet ­­> more traffic to the network

finite shared output link buffers

Host A λ in : original data

Host B

λ out

λ 'in : original data, plus retransmitted data

Page 66: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  66

Fairness goal: if K TCP sessions share same bottleneck link of bandwidth C, each should have average rate of C/K

TCP connection 1

bottleneckrouter

capacity R

TCP connection 2

Fairness (only TCP­based service)

Page 67: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  67

Transport­layer end­to­end functionalities

­ End­to­end error detection 

­ End­to­end retransmissions 

­ Flow control 

­ Congestion control 

­ Fairness 

Page 68: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet transport protocols services

TCP service:connection­oriented: setup required between client and server processes

reliable transport between sending and receiving process

flow control: sender won’t overwhelm receiver 

congestion control: throttle sender when network overloaded

does not provide: timing, minimum throughput guarantees, security

UDP service:unreliable data transfer between sending and receiving process

does not provide: connection setup, reliability, flow control, congestion control, timing, throughput guarantee, or security 

Page 69: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet apps:  application, transport protocols

Page 70: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Internet Protocol Stack

application: supporting network applicationsFTP, SMTP, HTTP

transport: process­process data transferTCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring  network elements Ethernet, WLANs

physical: bits “on the wire/wireless”

Page 71: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  71

Aplicacions Internetapplicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

write programs that● run on (different) end 

systems● communicate over network● e.g., web server software 

communicates with browser software

No need to write software for network­core devices

● Network­core devices do not run user applications 

● applications on end systems  allows for rapid app development, propagation

Page 72: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

  72

Application Architectures

● Client­server● Peer­to­peer (P2P)● Hybrid of client­server and P2P

Page 73: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Client­server Architecture

server: ● always­on host● permanent IP address● server farms for scaling

clients:● communicate with server● may be intermittently 

connected● may have dynamic IP 

addresses● do not communicate directly 

with each other

Page 74: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

P2P Architecture

● no always­on server● arbitrary end systems 

directly communicate● peers are intermittently 

connected and change IP addresses

Highly scalable but difficult to manage

Page 75: A Network of Interconnected Objects The TCP/IP stackbbellalt/MCN_docs/MCN-Lecture1-Intro-TCPIPstack.pdfA Network of Interconnected Objects The TCP/IP stack Part of the material used

   

Example: requesting a web page

● Warriors of the Net:http://www.youtube.com/watch?v=Ve7_4ot­Dzs