ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

23
ECS152B Xin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu www.cs.ucdavis.edu/~liu/152B/152b.html
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    220
  • download

    0

Transcript of ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

Page 1: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

1

ECS 152BComputer Networks

Fall 2003

Prof. Xin Liuwww.cs.ucdavis.edu/~liu/152B/152b.html

Page 2: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

2

Highlights• prerequisites:

ECS150 and ECS152A

• make sure to follow up the newsgroup messages

ucd.class.ecs152bucd.class.ecs152b.d

• grading• Projects 40% • Midterm 20%• Homework 10%• Final 30%

Page 3: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

3Road Map

I. Introduction• Computer Networks Overview

• Layered architecture

II. IP Protocols • Internet Protocol

• Routing protocols

• ICMP and IGMP

III. Transport Layer• UDP• TCP

Page 4: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

4

Road Map

IV. Transport Layer Interfaces • Socket • Socket related system calls • I/O Multiplexing

V. Networking Applications • Network Library Routines • File Transfer Protocol (FTP) • HyperText Transfer Protocol

(HTTP) • Telnet / Remote Login • Domain Name System (DNS)• Remote Procedure Calls (RPC)

V. Other Topics

Page 5: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

5

Computer Networks

local network

localnetwork

Core network

internet: network of networks

Page 6: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

6

Protocols

• A protocol defines: – the format and the order of the messages exchanged– the actions on receipt/transmission of a message

host

Network Adapter

host

Network Adapter

ComputerNetwork

Page 7: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

7

Protocol Example

hello

yes?

2:30pm

time?

Time request:

TCP connection request

TCP connection reply

index.html

get http:www.cs.ucdavis.edu/~liu/

URL request:

(not necessarily typical:)

Page 8: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

8

Protocols

• Why use a protocol?

– to provide a common language

• There are so many protocols!

• Rules:

– must be unambiguous and followed exactly

• e.g., TCP/IP, IP (Internet Protocol)

Page 9: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

9

The Protocol Stack

Physical

Transport

Network

Link

Presentation

Session

Application

Old Saying: If you know what you are doing, four layers is enough; if you don’t seven won’t help.

Physical

Transport

Network

Link

Presentation

Session

Application

TCP, UDP

IPv4, IPv6

Ethernet…

HTTP, FTP…

OSI - 7 layers TCP/IP Suite – 4 layers

Page 10: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

10

Internet Protocol Suite• Layers provide information hiding

doesn’t matter what lower level layers use as long as higher layers use the same protocol

Link

Transport

Network

Application

Link

Transport

Network

Applicatione.g., supports network applications

e.g., transports application-layer messages

e.g., routes datagrams from one host to another

e.g., transmits individual bits within the frame

Page 11: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

11

Link Layer: review

• Transfer datagram from one node to adjacent node over a link

• Involves device driver in OS and network interface card

• Physically connecting hosts: encoding, framing, error detection/correction, reliable delivery, access control

• Example: Ethernet, token rings, etc.

“link”

Page 12: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

12

Network Layer

• Transport packet from sending to receiving hosts

• Network layer protocols in every host, router

• IP (Internet protocol): addressing, routing, forwarding

• Best effort, unreliable

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Page 13: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

13

Transport Layer• provide logical

communication between app processes running on different hosts

• transport protocols run in end systems

– segments, reassembles

• more than one transport protocol available to apps

• Internet: TCP and UDP

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysicalnetwork

data linkphysical

logical end-end transport

Page 14: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

14

Household analogy

• 12 kids sending letters to 12 kids

• processes = kids

• app messages = letters in envelopes

• hosts = houses

• transport protocol = Alice to Bob

• network-layer protocol = postal service

Page 15: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

15

Protocol Layers

Network

Link

Transport

Network

Link

Application

Transport

Network

Link

Application

HostA router HostB

• Simplifies implementationsegmentation/reassembly, error control, flow control,multiplexing, connection setup in different layers

• There also are some potential disadvantages

may duplicate functionality may need info in a non-adjacent layer (e.g., timestamp)

Network

Link

router

Page 16: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

16

Encapsulation

source destination

original message

Transport

Network

Link

Application

Transport

Network

Link

Application

Page 17: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

17

Demultiplexing

source destination

original message

Transport

Network

Link

Application

Page 18: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

18

The Internet Protocol Stack

source

original message

Transport

Network

Link

Application

Protocol Data Units

(PDU)

message

frame

segment

datagram

software

networkinterface card

software

mixed

Implementation

Page 19: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

19

Client-Server Model

server client

client = host that initiates the session (e.g., asks for a Web page; browser) server = host that gives the requested service

A typical network has two components: client and server

Page 20: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

20

Client-Server Model

• Client-server model:– Web, email, file transfer, remote login, news

group, p2p, etc.

• SETI@home project– SETI: Search for ExtraTerrestrial Intelligence– 3 million participants

Page 21: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

21

Our Class

• Upper layer protocols– Internet protocols– Transport protocols– Transport layer interface– Networking application

• Hands-on experience

Transport

Network

Application

clientserver

Page 22: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

22

Acronym

• Standardization – Internet Society (ISOC)– Internet Architecture Board (IAB)– Internet Engineering Task Force (IETF)– Internet Research Task Force (IRTF)

• RFC – Request for comments

Page 23: ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.

ECS152B Xin Liu

23

Suggested Reading

• TCP/IP Illustrated, Vol. 1, Chp. 1

• Review ECS 150, 152A