33
Computer Networks Fall 2012 (M 6:15-9:00 in Jbarry 201B) Mirela Damian http://www.csc.villanova.edu/~mdamian/CSC8400.html/ Slides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual, slightly altered by M.D. 1 The Internet is an Exciting Place The Internet is an Exciting Place 2

The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Embed Size (px)

Citation preview

Page 1: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Computer Networks

Fall 2012 (M 6:15-9:00 in Jbarry 201B)

Mirela Damian

http://www.csc.villanova.edu/~mdamian/CSC8400.html/

Slides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual, slightly altered by M.D. 1

The Internet is an Exciting PlaceThe Internet is an Exciting Place

2

Page 2: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Over Two Billion Internet Users

~5 Billion Devices (PCs, laptops,

smart phones, etc.)

3

Internet Applications

• Email– 1 9B people used email

• Blogs– 152M blogs1.9B people used email

– 294B emails sent /day

• Web

152M blogs

• Twitter– 100M new Twitter accountsWeb

– 255M Web sites (2011)

– 550M Web sites (2012)

100M new Twitter accounts

– 25B tweets

• Facebook• YouTube

– 2B videos watched /day

– 20M Facebook apps installed per day

– 35 hrs of video

uploaded/min

– 36B photos uploaded/yr

– almost 1B users

4http://mashable.com/2011/01/25/internet-size-infographic/

Page 3: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

How does the design of the Internet support growth and foster innovation?

5

The Internet is an Tense PlaceThe Internet is an Tense Place

6

Page 4: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Internet Traffic to/from Egypt

Page 5: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Stop Online Piracy Act (SOPA)

9

Network Neutrality

FCC Rules Against Comcast P2P Throttling

The U.S. Federal Communications Commission has ordered Comcast to stop interfering with peer-to-peer traffic on its broadband

10

peer traffic on its broadband network…

Page 6: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

IP Address Space Exhaustion

“Currently, the Internet is built using IPv4, but on February 3 2011 the global supply of unassigned IPv4February 3, 2011, the global supply of unassigned IPv4 Internet addresses was exhausted. On that date, the Internet Assigned Numbers Authority has distributed g ythe final five blocks of approximately 16 million IPv4 addresses among the five Regional Internet Registries.”

116 June 2012

Cyber Attacks

12

Page 7: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

How does the design of the Internet create or exacerbate these tensions?

13

What is the Internet?

Page 8: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Wikipedia:

The Internet is the worldwide, publicly accessiblek f i d k hnetwork of interconnected computer networks that

transmit data by packet switching using the standardInternet Protocol (IP) It is a "network of networks"Internet Protocol (IP). It is a network of networksthat consists of millions of smaller domestic, academic, business, and government networks, which , , g ,together carry various information and services, such as electronic mail, online chat, file transfer, and the interlinked Web pages and other documents of the World Wide Web.

http://en.wikipedia.org/wiki/Internet15

“Best-Effort Packet Delivery Service”

THE

packets

THE INTERNET

16

Page 9: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

“A Stack of Protocol Layers”

• Modularity– Each layer relies on services from layer below y y– Each layer exports services to layer above

• Interfaces– Hides implementation details– Layers can change without disturbing other layers

Application to application channels

Application

Host-to-host connectivity

Application-to-application channels

17

Link hardware

The Internet (TCP/IP) Protocol Suite

Applications

FTP HTTP TFTPNV

TCP UDP

HTTP FTP SMTP

TCP UDP

WaistIP

IP

NET1 NET2 NETn… Data link layer protocols

Ph i l lPhysical layer protocols

18

The Hourglass ModelThe waist facilitates interoperability

Page 10: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Example: HyperText Transfer Protocol

GET /index.html HTTP/1.1Host: www.csc.villanova.eduUser-Agent: Mozilla/4.03CRLF

RequestCRLF

HTTP/1 1 200 OKHTTP/1.1 200 OKDate: Mon, 27 Aug 2012 14:09:05 GMTServer: Netscape-Enterprise/3.5.1L t M difi d M 27 A 2012 11 12 23 GMTLast-Modified: Mon, 27 Aug 2012 11:12:23 GMTContent-Length: 21CRLF

Response

19

Site under construction

End Hosts vs. Routers

HTTP HTTP

host host

HTTP messageHTTP HTTP

TCP tTCP TCP

router router

TCP segment

IP IPIP IPIP packet

(datagram)

IP packetIP packet

Ethernetinterface

Ethernetinterface

Ethernetinterface

Ethernetinterface

SONETinterface

SONETinterface

frame

20

Page 11: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

21

00:20:af:03:98:28

Layers in the Example

Send HTTP RequestSend HTTP Request to neon

00:20:af:03:98:28

Page 12: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Establish a connection to 128.143.71.21 at port 80p

00:20:af:03:98:28

Layers in the Example

Open TCP connection to p128.143.71.21 port 80

00:20:af:03:98:28

Page 13: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Send a datagram (which contains a connection request) to 128 143 71 21request) to 128.143.71.21

00:20:af:03:98:28

Layers in the Example

Send IP datagram to 128.143.71.21

00:20:af:03:98:28

Page 14: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Send datagram to 128.143.137.1

00:20:af:03:98:28

Layers in the Example

Send Ethernet frame to 00:e0:f9:23:a8:20to 00:e0:f9:23:a8:20

00:20:af:03:98:28

Page 15: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Frame is an IP datagramdatag a

00:20:af:03:98:28

Layers in the Example

Send IP datagram to 128.143.71.21

00:20:af:03:98:28

Page 16: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Send datagram to 128.143.7.21

00:20:af:03:98:28

Layers in the Example

Send Ethernet frame to 00:20:af:03:98:28

32

00:20:af:03:98:28

Page 17: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layers in the Example

Frame is an IP datagram

33

00:20:af:03:98:28

Layers in the Example

IP datagram is a TCP segment for port 80

Page 18: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Different Views of Networking

• Different Layers of the protocol stack have a different view of the network This is HTTP’s and TCP’s view of the networkthe network. This is HTTP s and TCP s view of the network.

Argon128.143.137.144

Neon128.143.71.21

HTTP clientHTTPserver

HTTPserver

TCP client TCP serverTCP server

IP Network

35

Network View of IP Protocol

128.143.71.21128.143.137.144

Router

128.143.137.1 128.143.71.1

128.143.137.0/24Network

128.143.71.0/24Network

36

Page 19: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Network View of Ethernet

• Ethernet’s view of the network

Argon(128.143.137.144)

00 0 f9 23 8 20Router137

(128.143.137.1)

00:e0:f9:23:a8:20

Ethernet Network

37

Layers and Services

• Service provided by TCP to HTTP:reliable transmission of data over a logical connection– reliable transmission of data over a logical connection

• Service provided by IP to TCP:unreliable transmission of IP datagrams across an IP– unreliable transmission of IP datagrams across an IP network

• Service provided by Ethernet to IP:p y– transmission of a frame across an Ethernet segment

• Other services:• Other services:– DNS: translation between domain names and IP addresses

– ARP: Translation between IP addresses and MAC addresses

38

Page 20: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Sending a packet from Argon to Neon

DNS: What is the IP address

”of “neon.tcpip-lab.edu”?

39

Sending a packet from Argon to Neon

DNS: The IP address of

”“neon.tcpip-lab.edu” is 128.143.71.21

40

Page 21: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Sending a packet from Argon to Neon128.143.71.21 is not on my local network.yTherefore, I need to send the packet to my

default gateway with address 128.143.137.1

41

Sending a packet from Argon to Neon

ARP: What is the MAC address of 128.143.137.1?

Page 22: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Sending a packet from Argon to Neon

ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20

43

Sending a packet from Argon to Neon

128.143.71.21 is on my local network.Therefore, I can send the packet directly.

frame

44

Page 23: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Sending a packet from Argon to Neon

ARP: What is the MAC address of 128 143 71 21?address of 128.143.71.21?

frame

45

Sending a packet from Argon to Neon

ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28

frame

46

Page 24: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Sending a packet from Argon to Neon

frame

47

Encapsulation and Demultiplexing

• As data is moving down the protocol stack, each protocol is adding layer-specific control informationprotocol is adding layer-specific control information

HTTP

User data

HTTP

TCP

User dataHTTP Header

IP

TCP Header

TCP segment

User dataHTTP Header

Ethernet

TCP HeaderIP Header

TCP H dIP H dEth t Hd Eth t T il

IP datagram

User dataHTTP Header

U d tHTTP H d

48

TCP HeaderIP HeaderEthernet Hdr. Ethernet Trailer

Ethernet frame

User dataHTTP Header

Page 25: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Layer Encapsulation in HTTP

User A User B

Get index.html

Connection IDApp-to-app

channels

Application

Source/Destination

Li k Add

Host-to-host connectivity

channels

Link AddressLink hardware

49

What if the Data Doesn’t Fit?

Problem: Packet size

• On Ethernet, max IP packet is 1500 bytes

• Typical Web page is 10 kbytes

Solution: Split the data across multiple packets

GETindex.html

GET index html

50

GET index.html

Page 26: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

What if the Data gets Dropped?

Problem: Lost Data

InternetGET index.html

Solution: Timeout and Retransmit

GET index htmlGET index.html

InternetGET index.html

GET index.html

51

What if the Data is Out of Order?

Problem: Out of Order

GETx.htindeml

GET x.htindeml

Solution: Add Sequence Numbers

GET index html

ml 4 inde 2 x.ht 3 GET 1

52

GET index.html

Page 27: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Resource Allocation: Queues

• Sharing access to limited resourcesg– E.g., a link with fixed service rate

• Simplest case: first-in-first out queuep q– Serve packets in the order they arrive

– When busy, store arriving packets in a buffer

53

– Drop packets when the queue is full

Resource Allocation: Congestion Control

• What if too many folks are sending data?y g– Senders agree to slow down their sending rates

– … in response to their packets getting dropped

• The essence of TCP congestion control– Key to preventing congestion collapse of the Internet

54

Page 28: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Key Networking Concepts

• Protocols– Speaking the same languageSpeaking the same language– Syntax and semantics

• Layeringy g– Standing on the shoulders of giants– A key to managing complexity

R ll ti• Resource allocation– Dividing scare resources among competing parties– Memory link bandwidth wireless spectrum pathsMemory, link bandwidth, wireless spectrum, paths, …

• Naming– What to call computers, services, protocols, …

55

p p

Course Organization

56

Page 29: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

What You Learn in This Course

• Skill: network programming– Socket programmingSocket programming– Designing and implementing protocols

• Knowledge: how the Internet worksg– IP protocol suite– Internet architecture– Applications (Web e-mail P2P VoIP )Applications (Web, e-mail, P2P, VoIP, …)

• Insight: key concepts in networking– Protocols– Layering– Resource Allocation– Naming etc

57

– Naming, etc.

Structure of the Course (1st Half)

• Start at the bottom– Link technologies (Ethernet wireless )Link technologies (Ethernet, wireless, …)

• Then study the “narrow waist” of IP– IP best-effort packet-delivery servicey– IP addressing and packet forwarding

• And how to build on top of the narrow waist– Transport protocols (TCP, UDP)– Domain Name System (DNS)– Glue (ARP DHCP ICMP)Glue (ARP, DHCP, ICMP)

• How applications view the Internet– Sockets

58

Page 30: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Structure of the Course (2nd Half)

• Then how to get the traffic from here to there– Internet routing architecture (the “inter” in Internet)Internet routing architecture (the inter in Internet)– Intradomain and interdomain routing protocols

• Building applicationsg– Web and content-distribution networks– E-mail

P t fil h i– Peer-to-peer file sharing– Multimedia streaming and voice-over-IP

• Other approaches to building networksOther approaches to building networks– Circuit switching (e.g., ATM, MPLS, …)– More on wireless networks, multicast, P2P …

59

• Network Security

Learning the Material

• Lecture (Mirela Damian)When: M 6:15 9:00pm in Jbarry 201B– When: M 6:15-9:00pm in Jbarry 201B

– Office hours: M 4:00 – 5:00pm, W 1:30 – 3:30pm

– Slides available online at course Web siteSlides available online at course Web site

• Textbooks– Computer Networks: A Systems Approach (5th edition), by p y pp ( ), y

Peterson and Davie [Ok to use the 4rd edition]

• Online resources– E.g. on socket programming

60

Page 31: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Assignments

• OpNet Labs– Network simulation experimentsNetwork simulation experiments

• Hands-on Labs (networks lab)– Get real experience and using real equipmentg

• Programming– Sockets assignment– IP or TCP protocol assignment

• Research ProjectSurvey of a topic or implementing a protocol– Survey of a topic or implementing a protocol

– Project of your choice– Topic due before October 8th

61

p

Grading and Schedule

• Two exams (40%)

Assignments (45%)• Assignments (45%)

• Research Project (15%)

62

Page 32: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

Policies: Write Your Own Code

Programming in an individual creative process much like composition You must reach your ownlike composition. You must reach your own understanding of the problem and discover a path to its solution. During this time, discussions with friends g ,are encouraged. However, when the time comes to write code that solves the problem, such discussions are no longer appropriate - the program must be your own work.

63

Policies: Write Your Own Code

If you have a question about how to use some feature of C UNIX etc you can certainly ask your friends orof C, UNIX, etc., you can certainly ask your friends or the TA, but do not, under any circumstances, copy another person's program. Letting someone copy p p g g pyyour program or using someone else's code in any form is a violation of academic regulations. "Using someone else's code" includes using solutions or partial solutions to assignments provided by commercial web sites instructors preceptorscommercial web sites, instructors, preceptors, teaching assistants, friends, or students from any previous offering of this course or any other course.

64

previous offering of this course or any other course.

Page 33: The Internet is an Exciting PlaceThe Internet is an ...mdamian/Past/networksfa12/Notes/01Overview.pdfSlides by Rexford @ Princeton & Slides accompanying the Internet Lab Manual,

This Lecture

• Key concepts in networkingProtocols– Protocols

– Layers

– NamingNaming

– Resource allocation

65