1 school of computing science simon fraser university cmpt 771/471: internet architecture &...

31
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture & CMPT 771/471: Internet Architecture & Protocols Protocols Introduction Introduction Instructor: Dr. Mohamed Hefeeda Instructor: Dr. Mohamed Hefeeda

Post on 19-Dec-2015

221 views

Category:

Documents


1 download

TRANSCRIPT

1

School of Computing Science

Simon Fraser University

CMPT 771/471: Internet Architecture & CMPT 771/471: Internet Architecture & Protocols Protocols

IntroductionIntroduction

Instructor: Dr. Mohamed HefeedaInstructor: Dr. Mohamed Hefeeda

2

Course Objectives

Understand principles of designing and operating computer

networks structure and protocols of the Internet services that can/cannot be offered by the Internet

Know how to analytically analyze performance of a

system/protocol implement network protocols and applications

And, more importantly, … Have fun!

3

Course Info

Most of the course will be lectures given by the instructor

Last 2 weeks, each graduate student gives a presentation on one of a preselected networking topics

Course web page

http://nsl.cs.sfu.ca/teaching/09/771/

Or access it from my web page:

http://www.cs.sfu.ca/~mhefeeda

4

Course Info: Textbooks and References

Kurose and Rose, Computer Networking:  A top-down Approach Featuring the Internet, lastest ed.

Required Background materials Chapters 6 and 7: Wireless and Multimedia Networking

Hassan and Jain, High Performance TCP/IP Networking, 2004 

Several chapters on analyzing TCP/IP in different environments

Stallings, High-speed Networks and Internets: Performance and Quality of Service, 2002

Three chapters on (basics of) probability and queuing

Papers: will be posted on the course web page

5

Course Info: Grading

Homework and presentations: 20% 3 – 4 problem sets

Projects: 40% Several projects; some in group of two students All in C Must read Assignment Policy

Exam: 40% Comprehensive In the last week of classes (during class time)

6

Course Info: Topics

Internet Architecture and Services

TCP/IP Protocol Suit

Inter- and Intra-domain Routing Protocols

Introduction to Performance Modeling and Evaluation

TCP/IP Performance Modeling in Different Environments

Quality of Service Support in the Internet

Wireless Networks

Multimedia Networking

Overlays and Peer-to-Peer Computing

7

Basic Networking Concepts

8

Review of Basic Networking Concepts

Internet structure Protocol layering and encapsulation Internet services and socket programming Network Layer

Network types: Circuit switching, Packet switching Addressing, Forwarding, Routing

Transport layer Reliability and congestion control TCP, UDP

Link Layer Multiple Access Protocols Ethernet

9

The Internet

Millions of hosts (end systems) Inter-connected, running

network apps

Diverse communication links fiber, copper, radio, satellite

Routers forward packets

Internet: “network of networks”

loosely hierarchical Public, versus private intranet

local ISP

companynetwork

regional ISP

router workstation

servermobile

10

Internet structure: network of networks

roughly hierarchical at center: “tier-1” ISPs (e.g., MCI, Sprint, AT&T, Cable and

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

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)

11

Tier-1 ISP: e.g., Sprint

Sprint US backbone network

Seattle

Atlanta

Chicago

Roachdale

Stockton

San Jose

Anaheim

Fort Worth

Orlando

Kansas City

CheyenneNew York

PennsaukenRelay

Wash. DC

Tacoma

DS3 (45 Mbps)OC3 (155 Mbps)OC12 (622 Mbps)OC48 (2.4 Gbps)

to/from customers

peering

to/from backbone

….

………POP: point-of-presence

12

Internet structure: Tier-2 ISPs

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

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

13

Internet structure: Tier-3 ISPs

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

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

14

Internet structure: packet journey

a packet passes through many 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

15

Review of Basic Networking Concepts

Internet structure Protocol layering and encapsulation Internet services and socket programming Network Layer

Network types: Circuit switching, Packet switching Addressing, Forwarding, Routing

Transport layer Reliability and congestion control TCP, UDP

Link Layer Multiple Access Protocols Ethernet

16

Protocol Layers

Networks are complex! many “pieces”:

hosts routers links of various

media applications protocols hardware, software

Question: Is there any hope of organizing structure of

network?

Or at least our discussion of networks?

17

ticket (purchase)

baggage (check)

gates (load)

runway (takeoff)

airplane routing

departureairport

arrivalairport

intermediate air-trafficcontrol centers

airplane routing airplane routing

ticket (complain)

baggage (claim

gates (unload)

runway (land)

airplane routing

ticket

baggage

gate

takeoff/landing

airplane routing

Layering of Airline Functionality

Layers: each layer implements a service via its own internal-layer actions relying on services provided by layer below

18

Why layering?

Dealing with complex systems: explicit structure allows identifying complex

relationships among system’s pieces modularization eases maintenance, updating of

systemchange of implementation of layer’s service

transparent to rest of systeme.g., change in gate procedure doesn’t affect

rest of system What is the downside of layering?

19

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”

application

transport

network

link

physical

20

datagram

frame HtHnHl M

HtHn M

segment Ht M

message M

HtHnHl M

HtHn M

Ht M

M

application

transportnetwork

linkphysical

application

transportnetwork

linkphysical

linkphysical

networklink

physical

HtHnHl M

HtHn M

HtHnHl M

HtHn M

HtHnHl M HtHnHl M

source

destination

router

switch

Encapsulation

21

Review of Basic Networking Concepts

Internet structure Protocol layering and encapsulation Internet services and socket programming Network Layer

Network types: Circuit switching, Packet switching Addressing, Forwarding, Routing

Transport layer Reliability and congestion control TCP, UDP

Link Layer Multiple Access Protocols Ethernet

22

Internet Services

View the Internet as a communication infrastructure that provides services to apps

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

Two communication services Connectionless unreliable Connection-oriented reliable

23

Internet Services

Connection-oriented Prepare for data

transfer ahead of time

establish connection set up state in the two communicating hosts

Usually comes with reliability, flow and congestion control

TCP: Transmission Control Protocol

Connectionless No connection set up,

simply send

Faster, less overhead

No reliability, flow control, or congestion control

UDP: User Datagram Protocol

How can we access these services?

24

Network (Socket) Programming

Process sends/receives messages to/from its socket

Socket analogous to door sending process shoves

message out door sending process relies

on transport infrastructure on other side of door which brings message to socket at receiving process

process

TCP withbuffers,variables

socket

host orserver

process

TCP withbuffers,variables

socket

host orserver

Internet

controlledby OS

controlled byapp developer

Socket is the interface (API) between application and transport layer

25

Addressing Processes

For a process to receive messages, it must have an identifier

A host has a unique32-bit IP address

Q: does the IP address of the host on which the process runs suffice for identifying the process?

A: No, many processes can be running on same host

We use ports Process is identified by:

IP address, Transport protocol, and Port number

Example port numbers: HTTP server: 80 (TCP) Mail server: 25 (TCP)

26

Socket Programming

Socket API introduced in BSD 4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm provides two services

• reliable, byte stream-oriented • unreliable datagram

27

Socket Programming using TCP

TCP service: reliable transfer of bytes from one process to another

virtual pipe between sender and receiver

process

TCP withbuffers,

variables

socket

controlled byapplicationdeveloper

controlled byoperating

system

host orserver

process

TCP withbuffers,

variables

socket

controlled byapplicationdeveloper

controlled byoperatingsystem

host orserver

internet

28

Socket Programming using TCP

wait for incomingconnection requestconnectionSocket =welcomeSocket.accept()

create socket,port=x, forincoming request:welcomeSocket =

ServerSocket()

create socket,connect to hostid, port=xclientSocket =

Socket()

closeconnectionSocket

read reply fromclientSocket

closeclientSocket

Server (running on hostid) Client

send request usingclientSocketread request from

connectionSocket

write reply toconnectionSocket

TCP connection setup

29

Socket Programming using TCP

Server process must first be running, and creates a socket (door) that welcomes client’s contact,

then wait Client contacts server by creating local TCP socket using IP

address, port number of server process When client creates socket

client TCP establishes connection to server TCP

When contacted by client server TCP creates new socket for server process to

communicate with client• allows server to talk with multiple clients• source port numbers and IPs used to distinguish clients

30

Socket programming using UDP

UDP Service: unreliable transfer of groups of bytes (datagrams) between client and server

no connection between client and server no handshaking sender explicitly attaches IP address and port of

destination to each packet server must extract IP address, port of sender from

received packet

transmitted data may be received out of order, or lost

31

Socket Programming using UDP

closeclientSocket

Server (running on hostid)

create socket,clientSocket = DatagramSocket()

Client

read reply fromclientSocket

Create datagram (hostid,port=x,data)send datagram request using clientSocket

create socket,port=x, forincoming request:serverSocket = DatagramSocket()

read request fromserverSocket

write reply toserverSocketspecifying clienthost address,port number