G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

33
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol

Transcript of G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Page 1: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

G64INC Introduction to Network Communications

Ho Sooi Hock

Internet Protocol

Page 2: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Outline

• Internetworking

• IP Addressing Hierarchy

• Classful vs. Classless Addressing

• Special IP Addresses

• IP Datagrams

• Fragmentation

Page 3: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Internetworking

• Existence of multiple network technologies today

• A need to interconnect heterogeneous networks to form single internet – hardware: routers connect different

physical networks

– protocol software: give the illusion that there is a single virtual (logical) network providing universal service

Page 4: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Internetworking Protocols

• The TCP/IP Reference Model – begun in the 1970s– the Internet has emerged into the

public domain in the 1990s– controlled by the Internet Engineering

Task Force (IETF)

• TCP/IP used the term host computer to refer to any system that connects to an Internet running applications

• Both hosts and routers use TCP/IP protocol software

Internet Reference Model

Page 5: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Directed Reading

• Open Systems Interconnect Reference Model (OSIRM)– Chapter 1: Introduction and Overview

1.6 to 1.9

Page 6: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Message Transmission Example

Page 7: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Position of IP in TCP/IP Protocol Suite

Page 8: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

The IP Address Hierarchy

• Every host is assigned a globally unique 32-bit address for identification

• Each 32-bit address is divided into two distinct parts – prefix: physical network to which a host is attached, also

known as network number

– suffix: a host attached to a given physical network, also known as host number

• Prefixes are coordinated globally and suffixes locally. Hence the former is unique but the latter can be duplicated

Page 9: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Classes of IP Address

• Size of prefix and suffix determines maximum number of networks and maximum number of hosts per network respectively

• IP defines different classes of address with different sized prefixes and suffixes

• The first four bits of the address specify the address class

Page 10: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

The Five Classes of IP Address

Page 11: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Division of the Address Space

• Public Internet network numbers are assigned by Internet Service Providers (ISPs) and these are coordinated by the Internet Assigned Number Authority

Page 12: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Default Masks for Classful Addressing

An Addressing Example

Page 13: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Routers and IP Addressing

• Routers are assigned two or more IP addresses• So are multi-homed computers

Page 14: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Special IP Addresses

Page 15: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Example of this host on this address

Page 16: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Network Addresses

Page 17: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Example of Direct Broadcast Address

Page 18: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Example of Limited Broadcast Address

Page 19: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Example of Loopback Address

Page 20: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

CIDR Notation • A large part of available addresses were wasted due

to the use of classful addresses• Classless addressing, known as CIDR (Classless

Interdomain Routing) was adopted• Network suffix can be any number of bits long,

rather being constrained to 8, 16 or 24 bits• CIDRized network address has the dotted decimal

form a.b.c.d/x.• x defines the number of mask bits and a.b.c.d is the

first address in the block (by setting 32-x bits to 0s) • More efficient allocation of IP addresses

Page 21: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

IP Datagrams

• Data are transmitted in small units called packets, with header added containing control information, e.g. addresses, data length etc.

• Internet protocols define a universal virtual packet – the IP datagram

• IP datagrams are switched across multiple physical networks via routers

• IP datagram can be at most 64K octets, including header and data

Page 22: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

IP Datagram Header Format

• TTL field used to prevent looping datagrams and used for tracing routes

Page 23: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Protocol Field and Encapsulated Data

Examples of Protocol Values

Page 24: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Routers and Routing Tables

• Each router forwards IP datagrams by matching the destination IP address of the IP header to entries in a local routing table

• Each entry consists of:– destination address– subnet mask

32 bit value that specifies the boundary between network prefix and suffix

– next hopIP address of a router orhardware interface that allows direct delivery

Page 25: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Example Routing Table

Page 26: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Binding Protocol Addresses

• An Internet packet passes through a series of routers – each hop takes it over a particular network, either

to a specific computer on that network or to the next router

– in either case, the sending host or router has to map between the protocol (IP) address and a hardware address

– this is known as address resolution

Page 27: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Address Resolution Protocol• TCP/IP defines the Address Resolution Protocol (ARP)

which defines the format of resolution requests and responses

• This technique is usually combined with local caching of hardware addresses

Page 28: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Frame Encapsulation

• Protocols– TCP – end to end,

identification by port numbers

– IP – host to host, identification by IP addresses

– Network Interface (Link Layer) – hop to hop (link to link), identification by MAC addresses

Page 29: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

MTU and Datagram Size • Maximum Transmission Unit

– maximum-sized packet that can be carried on a given physical network

• IP datagrams may have to cope with different MTU sizes as it passes over an internet

Page 30: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Fragmentation

• A datagram that is larger than MTU will be fragmented into smaller fragments

• Each datagram contains a fragment• Header fields indicate when the

data is a fragment and also where it belongs– identification, flags and fragment

offset MTUs for Some Networks

Page 31: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Fragmentation Example

• Reassembly done at the final host only– routers require less state information

– fragments can take different routes

• Whole datagram is lost if any fragment lost

Page 32: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Best Effort Delivery

• Connectionless Service• IP attempts best effort delivery and does not

guarantee to deal with:– datagram duplication

– delayed or out of order delivery

– corruption of data

– datagram loss

• These issues are dealt with by the next higher transport protocol i.e., TCP (Transmission Control Protocol)

Page 33: G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.

Acknowledgements

Most lecture slides used in this presentation are adopted from the same module taught in Nottingham, UK Campus, with addition of diagrams from the recommended texts by Douglas E. Comer and A. Forouzan.