+ All Categories
Home > Documents > ELEN602 Lecture 2

ELEN602 Lecture 2

Date post: 05-Jan-2016
Category:
Upload: claire
View: 23 times
Download: 0 times
Share this document with a friend
Description:
Review of Last Lecture Layering. ELEN602 Lecture 2. Many forms of communication networks around Postal mail, telephone, Internet etc. Generic steps involved in communication Addressing, name-to-address translation, transport, routing, delivery Forms of delivery Reliable, in-order - PowerPoint PPT Presentation
28
1 ELEN602 Lecture 2 Review of Last Lecture • Layering
Transcript
Page 1: ELEN602 Lecture 2

1

ELEN602 Lecture 2

• Review of Last Lecture

• Layering

Page 2: ELEN602 Lecture 2

2

Communication Networks

• Many forms of communication networks around

– Postal mail, telephone, Internet etc.

• Generic steps involved in communication

– Addressing, name-to-address translation, transport, routing, delivery

• Forms of delivery

– Reliable, in-order

– Unreliable, no acknowledgement

Page 3: ELEN602 Lecture 2

3

The user clicks on a link to indicate which document is to be retrieved.

The browser must determine the address that contains the document. It does this by sending a query to its local name server.

Once the address is known the browser establishes a connection to the specified machine, usually a TCP connection. In order for the connection to be successful, the specified machine must be ready to accept TCP connections.

The browser runs a client version of HTTP, which issues a request specifying both the name of the document and the possible document formats it can handle.

The machine that contains the requested document runs a server version of HTTP. It reacts to the HTTP request by sending an HTTP response which contains the desired document in the appropriate format.

The TCP connection is then closed and the user may view the document.

1.

2.

3.

4.

5.

6.

Steps in Web Surfing

Page 4: ELEN602 Lecture 2

4

HTTPserver

HTTPclient

Request

Response

Application level View

Page 5: ELEN602 Lecture 2

5

Steps in HTTP Transfer

• User selects document• Networking software locates the remote machine address &

establishes a 2-way connection• HTTP client sends request for document (GET )• HTTP daemon on remote machine interprets the GET message • Remote HTTP daemon sends the result of GET operation

– Result code, Description of the information, requested file• Remote HTTP daemon disconnects the connection• HTTP client displays the HTML content in the browser.

Page 6: ELEN602 Lecture 2

6

Domain Name Service

• DNS servers help resolve name-to-address translation

– Given a name such as ee.tamu.edu, find its IP address

• IP addresses = telephone numbers in phone network

• Machines (computers/network elements) know each other by IP addresses

• IP addresses are 32bits in IPv4.

• DNS protocol allows name-to-IP address resolution

– Similar to phone directory assistance (411 or 555-1212)

Page 7: ELEN602 Lecture 2

7

DNS Example (cont’d)

• QNAME = ee.tamu.edu, QCLASS = IN QTYPE = A

• QNAME = ee.tamu.edu QCLASS = IN QTYPE = A

– IN A 165.91.241.199

• The application will now use 165.91.241.199 whenever it needs to contact ee.tamu.edu

Page 8: ELEN602 Lecture 2

8

HTTPserver

HTTPclient

TCP TCP

GET 80, #

#, 80 STATUS

Port 80

Ephemeral

Port #

A more detailed view - Transport protocol

Page 9: ELEN602 Lecture 2

9

Email and SMTP

• Web transfers use HTTP, email uses SMTP (Simple Mail Transfer Protocol) - Application level protocols

• Sender - Local SMTP Server -- Remote SMTP Server - Receiver

• SMTP uses Port 25, HTTP uses port 80

• POP (Post Office Protocol) may be used if receiver not on all the time.

Page 10: ELEN602 Lecture 2

10

• Sender establishes TCP Connection to SMTP server

• Sends HELO message -identifying itself to SMTP server

• Client sends sender’s email address

• SMTP server acknowledges with 250 if successful

• Client sends receiver’s email address

• SMTRP server acknowledges with 250

• Client sends a DATA message - requesting permission to send email message

• SMTP server sends OK-to-send message

• Client transfers the email message

• SMTP server returns ack with a message ID

• Client indicates that the transfer is complete.

• SMTP confirms the receipt of End-of-transfer message

Page 11: ELEN602 Lecture 2

11

nentity

n-PDUs

nentity

Abstract View

Page 12: ELEN602 Lecture 2

12

n+1entity

n-SAP

n+1entity

n-SAP

n entity n entity

n-SDU

n-SDU

n-SDU

H

H n-SDU

n-PDU

Layering in General

Page 13: ELEN602 Lecture 2

13

n-SDU

n-PDU n-PDU n-PDU

n-SDU

n-PDU n-PDU n-PDU

Segmentation Reassembly

n-PDU

n-SDU

n-PDU

Blocking Unblocking

n-SDUn-SDUn-SDUn-SDUn-SDU

(a)

(b)

Data Units at different layers

Page 14: ELEN602 Lecture 2

14

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

NetworkLayer

Electrical and/or Optical Signals

Application A Application B

Data LinkLayer

PhysicalLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

Communication Network

OSI Seven-layer Model

Page 15: ELEN602 Lecture 2

15

C

PS

PS

C

PSPS

C

C

C

PS = packet switch

C = computer

Packet-Switched Network

Page 16: ELEN602 Lecture 2

16

G

G

G

G

G

net 1

net 2

net 3

net 4

net 5

G = gateway/router

G

An Internetwork

Page 17: ELEN602 Lecture 2

17

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

Application A Application Bdata

data

data

data

data

data

data

ah

ph

sh

th

nh

dh

bits

dt

Headers and Trailers

Page 18: ELEN602 Lecture 2

18

ApplicationLayer

TransportLayer

InternetLayer

NetworkInterface

ApplicationLayer

TransportLayer

InternetLayer

NetworkInterface

(a) (b)

TCP/IP Network Architecture

Page 19: ELEN602 Lecture 2

19

Application

Transport

Internet

Network Interface

Application

Transport

Internet

Network Interface

Internet

Network Interface

Network 1 Network 2

Machine A Machine B

Router/Gateway

IP Layer and Network Interface Layer

Page 20: ELEN602 Lecture 2

20

HTTP SMTP RTP

TCP UDP

IP

Network

Interface 1

Network

Interface 3

Network

Interface 2

DNS

IP Hour-Glass Protocol Graph

Page 21: ELEN602 Lecture 2

21

Net Interface

IP

TCP

HTTP

Net Interface

IP

Net Interface

IP

TCP

HTTP

Ethernet PPP

Router

router

(1,1)

s

(1,2)

w

(2,1)

(1,3) r

(2,2)

PPP

Ethernet

(a)

(b)

Server PC

Page 22: ELEN602 Lecture 2

22

IP Header

Header containssource and destination physical addresses; network protocol type

Frame Check Sequence

Ethernet Header

IP Datagram on an Ethernet

Page 23: ELEN602 Lecture 2

23

HTTP Request

TCP Header

Header contains source and destination port numbers

Header contains source and destination IP addresses; transport protocol type

IP Header

Header contains source and destination physical addresses; network protocol type

Frame Check Sequence

Ethernet Header

Page 24: ELEN602 Lecture 2

24

Application 1

Socket

socket interface

user

kernel

Application 2

user

kernel

Underlying communication

Protocols

Underlying communication

Protocols

Communications network

Socket

socket interface

Page 25: ELEN602 Lecture 2

25

socket()

bind()

listen()

read()

close()

socket()

connect()

read()

write()

close()

blocks until server receivesa connect request from client

data

data

Server

Clientaccept()

write()

connect negotiation

Page 26: ELEN602 Lecture 2

26

socket()

bind()

sendto()

close()

socket()

bind()

recvfrom()

sendto()

close()

blocks until serverreceives data from client data

data

Server

Client

recvfrom()

Page 27: ELEN602 Lecture 2

27

User Interface

User PI

User DTP

PI = Protocol interpreter

DTP = Data transfer process

User FTP

Server PI

Server DTP

Server FTP

Control

Connection

Data

Connection

Page 28: ELEN602 Lecture 2

28

C:\WINDOWS>ping nal.toronto.edu

Pinging nal.toronto.edu [128.100.244.3] with 32 bytes of data:

Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243

C:\WINDOWS>


Recommended