Top Banner
Communications Services Connection Oriented Service A connection is established Data is sent or received over this connection Connection may be terminated when session is complete or may be permanent This paradigm is similar to telephone service Connectionless-Oriented Service There is no single connection established Data is organized in individual units called datagrams or packets Each datagram is individually addressed and individually processed This paradigm is similar to US Postal Service
25

Communications Services Connection Oriented Service A connection is established Data is sent or received over this connection Connection may be terminated.

Jan 04, 2016

Download

Documents

Beryl Newman
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Communications Services• Connection Oriented Service

A connection is established Data is sent or received over this connection Connection may be terminated when session is

complete or may be permanent This paradigm is similar to telephone service

• Connectionless-Oriented Service There is no single connection established Data is organized in individual units called datagrams

or packets Each datagram is individually addressed and

individually processed This paradigm is similar to US Postal Service

Page 2: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

The Internet

• The Internet protocols provide applications with both a connection and connectionless services

• The network layer, the data delivery service, provides only a connectionless service

• The basic unit of data processed by the network layer is the IP Datagram

• Each datagram is individually addressed and individually processed

• There is no guarantee that the datagrams that comprise a ‘session’ will follow the same path or that they will arrive in order

Page 3: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Position of IP in TCP/IP protocol suite

Page 4: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP Datagram

• IP datagram is variable length (up to 64K bytes)

• Data length can be as little as 1 byte• Source and IP addresses in the datagram

used route the datagram to its destination

Header Data

Destination IP Address

Source IP Address

Page 5: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Configuration for routing example

/8

/27 /27

/24 /24

Page 6: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Routing Table for R1

Mask Dest. Next Hop I.

255.0.0.0 111.0.0.0 -- m0255.255.255.224 193.14.5.160 - m2255.255.255.224 193.14.5.192 - m1-------------------------------------------------------------------------------------255.255.255.255 194.17.21.16 111.20.18.14 m0-------------------------------------------------------------------------------------255.255.255.0 192.16.7.0 111.15.17.32 m0255.255.255.0 194.17.21.0 111.20.18.14 m0-------------------------------------------------------------------------------------0.0.0.0 0.0.0.0 111.30.31.18 m0

Page 7: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Router R1 receives a datagram for destination 192.16.7.14; the algorithm applies the masks row by row to the destination address until a match (with the value in the second column) is found:

Example 1

Page 8: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Direct delivery

192.16.7.14 & 255.0.0.0 192.0.0.0 no match

192.16.7.14 & 255.255.255.224 192.16.7.0 no match

192.16.7.14 & 255.255.255.224 192.16.7. no match

Host-specific

192.16.7.14 & 255.255.255.255 192.16.7.14 no match

Network-specific

192.16.7.14 & 255.255.255.0 192.16.7.0 match

Page 9: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Router R1 receives a datagram for destination 193.14.5.176; the algorithm applies the masks row by row to the destination address until a match is found:

Example 2

Direct delivery

193.14.5.176 & 255.0.0.0 193.0.0.0 no match

193.14.5.176 & 255.255.255.224 193.14.5.160 match

Page 10: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Router R1 receives a datagram for destination 200.34.12.34; the algorithm applies the masks row by row to the destination address until a match is found:

Example 3

Page 11: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Direct delivery

200.34.12.34 & 255.0.0.0 200.0.0.0 no match

200.34.12.34 & 255.255.255.224 200.34.12.32 no match

200.34.12.34 & 255.255.255.224 200.34.12.32 no match

Host-specific

200.34.12.34 & 255.255.255.255 200.34.12.34 no match

Network-specific

200.34.12.34 & 255.255.255.0 200.34.12.0 no match

200.34.12.34 & 255.255.255.0 200.34.12.0 no match

Default

200.34.12.34 & 0.0.0.0 0.0.0.0. match

Page 12: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP Datagram Service

• Best-Effort delivery Datagrams could be lost Datagram delivery may be delayed Datagrams may arrive out of order Datagrams could arrive corrupted Datagrams might even be duplicated

• Upper layers must cope with these conditions

Page 13: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP datagram

Page 14: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP DatagramVERS Version number, now version 4

Version 6 slowly being deployed

HLEN Length of IP header in 32 –bit words

Service Type Intended as a service categoryMinimize delayMinimize costMaximize throughputMaximize reliability

Total Length Total length of datagramHeader + data

Page 15: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP Datagram

Identification Used to break up large datagrams

Flags

Fragment Offset Discussed later

Time to Live Count, decremented at each hop

When zero, datagram discarded

Page 16: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP Datagram

Protocol Specifies which upper layer protocol created datagram

TCP(6), UDP(17), ICMP(1)

Header Checksum Checksum applied to header only1-s complement sum of

16 bit words of headerSource IP addressDestination IP address

Page 17: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Network Byte Order

• Different processors store binary values differently

• Some store integers with most significant bits in low memory address positions

Big Endian• Others may store in reverse order

Little Endian• Standard for IP is Big Endian• Systems provide convenient conversion routines

Page 18: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Encapsulation

• An IP datagram inserted inside a frame at layer 2, such as Ethernet

Header Data

Ethernet Destination Address

Type = 0800

Ethernet Source AddressCRC

Page 19: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Demultiplexing

• A frame arrives at a host, say Ethernet

• Destination hardware address is compared

• Type field is checked• 0806 ARP frame• 0835 RARP frame• 0800 IP datagram

• If IP datagram, protocol field is checked• 1 ICMP• 6 TCP• 17 UDP

Page 20: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Maximum Transmission Unit(MTU)

• Most data link layers enforce a maximum frame size

• Maximum payload for Ethernet frames is 1500 bytes

• Other data link layers may impose even shorter frame lengths

• A datagram may travel over a path that includes different data link layers

• The smallest MTU in the path is called the path MTU

Page 21: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Fragmentation

• IP datagrams can be as much as 65,536 bytes• This cannot fit into most data link layer frames,

including Ethernet• The IP datagram must be broken down into

appropriate size fragments • The fragments will need to be reassembled at a

later point• Three fields in the IP datagram header control

fragmentation

Page 22: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

IP Header

Identification - a counter incremented by 1 for each datagram

Flags D = do not fragment

M = More fragments

Fragmentation Offset - relative position of fragment in original datagram (divided by 8)

D M

Page 23: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Fragmentation example

Page 24: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Detailed example

Page 25: Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.

Fragmentation

• The header of the original datagram is copied into each fragment with affected fields modified

• After fragmentation each fragment is treated as a separate datagram

• Reassembly of original datagram is done at final destination

• There is no guarantee that every fragment will reach its destination

• At destination, a reassembly timer is set• Either all fragments arrive in that time or all other

fragments discarded