31
Internet Protocol-IP

Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

Internet Protocol-IP

Page 2: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

Objective

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

» Fragmentation» Routing

IP Datagram Format IPv6

Page 3: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l 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.

Page 4: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

OSI vs. TCP/IP model

Page 5: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

TCP/IP Protocol Architecture Model

Page 6: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

Some Protocols in TCP/IP Suite

Page 7: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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!

Page 8: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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)

Page 9: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 10: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 11: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 12: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 13: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 14: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 15: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 16: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 17: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

Fragmentation Example

Page 18: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 19: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

IP: Datagram format

Page 20: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 21: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 22: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 23: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 24: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 25: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 26: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 27: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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

Page 28: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 29: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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!

Page 30: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

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.

Page 31: Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6

BREAK