COMP 562: “Advanced Topics in Networking” Qian Zhang Spring 2009 HKUST Introduction 1-1.

Post on 20-Jan-2016

215 views 0 download

Transcript of COMP 562: “Advanced Topics in Networking” Qian Zhang Spring 2009 HKUST Introduction 1-1.

COMP 562: “Advanced Topics in Networking”

Qian Zhang

Spring 2009

HKUST

Introduction 1-1

Course Info

Instructor: Qian Zhang

www.cs.ust.hk/~qianzh Course web site

http://www.cs.ust.hk/~qianzh/comp562-2009/comp562-index.htm

contains all notes, announcements, etc. Check it regularly! Lecture schedule

Tuesday/Thursday 12:00-13:20 Rm 2463

Introduction 1-2

Course Info Textbook: James Kurose and Keith Ross

Computer Networking: A Top Down Approach, 4th ed. Addison Wesley, 2007

http://wps.aw.com/aw_kurose_network_4/ with useful resource material

The reading materials online for paper reading and reviewing Experience networking research through team projects (1-2

students) Understand what is good research Hands-on experience in networking research Appreciate team work / collaborations Survey oriented (own idea is encouraged)

Introduction 1-3

Course Info Grading scheme

Homework (2) 30 points Paper presentation (1) 15 points Project report (1) 15 points Final Exam 40 points

Paper presentation Everyone reviews and presents 1 paper Email me ids of 3 papers that you’d like to present

by Feb. 27 Present the paper and give your own comments

on the selected paper

Introduction 1-4

More about Class Project Can be individual project or group project (at most 2

in a group) Two types I can see:

Survey a problem in depth (read several papers related to the problem and summarized/ discuss)

Do some research on a given problem Sample project topics:

Most commercial systems (e.g. PPlive) are not based on open source. Try to deduce the algorithm for specific p2p streaming applications

Introduction 1-5

Course Schedule Review of the basic principles of computer networking Broadcasting and Multicasting Peer-to-Peer Networking Wireless Networking Multimedia Networking and Quality of Service Provision Advanced Topics for Congestion Control Network Security Student presentation

Introduction 1-6

Introduction 1-7

Chapter 1Introduction

Computer Networking: A Top Down Approach ,4th edition. Jim Kurose, Keith RossAddison-Wesley, July 2007.

A note on the use of these ppt slides:The notes used in this course are substantially based on powerpoint slides developed and copyrighted by J.F. Kurose and K.W. Ross, 2007

Chapter 1: roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-8

What’s the Internet: “nuts and bolts” view

Millions of connected computing devices:

hosts = end systems Running network apps

Introduction 1-9

Home network

Institutional network

Mobile network

Global ISP

Regional ISP

router

PC

server

wirelesslaptop

cellular handheld

wiredlinks

access points

Communication links Fiber, copper, radio,

satellite Transmission rate =

bandwidth

Routers: forward packets (chunks of data)

What’s the Internet: “nuts and bolts” view

Protocols control sending, receiving of msgs

E.g., TCP, IP, HTTP, Skype, Ethernet

Internet: “network of networks”

Loosely hierarchical Public Internet versus private

intranet Internet standards

RFC: Request for comments IETF: Internet Engineering Task

Force

Introduction 1-10

Home network

Institutional network

Mobile network

Global ISP

Regional ISP

What’s the Internet: A Service View Communication

infrastructure enables distributed applications:

Web, VoIP, email, games, e-commerce, file sharing

Communication services provided to apps:

Reliable data delivery from source to destination

“Best effort” (unreliable) data delivery

Introduction 1-11

Chapter 1: Roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-12

A Closer Look at Network Structure:

Network edge: applications and hosts

Introduction 1-13

Access networks, physical media: wired, wireless communication links

Network core: Interconnected routers Network of networks

The Network Edge: End systems (hosts):

Run application programs E.g. Web, email At “edge of network”

Introduction 1-14

client/server

peer-peer

Client/server model Client host requests, receives

service from always-on server E.g. Web browser/server; email

client/server

Peer-peer model: Minimal (or no) use of dedicated

servers E.g. Skype, BitTorrent

Network Edge: Reliable Data Transfer Service

Goal: data transfer between end systems

Handshaking: setup (prepare for) data transfer ahead of time

Hello, hello back human protocol

Set up “state” in two communicating hosts

TCP - Transmission Control Protocol

Internet’s reliable data transfer service

TCP service [RFC 793] Reliable, in-order byte-

stream data transfer Loss: acknowledgements and

retransmissions Flow control:

Sender won’t overwhelm receiver

Congestion control: Senders “slow down sending

rate” when network congested

Introduction 1-15

Network Edge: Best Effort (Unreliable) Data Transfer Service

Goal: data transfer between end systems

same as before! UDP - User Datagram

Protocol [RFC 768]: Connectionless Unreliable data

transfer No flow control No congestion control

App’s using TCP: HTTP (Web), FTP (file

transfer), Telnet (remote login), SMTP (email)

App’s using UDP: streaming media,

teleconferencing, DNS, Internet telephony

Introduction 1-16

Access Networks and Physical Media

Q: How to connect end systems to edge router?

Residential access nets Institutional access

networks (school, company)

Mobile access networks

Keep in mind: Bandwidth (bits per

second) of access network?

Shared or dedicated? Introduction 1-17

Chapter 1: roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-18

The Network Core Mesh of interconnected

routers

The fundamental question: how is data transferred through net?

Circuit-switching: dedicated circuit per call: telephone net

Packet-switching: data sent thru net in discrete “chunks”

Introduction 1-19

Network Core: Circuit Switching

End-end resources reserved for “call”

Link bandwidth, switch capacity

Dedicated resources: no sharing

Circuit-like (guaranteed) performance

Call setup required

Introduction 1-20

Network Core: Circuit Switching

Network resources (e.g., bandwidth) divided into “pieces”

Pieces allocated to calls Resource piece idle if not

used by owning call (no sharing)

Introduction 1-21

Dividing link bandwidth into “pieces” Frequency division Time division

Network Core: Packet Switching

Each end-end data stream divided into packets

User A, B packets share network resources

Each packet uses full link bandwidth

Resources used as needed

Introduction 1-22

Resource contention: Aggregate resource demand

can exceed amount available

Congestion: packets queue, wait for link use

Store and forward: packets move one hop at a time Node receives complete

packet before forwardingBandwidth division into

“pieces”Dedicated allocationResource reservation

Packet Switching: Statistical Multiplexing

Sequence of A & B packets does not have fixed pattern, shared on demand statistical multiplexing

TDM: each host gets same slot in revolving TDM frame Introduction 1-23

A

B

C100 Mb/sEthernet

1.5 Mb/s

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet Switching versus Circuit Switching

Great for bursty data Resource sharing Simpler, no call setup

Excessive congestion: packet delay and loss Protocols needed for reliable data transfer, congestion

control Q: How to provide circuit-like behavior?

Bandwidth guarantees needed for audio/video apps Still an unsolved problem

Is packet switching a “slam dunk winner?”

Introduction 1-24

Internet Structure: Network of Networks

Roughly hierarchical At center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T, Cable and

Wireless), national/international coverage Treat each other as equals

Introduction 1-25

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-1 providers interconnect (peer) privately

Internet Structure: Network of Networks

“Tier-2” ISPs: smaller (often regional) ISPs Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs

Introduction 1-26

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

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.

Internet Structure: Network of Networks

“Tier-3” ISPs and local ISPs Last hop (“access”) network (closest to end systems)

Introduction 1-27

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

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

Chapter 1: roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-28

How do Loss and Delay Occur?

Packets queue in router buffers Packet arrival rate to link exceeds output link capacity Packets queue, wait for turn

Introduction 1-29

A

B

packet being transmitted (delay)

packets queueing (delay)

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

Four Sources of Packet Delay

1. Nodal processing: Check bit errors Determine output link

Introduction 1-30

2. Queueing Time waiting at output

link for transmission Depends on congestion

level of router

A

Bnodal

processing queueing

Delay in Packet-Switched Networks

3. Transmission delay: R=link bandwidth (bps) L=packet length (bits) Time to send bits into

link = L/R

4. Propagation delay: d = length of physical link s = propagation speed in

medium (~2x108 m/sec) propagation delay = d/s

Introduction 1-31

propagation

transmission

Note: s and R are very different quantities!

A

Bnodal

processing queueing

Nodal Delay

dproc = processing delay Typically a few microsecs or less

dqueue = queuing delay Depends on congestion level in the router

dtrans = transmission delay = L/R, significant for low-speed links

dprop = propagation delay A few microsecs to hundreds of msecs

Introduction 1-32

proptransqueueprocnodal ddddd

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

Introduction 1-33

A

B

packet being transmitted

packet arriving tofull buffer is lost

buffer (waiting area)

Throughput Throughput: rate (bits/time unit) at which bits

transferred between sender/receiver Instantaneous: rate at given point in time Average: rate over long(er) period of time

Introduction 1-34

server, withfile of F bits

to send to client

link capacity

Rs bits/sec

link capacity

Rc bits/sec pipe that can

carryfluid at rate

Rs bits/sec)

pipe that can carryfluid at rate

Rc bits/sec)

server sends bits

(fluid) into pipe

Chapter 1: roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-35

Internet Protocol Stack Application: supporting network

applications FTP, SMTP, HTTP

Transport: process-process data transfer

TCP, UDP Network: routing of datagrams from

source to destination IP, routing protocols

Link: data transfer between neighboring network elements

PPP, Ethernet Physical: bits “on the wire”

Introduction 1-36

application

transport

network

link

physical

Chapter 1: roadmap

1.1 What is the Internet?

1.2 Network edge End systems, access networks, links

1.3 Network core Circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

1.6 Networks under attack: security

Introduction 1-37

Network Security Attacks on Internet infrastructure:

Infecting/attacking hosts: malware, spyware, worms, unauthorized access (data stealing, user accounts)

Denial of service: deny access to resources (servers, link bandwidth)

Internet not originally designed with (much) security in mind

Original vision: “a group of mutually trusting users attached to a transparent network”

Internet protocol designers playing “catch-up” Security considerations in all layers!

Introduction 1-38

What Can Bad Guys Do: Malware?

Spyware: Infection by downloading

web page with spyware Records keystrokes, web

sites visited, upload info to collection site

Virus Infection by receiving

object (e.g., e-mail attachment), actively executing

Self-replicating: propagate itself to other hosts, users

Introduction 1-39

Worm: Infection by passively receiving

object that gets itself executed Self-replicating: propagates to

other hosts, users

Sapphire Worm: aggregate scans/sec in first 5 minutes of outbreak (CAIDA, UWisc data)

Denial of Service Attacks Attackers make resources (server, bandwidth)

unavailable to legitimate traffic by overwhelming resource with bogus traffic

Introduction 1-40

1. Select target

2. Break into hosts around the network (see malware)

3. Send packets toward target from compromised hosts

target

Sniff, Modify, Delete Your PacketsPacket sniffing:

Broadcast media (shared Ethernet, wireless) Promiscuous network interface reads/records all packets (e.g.,

including passwords!) passing by

Introduction 1-41

A

B

C

src:B dest:A payload

Ethereal software used for end-of-chapter labs is a (free) packet-sniffer

More on modification, deletion later

Masquerade as you IP spoofing: send packet with false source address

Introduction 1-42

A

B

C

src:B dest:A payload

Masquerade as you IP spoofing: send packet with false source address Record-and-playback: sniff sensitive info (e.g., password), and

use later Password holder is that user from system point of view

Introduction 1-43

A

B

C

src:B dest:A user: B; password: foo

Masquerade as you IP spoofing: send packet with false source address Record-and-playback: sniff sensitive info (e.g., password), and

use later Password holder is that user from system point of view

Introduction 1-44

A

B

later …..C

src:B dest:A user: B; password: foo

Introduction: SummaryCovered a “ton” of material! Internet overview What’s a protocol? Network edge, core, access network

Packet-switching versus circuit-switching

Internet structure Performance: loss, delay, throughput Layering, service models Security

Introduction 1-45