Computer Networks and the Internet 2011-02-19

Post on 09-Mar-2015

123 views 1 download

Transcript of Computer Networks and the Internet 2011-02-19

1.5 Internet structure & ISPsInternet backbone:

Tuyến đường chuyển đổi dữ liệu lớnHạ tầng kết nối giữa các mạng với nhauHỗ trợ chuyển dữ liệu, thông tin giữa các quốc gia,

các vùng địa lý khác nhau trên khắp thế giới.ISP (Internet Service Provider)

Tier 1: không cần thiết phải trả chi phí cho IP, kết nối ngang hàng với tier 1 khác

Tier 2: trả chi phí IP, và trả chi phí cho một số phần của internet

Tier 3: trả chi phí cho các mạng khác để có thể tiếp cận được internet

Tier-1 networksRoughly hierarchicalAt center: “tier-1” ISP (e.g UUNet,

BBN/Genuity, Sprint, AT&T, …), national/international coverage

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-1 providers interconnect (peer) privately

NAP

Tier-1 providers also interconnect at public network access points (NAPs)

Tier 1 ISPs

Tier 2 ISPsQuy mô nhỏ hơn (thông thường theo từng khu

vực)Kết nối với 1 hay nhiều hơn Tier 1 ISPKết nối với Tier 2 ISP khác

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

NAP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

Tier-2 ISP pays tier-1 ISP for connectivity to rest of Internet tier-2 ISP is customer oftier-1 provider

Tier-2 ISPs also peer privately with each other, interconnect at NAP

Tier 3 ISP (local ISP)Điểm chuyển cuối, gần với người dùng nhất

(end-user)

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

NAP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

localISPlocal

ISPlocalISP

localISP

localISP Tier 3

ISP

localISP

localISP

localISP

Local and tier- 3 ISPs are customers ofhigher tier ISPsconnecting them to rest of Internet

Internet Connectivity Distribution

ISP: Internet Service ProviderPoP: Point of presenceIXP: Internet exchange point

Network of Networks

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

NAP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

localISPlocal

ISPlocalISP

localISP

localISP Tier 3

ISP

localISP

localISP

localISP

Chapter 1: Roadmap1.1 What is the Internet?1.2 Network edge1.3 Network core1.4 Network access and physical media1.5 Internet structure and ISPs 1.6 Delay & loss in packet-switched

networks1.7 Protocol layers, service models1.8 History

Delay & Loss in Packet-Switched NetworksWhat can happen to a packet as it travels

from source to destination host?

A

B

packet being transmitted (delay)

packets queueing (delay)

free (available) buffers: arriving packets dropped (loss) if no free buffers

Delay typesNodal processing delay: sự chậm trễ tại

routerQueuing delay: sự chậm trễ ở hàng đợi

buffersTransmission delay: thời gian cần thiết để

truyền tảiPropagation delay: là tỷ lệ chậm trễ giữa

khoảng cách và tốc độ truyền giữa 2 routers.

A

B

propagation

transmission

nodalprocessing queueing

Nodal Processing DelayThời gian cần thiết

Kiểm tra packet headerXác định đường đi và địa chỉ đến kế tiếpKiểm tra lỗi bit-levelChuyển packet đến hàng đợi.(queue – buffer)

Queuing DelayThời gian chờ đợi đến lượt chuyển đi của

packetSự chậm trễ ở hàng đợi (queue) phụ thuộc

vàoSố lượng packets có trên hàng đợiSự tắc nghẽn hay thông thoáng trên đường

truyền.

Transmission delayStore-and-forward delay được tính theo công

thức L/RThời gian để truyền xong packet vào liên kếtKí hiệu

Dung lượng của packet (length of packet): L (bits)

Tốc độ truyền (transmission rate): R (bits/sec)Ex: Tốc độ của Ethernet link là 10Mbps thì R =

10Mbps

Propagation delayThời gian cần thiết để truyền packet từ điểm

nguồn (source) đến điểm đích (destination) (e.g. from router A to router B).

Propagtion speed phụ thuộc vào phương tiện vật lý của liên kết. (multimode fiber, twisted-pair copper wire, etc)

2*108 meters/sec – 3*108 meters/secKhoảng cách giữa 2 router là d, tốc độ truyền

của liên kết giữa 2 router là sPropagation delay là tỷ lệ giữa khoảng cách liên

kết và tốc độ truyền (d/s)

Caravan analogy

Car s travel “propagate” at 100 km/hr. A caravan 10 cars travel together

Car ~ bit, caravan ~ packet Toll booth takes 12 seconds to service a car (e.g. transmit a bit) First car arrives at a toll booth, and waits for 9 cars have arrived (a

caravan cars must be stored at the toll booth before forwarded). Time to push out a caravan to high way from toll booth 1

12 seconds*10 cars = 120 seconds = 2 minutes Time for last car propagate from 1st to 2nd toll booth

toll booth

toll booth

ten-car caravan

100 km

100 km

Nodal delay

dproc = processing delayThông thường khoảng vài micro giây

dqueue = queue delayPhụ thuộc vào mật độ trên đường truyền

dtrans = transmission delay= L/R, phụ thuộc vào tốc độ đường truyền

dprop = propagation delayKhoảng một vài đến hàng trăm micro giây.

proptransqueueprocnodal ddddd

Queuing Delay (revisited)R = link bandwidth (bps)L = packet length (bits)a = average packet arrival rate

La/R ~ 0: average queuing delay smallLa/R -> 1: delays become largeLa/R > 1: more “work” arriving than can be serviced,

average delay infinity.The golden rules in trafiic: design system La/R <= 1

Traffic intensity = La/R

Real Internet “Delay and Routes”Traceroute program: cung cấp các chỉ số

chậm trễ từ nguồn (source) đến router trên đường đến đích (destination)Gửi 3 packets đến router kế tiếpRouter sẽ gửi trả lời cho người gửiKhoảng thời gian giữa gửi và nhận

(transmission and reply)

3 probes

3 probes

3 probes

Real Internet “Delay and Routes”

Three dealy measurements from server to router “10.33.6.20”

Means no response (probe lost, router not replying)

Packet lossQueue has finite capacity of buffer (depend on

switch design and cost)When packet arrives to full queue, packet is

dropped (packet lost)The fraction of lost packet increase the traffic

intensityThe performance of node is often measured not

only delay but also the probability of packets loss.

A lost packet maybe retransmitted on an end-to-end

End-to-End Delay

Q – 1 routersdproc = processing delay at each routerdtrans = transmission delay at each router = L/Rdprop = propagation delay between each pair routerR is transmission rate out of each router and out of source hostL is packet size

Source Destination

dend-to-end = Q(dproc + dtrans + dprop)

Chapter 1. Roadmap1.1 What is the Internet?1.2 Network edge1.3 Network core1.4 Network access and physical media1.5 Internet structure and ISPs1.6 Delay & loss in packet-switched

networks1.7 Protocol layers, service models1.8 History

Protocol “layers”Networks are

complex! many “pieces”:

hostsrouterslinks of various

mediaapplicationsprotocolshardware,

software

Question: Is there any hope of organizing structure

of network?

Or at least our discussion of

networks?

Organize of air travelticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

a series of steps

Organize of air travel (difference view)

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

Layers: each layer implements a servicevia its own internal-layer actionsrelying on services provided by layer below

Layered air travel: servicesCounter-to-counter delivery of person+bags

baggage-claim-to-baggage-claim delivery

people transfer: loading gate to arrival gate

runway-to-runway delivery of plane

airplane routing from source to destination

Distributed implementation of layer functionality

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

Dep

art

ing

air

port

arr

ivin

g

air

port

intermediate air traffic sites

airplane routing airplane routing

Tại sao phải phân lớp?Dùng cho các hệ thống phức tạp

xác định rõ ràng cấu trúc, mối liên hệ tương quan giữa các thành phần. Phân lớp nhằm tạo mô hình tham chiếu (tham khảo)

Dễ dàng duy trì, bảo dưỡng, và nâng cấp Khả năng thay đổi chức năng hay dịch vụ của từng

lớp mà không làm ảnh hưởng tới các lớp khác.

Internet Protocol Stackapplication: supporting network

applicationsFTP, SMTP, HTTP

transport: host-host data transferTCP, UDP

network: routing of datagrams from source to destinationIP, routing protocols

link: data transfer between neighboring network elementsPPP, Ethernet

physical: bits “on the wire”

application

transport

network

link

physical

Layering: logical communicationapplicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

Each layer:distributed“entities”

implement layer functions at each node

entities perform actions, exchange messages with peers

Layering: logical communicationapplicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

data

transport

transport

ack

E.g.: transport take data from

appadd addressing,

reliability check info to form “datagram”

send datagram to peer

wait for peer to ack receipt

analogy: post office

Layering: physical communicationapplicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

Protocol layering and data

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

source destination

M

M

M

M

Ht

HtHn

HtHnHl

M

M

M

M

Ht

HtHn

HtHnHl

message

segment

frame

Each layer takes data from aboveadds header information to create new data

unitpasses new data unit to layer below

Chapter 1. Roadmap1.1 What is the Internet?1.2 Network edge1.3 Network core1.4 Network access and physical media1.5 ISPs and Internet backbones1.6 Delay & loss in packet-switched

networks1.7 Internet structure and ISPs1.8 History

Internet History1961-1972: Early packet-switching principles

1961: Kleinrock - queueing theory shows effectiveness of packet-switching

1964: Baran - packet-switching in military nets

1967: ARPAnet conceived by Advanced Research Projects Agency

1969: first ARPAnet node operational

1972: ARPAnet

demonstrated publiclyNCP (Network Control

Protocol) first host-host protocol

first e-mail programARPAnet has 15 nodes

Internet History1972-1980: Internetworking, new and proprietary nets

1970: ALOHAnet satellite network in Hawaii

1973: Metcalfe’s PhD thesis proposes Ethernet

1974: Cerf and Kahn - architecture for interconnecting networks

late70’s: proprietary architectures: DECnet, SNA, XNA

late 70’s: switching fixed length packets (ATM precursor)

1979: ARPAnet has 200 nodes

Cerf and Kahn’s internetworking principles:minimalism, autonomy

- no internal changes required to interconnect networks

best effort service model

stateless routersdecentralized control

define today’s Internet architecture

Internet History1990, 2000’s: commercialization, the Web, new apps

Early 1990’s: ARPAnet decommissioned

1991: NSF lifts restrictions on commercial use of NSFnet (decommissioned, 1995)

early 1990s: Webhypertext [Bush 1945,

Nelson 1960’s]HTML, HTTP: Berners-Lee1994: Mosaic, later

Netscape late 1990’s:

commercialization of the Web

Late 1990’s – 2000’s:more killer apps:

instant messaging, peer2peer file sharing (e.g., Naptser)

network security to forefront

est. 50 million host, 100 million+ users

backbone links running at Gbps

Problems1. Giả sử rằng giữa máy tính nhận và máy tính gửi

có 1 router. Tỷ lệ chuyển đổi dữ liệu giữa máy tính gửi và router, và giữ router với máy tính nhận lần lượt là R1 và R2. Giả sử router sử dụng chuyển mạch gói lưu trữ và chuyển tiếp (store-and-forward). Hãy xác định tổng chậm trễ end-to-end để gửi một gói tin có độ lớn L. (Bỏ qua sự chậm trễ ở hàng đợi và truyền dữ liệu trên liên kết.)

R1 R2

Tính dend-to-end = ?

2. Có 2 host A và B kết nối với nhau qua đường truyền có tốc độ R bps. Khoảng cách giữa A và B là m meters, cho rằng tốc độ truyền dữ liệu (propagation speed) trên đường truyền là s meters/s. Host A gửi một packet có dung lượng L bits đến host B.

- Viết công thức tính propagation delay, dprop , sử dụng m và s.

- Xác định thời gian truyền (transmission time), dtrans , sử dụng L và R.

- Giả sử s = 2.5*108 m/s, L = 100 bits, R = 28kpbs. Tìm khoảng cách m giữa sao cho dprop = dtrans .