Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features...

Post on 21-Dec-2015

220 views 0 download

Tags:

Transcript of Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features...

Internet Protocol-IP

Objective

TCP/IP vs. OSI models CO vs. CL protocols IP Features

» Fragmentation» Routing

IP Datagram Format IPv6

Terminology

A Datagram consists of a header and data parts. A layer provides services to the layer above it. A protocol is a set of rules or conventions

governing the ways in which two entities (layers or applications) cooperate to exchange information.

List of protocols (one protocol per layer) is called a protocol stack.

OSI vs. TCP/IP model

TCP/IP Protocol Architecture Model

Some Protocols in TCP/IP Suite

CO vs. CL

CO – Connection Oriented» Modeled after the telephone system» When PDU are sequenced, I.e. logical connection

CL – Connectionless» Modeled after the postal system» When PDUs are not sequenced. Each PDU is

treated independently from each other.

IP is a CL protocol!

CL Internetworking

Advantages» Flexibility» Robust» No unnecessary overhead

Unreliable» Not guaranteed delivery

– packets can be lost, duplicated, damaged.

» Not guaranteed order of delivery– Packets can take different routes

» Reliability is responsibility of next layer up (e.g. TCP)

IP Features

The primary IP function is to accept data from TCP or UDP (User Datagram Protocol), create a datagram, route it through the network, and deliver it to recipient host.

IP is a network layer protocol that contains addressing information and some control information that enables packets to be routed.

IP relies on two tools to help it route datagrams:» Subnet mask» IP routing table

IP Features

If source and destination network and subnet parts are the same, then the destination host is in the same network and the routing is direct.

The datagram is wrapped in a frame and transmitted directly to its destination on the local LAN.

The destination address that is placed in the frame header must be the physical address of the destination.

ARP (Address Resolution Protocol) will be used to find the physical address of the destination.

IP Features

If destination is not on the local subnet, IP must consult its local routing table.

In such a case, the datagram is sent to the router specified in the routing table.

If no router (or default gateway) is found in the routing table, report error.

IP Features

Handling Incoming Datagrams:» The network interface software delivers a packet,

stripped of its frame header, to the IP layer. » If it is a host machine, IP layer delivers it to the upper

layer. » If the IP does not match that of its own, the host

discards it and initiates an ICMP packet to the source of the packet.

» If it is gateway, it re-routes the packet.

IP Features

IP has two primary responsibilities:» Providing CL, best-effort delivery of datagrams

through an internetwork; and» Providing fragmentation and reassembly of

datagrams to support data links with different maximum transmission unit (MTU) sizes.

IP Features

» Each LAN and WAN technology imposes a different size limit on its frames.

– For example, the maximum frame size of Ethernet (MTU) is 1500 bytes, which is far below the maximum size of an IP datagram.

– Maximum IP packet size is (65536) or 216

bytes.

» IP solves the size problem by chopping the datagram into several smaller datagrams called fragments.

– According to the IP, the gateways must be able to handle datagrams of size of at least 576 bytes.

» It is up to IP in the destination host to gather up the incoming fragments and rebuild the original datagram, before passing it to the upper layer.

» Fragmentation most often is performed in a router.» Fragmentation is a performance killer.

IP Features

When to re-assemble» At destination

– Results in packets getting smaller as data traverses internet

» Intermediate re-assembly– Need large buffers at routers– Buffers may fill with fragments– All fragments must go through same router

Inhibits dynamic routing

IP re-assembles at destination only

IP Fragmentation

Uses fields in header» Data Unit Identifier (ID)

– Identifies end system originated datagram Source and destination address Protocol layer generating data (e.g. TCP) Identification supplied by that layer

» Data length– Length of user data in octets

» Offset– Position of fragment of user data in original datagram– In multiples of 64 bits (8 octets)

» More flag– Indicates that this is not the last fragment

Fragmentation Example

Dealing with Failure

Re-assembly may fail if some fragments get lost Need to detect failure Re-assembly time out

» Assigned to first fragment to arrive» If timeout expires before all fragments arrive, discard

partial data Use packet lifetime (time to live in IP)

» If time to live runs out, kill partial data

IP: Datagram format

Header Fields (1)

Version» Currently 4» IP v6 - see later

Internet header length» In 32 bit words» Including options

Type of service Total length

» Of datagram, in octets

Header Fields (2)

Identification» Sequence number» Used with addresses and user protocol to identify

datagram uniquely Flags

» More bit» Don’t fragment

Fragmentation offset Time to live Protocol

» Next higher layer to receive data field at destination

Header Field (3)

Header checksum» Reverified and recomputed at each router» 16 bit ones complement sum of all 16 bit words in

header» Set to zero during calculation

Source address Destination address Options Padding

» To fill to multiple of 32 bits long

Type of Service

Precedence» Measurement of packet’s relative importance.» 8 levels

Reliability» Try not to drop the packet.» Normal or high

Delay» Try to minimize the delay for this packet.» Normal or low

Throughput» Choose a network with high bandwidth.» Normal or high

Options

Security» Attach classified information level to packet. For

DOD military application. RFC 1108. Source routing

» List of all routers. Route recording

» List of routers visited. Stream identification

» For special handling of voice and data Timestamping

» Add a timestamp at each router

Data Field

Carries user data from next layer up Integer multiple of 8 bits long (octet) Max length of datagram (header plus data)

65,535 octets

IPv6

IP v 1-3 defined and replaced IP v4 - current version IP v5 - streams protocol IP v6 - replacement for IP v4

» During development it was called IPng » Next Generation

Why Change IP

Address space exhaustion» 232 different addresses gives over 4 billion addresses

is not enough! » Due to growth of wireless, PDA, and Internet.

Other enhancements

IPv6 vs. IPv4

The changes from IPv4 to IPv6 are primarily in:» expanded addressing capabilities; » header format simplification; » improved support for extensions, options, and QoS; » flow labeling capability; and » consolidated authentication and privacy capabilities.

Status of IPv6

Smooth transition is key factor in success of IPv6 !!!

In reality, we have a slow adoption of IPv6. This is due to the invention of NAT.

NAT may work only with certain styles of applications, but not adequate for say IP telephony. Also, it does not scale very well.

The urge is not there yet, but surely growing!

Summary

IP is a network layer protocol IP is a best-effort, CL protocol. The main two responsibilities of IP is

fragmentation and routing. Deployment of IPv6 has been slowed down by

NAT techniques.

BREAK