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

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

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

Page 1: 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

Page 2: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

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

Introduction 1-42

A

B

C

src:B dest:A payload

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

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

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

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

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

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