Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

19
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross

Transcript of Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Page 1: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Internet Protocol

ECS 152B

Ref: slides by J. Kurose and K. Ross

Page 2: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Road Map

I. Introduction• Computer Networks Overview

• Layered architecture

II. IP Protocols • Internet Protocol • Routing protocols • ICMP and IGMP

III. Transport Layer• UDP• TCP

Page 3: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Goals

• Principles of network layer services

• Internet Protocol

– Addressing

– Routing

– ARP

– ICMP

Page 4: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Overview

HTTPUser

process SNMP

TCP UDP

ICMPICMP IPIP IGMPIGMP

ARP RARPHardwareinterface

applicationmessage

transportsegment

networknetworkdatagramdatagram

linkframe

Userprocess

Encapsulation

Demultiplexing

Page 5: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Network layer functions

• transport packet from sending to receiving hosts

• network layer protocols in every host, router

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Page 6: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Functions

• path determination: route taken by packets from source to dest. Routing algorithms

• forwarding: move packets from router’s input to appropriate router output

• call setup: some network architectures require router call setup along path before data flows (not Internet)

Page 7: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Network service model

Q: What service model for transporting packets from sender to receiver?

• guaranteed bandwidth?• preservation of inter-packet

timing (no jitter)?• loss-free delivery?• in-order delivery?• congestion feedback to

sender?

? ??virtual circuit

or datagram?

The most important abstraction provided

by network layer:

serv

ice a

bst

ract

ion

Page 8: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Virtual circuits

• call setup, teardown for each call before data can flow• each packet carries VC identifier (not destination host ID)• every router on source-dest path maintains “state” for each

passing connection• link, router resources (bandwidth, buffers) may be allocated to VC

– to get circuit-like perf.

“source-to-dest path behaves much like telephone circuit”

Page 9: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Virtual circuits: signaling protocols

• used to setup, maintain teardown VC• used in ATM, frame-relay, X.25• not used in today’s Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1. Initiate call 2. incoming call

3. Accept call4. Call connected5. Data flow begins 6. Receive data

Page 10: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Datagram networks: the Internet model

• no call setup at network layer• routers: no state about end-to-end connections

– no network-level concept of “connection”

• packets forwarded using destination host address– packets between same source-dest pair may take different

paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1. Send data 2. Receive data

Page 11: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Network layer service models:

NetworkArchitecture

Internet

ATM

ATM

ATM

ATM

ServiceModel

best effort

CBR

VBR

ABR

UBR

Bandwidth

none

constantrateguaranteedrateguaranteed minimumnone

Loss

no

yes

yes

no

no

Order

no

yes

yes

yes

yes

Timing

no

yes

yes

no

no

Congestionfeedback

no (inferredvia loss)nocongestionnocongestionyes

no

Guarantees ?

• Internet model being extended: Intserv, Diffserv

Page 12: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

VC vs. Datagram

• VC– Guaranteed service– Complexity

• Datagram– Simple– Best effort

Page 13: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Datagram or VC network: why?

Internet• data exchange among

computers– “elastic” service, no strict

timing req. • “smart” end systems (computers)

– can adapt, perform control, error recovery

– simple inside network, complexity at “edge”

• many link types – different characteristics– uniform service difficult

• application at the end system, easy to define new services

ATM• evolved from telephony• human conversation:

– strict timing, reliability requirements

– need for guaranteed service

• “dumb” end systems– telephones– complexity inside

network

Page 14: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Internet Protocol

• Functionality:– Determine how to route packets from source to

destination– Hide the details of the physical network– Unreliable, connectionless, datagram delivery

• To be studied:– Addressing– Routing– ARP– ICMP and IGMP

Page 15: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

Encapsulation

source destinationoriginal message

Transport

Network

Link

Application

Transport

Network

Link

Application

Page 16: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

IP header

ver length

32 bits

data (variable length,typically a TCP

or UDP segment)

16-bit identifier

Internet checksum

time tolive

32 bit source IP address

IP protocol versionnumber

header length (bytes)

max numberremaining hops

(decremented at each router)

forfragmentation/reassembly

total datagramlength (bytes)

upper layer protocolto deliver payload to

head.len

type ofservice

“type” of data flgsfragment

offsetupper layer

32 bit destination IP address

Options (if any) E.g. timestamp,record routetaken, specifylist of routers to visit.

20 bytes overhead

Page 17: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

IP Header

• Version: 4

• Header length: 4 bits, max 15x4=60 bytes

• TOS: 0 for normal service,

• Total length: 16 bits, max 65535 bytes

• TTL: 32/64, decrease by one in each hop

• Protocol field: TCP,UCP,ICMP,IGMP,etc.

• Checksum: header only

Page 18: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

IP Address

0network host

10 network host

110 network host

1110 multicast address

A

B

C

D

class1.0.0.0 to127.255.255.255

128.0.0.0 to191.255.255.255

192.0.0.0 to223.255.255.255

224.0.0.0 to239.255.255.255

32 bits

7 bits

14 bits

21 bits

28 bits

Class-based address:

Page 19: Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.

IP addressing: CIDR• Classful addressing:

– inefficient use of address space, address space exhaustion– e.g., class B net allocated enough addresses for 65K hosts,

even if only 2K hosts in that network

• CIDR: Classless InterDomain Routing– network portion of address of arbitrary length– address format: a.b.c.d/x, where x is # bits in network portion

of address

11001000 00010111 00010000 00000000

networkpart

hostpart

200.23.16.0/23