20
LECTURE 2 Networking Primer

LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

LECTURE 2Networking Primer

Page 2: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

2

Visualizing the Internet

¨ millions of connected computing devices: hosts, end-systems¤ pc’s workstations, servers

¤ Tablets, smartphones, toasters

running network apps

¨ communication links¤ fiber, copper, radio, satellite

¨ routers: forward packets (chunks) of data thru network

local ISP

companynetwork

regional ISP

router workstation

servermobile

Page 3: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

3

Internet structure: network of networks

¨ roughly hierarchical¨ national/international backbone

providers (NBPs)¤ e.g. BBN/GTE, Sprint, AT&T, IBM,

UUNet¤ interconnect (peer) with each other

privately, or at public Network Access Point (NAPs)

¨ regional ISPs¤ connect into NBPs

¨ local ISP, company¤ connect into regional ISPs

NBP A

NBP B

NAP NAP

regional ISP

regional ISP

localISP

localISP

Page 4: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

4

National Backbone Providere.g. Sprint US backbone network

Page 5: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

5

Links between computers

¨ Point to point link -- a direct cable or wire that is dedicated for use between the computers.

¨ Multiple access link -- shared between many nodes -- example a bus, wireless medium etc.

Page 6: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

6

Why structure ?

¨ Direct connectivity does not scale -- all computers cannot be directly connected to each other.

¨ Need organization¤ End hosts -- clients and servers -- usually house

information ¤ Routers and switches -- nodes that are primarily used

for relaying information -- sending information where it needs to go.

Page 7: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

7

What’s a protocol?

¨ The definition of a behavior --set of rules¨ Here: the format of a communication exchange: ¨ Sequence of actions, format of information, predefined interpretation

Hi

Hi

Got thetime?

2:00

connectionreq.

connectionreply.

Get http://gaia.cs.umass.edu/index.htm

<file>time

Page 8: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

8

Packets

¨ Packets are similar to postal letters -basic units of information¤ From, to, content

¤ Postman handles all packets similarly

¤ Addressing is hierarchical.

¨ The protocol that defines how packets are to be “routed” is the Internet Protocol or IP.¤ Hierarchical addresses like in the postal world.

Page 9: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

9

Organization of air travel

¨ a series of steps

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

Page 10: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

10

Organization of air travel: a different view

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

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

Page 11: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

11

Internet protocol stack¨ application: supporting network applications

¤ ftp, smtp, http

¨ transport: host-host data transfer¤ tcp, udp

¨ network: routing of datagrams from source to destination¤ ip, routing protocols

¨ link: data transfer between neighboring network elements¤ ppp, ethernet, wireless link

¨ physical: bits “on the wire or wireless” --representation, signal modulation.

application

transport

network

link

physical

Page 12: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

12

Why layering?

Dealing with complex systems:¨ modularization eases maintenance, updating of system

¤ change of implementation of layer’s service transparent to rest of system

¤ e.g., change in gate procedure doesn’t affect rest of system

¨ Isolating “functions” and interactions components¤ layered reference model for discussion

Page 13: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

13

Layering: logical communication

applicationtransportnetwork

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

Page 14: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

14

Layering: logical communication

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

dataE.g.: transport¨ take data from app¨ add addressing,

reliability check info to form “datagram”

¨ send datagram to peer

¨ wait for peer to ackreceipt

¨ analogy: post office

data

transport

transport

ack

Page 15: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

15

Layering: physical communication

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

Page 16: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

16

Message flow through stack

M

M1 M2H H

M1H M2HH H

• At each layer, headers added.

• A protocol defines maximum packet size -- might require higher layer packet to be fragmented.

Page 17: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

17

Protocol layering and data

Each layer takes data from above¨ adds header information to create new data unit¨ passes new data unit to layer below

applicationtransportnetwork

applicationtransportnetwork

source destination

M

M

M

M

H t

H tH n

H tH nH l

M

M

M

M

H t

H tH n

H tH nH l

message

segment

datagram

framelinkphysical

linkphysical

Page 18: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

18

The network edge:¨ end systems (hosts):

¤ run application programs¤ e.g., WWW, email¤ at “edge of network”

¨ client/server model¤ client host requests, receives service

from server¤ e.g., WWW client (browser)/ server;

email client/server

¨ peer-peer model:¤ host interaction symmetric¤ e.g.: Gnutella, KaZaA

Page 19: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

19

Network edge: connection-oriented service

Goal: data transfer between end sys.

¨ 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 connection-oriented

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

Page 20: LECTURE 2 - UCR Computer Science and Engineeringkapic001/teaching/files/Lecture2-Cs169.pdf · 2 Visualizing the Internet ¨ millions of connected computing devices: hosts, end-systems

20

Network edge: connectionless service

Goal: data transfer between end systems

¤ same as before!¨ UDP - User Datagram Protocol [RFC 768]: Internet’s

connectionless service

¤ unreliable data transfer¤ no flow control¤ no congestion control