31
UNIVERSITY OF AARHUS Department of Computer Science Network Protocols and Internetworking 03/09/2007 - 1 The Internet Protocol - IPv4 Lars M. Kristensen Department of Computer Science University of Aarhus Denmark

The Internet Protocol - IPv4

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 1

The Internet Protocol - IPv4

Lars M. KristensenDepartment of Computer ScienceUniversity of AarhusDenmark

Page 2: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 2

The Internetworking Model

Abstraction (TCP/IP software)

Network Interface layer

Internet Protocol layer

Application Protocol layer

Basic Network Level Services:Connectionless Packet Delivery Service (IP/UDP) (loss, duplication, and reordering).Reliable Stream Transport Service (IP/TCP).

Transparent interconnection of heterogeneous physical networks into a single uniform and virtual network

Page 3: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 3

Internet Addressing

Page 4: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 4

Internet AddressingMain goals:

Universal: hosts must be globally addressable.Routing/forwarding must be efficient.

Basic idea:Each host is assigned a 32-bit internet address.Addresses consists of a network identifier (prefix) and a host identifier (suffix).

Dotted decimal notation:Addresses by convention divided into 8-bit blocks and written in decimal notation separated by dots (.):Example:

10000000000010100000001000011110

10000000 00001010 00000010 00011110

128.10.2.30

Page 5: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 5

Original Classful Internet Addressing Scheme

Physical networks will have different number of hosts attached:

Page 6: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 6

Special AddressesNetwork address:

All bits for host identifier equal to 0.Example (class B network): 192.255.0.0

Directed broadcast (all hosts on a specified network):All bits for host identifier equal to 1.Usually implemented via hardware broadcast (if supported).Example (class B Network) : 192.254.255.255

Limited broadcast (all host on local network):All address bits set to 1: 255.255.255.255

Startup source address:All address bits set to 0: 0.0.0.0Use for identification when host has not yet an IP address.

Loopback address:Network prefix 127.0.0.0For testing and interprocess communication purposes on a machine.

Page 7: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 7

Example

IP addresses identifies network connections (interfaces).

Questions:Network address?Network class?Limited broadcast?Directed broadcast?

Page 8: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 8

DiscussionUnique network prefix for each physical network quickly exhausts the address space.

Subnetting alleviates this.

Static classful hierarchy leads to poor utilisation of the address space.

Classless addressing alleviates this.

IP adresss of a host must be changed if moved to another physical network.

Mobile IP developed to support mobile hosts.

IP addresses identifies network connections (interfaces).

Page 9: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 9

Address Resolution

Page 10: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 10

The ProblemCommunication on the physical networks uses physical network addresses (e.g., Ethernet):

Communication in an IP network uses IP addresses.

Address Resolution Problem: Mapping from IP addresses to physical addresses.

Page 11: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 11

The Address Resolution Protocol

Request-reply protocol:ARP request (broadcast)

ARP reply (unicast)

Page 12: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 12

ARP Protocol

ARP cache:Contains recently acquired IP-to-physical address bindings.Each cache entry has an associated timeout (~ 20 minutes).Reduces the number of broadcasts and delay.

Further refinements:Sender IP address typically contained in the ARP request.Gratuitous ARP request broadcast to inform of a new physical address.Early revalidation: refresh cache entry before timeout to avoid jitter (delays).

Page 13: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 13

ARP Protocol Format

HARDWARE TYPE: type of physical network (1 for Ethernet).PROTOCOL TYPE: higher-level protocol (0800 for IP).HLEN: length of hardware addresses.PLEN: length of higher-level protocol addresses.OPERATION: ARP request(1), ARP response (2).

Page 14: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 14

ARP Operation

ARP request (broadcast)

ARP reply (unicast)

Question:Sender HA/IP? Target HA/IP?

Page 15: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 15

Example

ARP messages for transmission of an IP datagram from host Lancelot to host Arthur via router Taliesyn?

Page 16: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 16

IPv4: Connectionless Datagram Delivery

Page 17: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 17

The Internet ProtocolService provided:

Unreliable: loss, duplication, delay, out-of-order delivery.Connectionless: each datagram (packet) treated independently.

Protocol components:Packet format: basic units of data transfer in an TCP/IP internet.Rules for forwarding of packets across multiple physical networks. Rules for packet processing and error signalling.

Page 18: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 18

The IPv4 Datagram

IP header is at least 20 octets.Maximum datagram size is 65,535 octets.

Page 19: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 19

FragmentationMaximum transfer units (MTU) differs between physical networks:

Multiple frames may be required to transmit the IP datagram.

Page 20: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 20

FragmentationOriginal IP datagram

IP datagram 1

IP datagram 2

IP datagram 3

IDENTIFICATION field used to group fragments belonging to the same original IP datagram.FRAGMENT OFFSET specifies offset in original datagram.FLAGS used to tag the last fragment.

Reassembly is only done at the final destination.

Page 21: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 21

IP Datagram Options

Page 22: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 22

Forwarding IP Datagrams

Page 23: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 23

IP Forwarding BasicsDirect delivery (by host or router):

IP destination of the datagram is on the same physical network.The network prefix can be used to determine whether direct delivery is possible.

Indirect delivery (by host):IP destination of the datagram is not on the same physical network.IP datagram is passed on to a router which forwards the datagramtowards the destination network.

Forwarding based upon the contents of routing tables.Content of routing tables computed by routing algorithms.Routing tables contains pairs consisting of a network prefix and a next-hop router IP address.

Page 24: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 24

Routing Example

Size of routing tables independent of the number of hosts.Routing table may also contain a default route.Routing table may also contain host routes.

Page 25: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 25

Forwarding Algorithm

Page 26: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 26

Forwarding and Addressing

ComputerComputer

10.0.0.4 40.0.0.8

10.0.0.440.0.0.8

Page 27: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 27

ICMP: Error and Control Messages

Page 28: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 28

Internet Control Message Protocol (ICMP)

Protocol for control and error reporting among hosts and routers.ICMP messages encapsulated in IP datagrams:

Page 29: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 29

ICMP Message Types

Examples of use:Testing reachability (ping).Reporting an unreachable destination.Tracing a route (traceroute).

Page 30: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 30

SummaryInternet Addressing:

Division into network prefix and host suffix.IP addresses identifies network connections (interfaces).

Address Resolution:ARP Protocol for mapping IP addresses to physical addresses.

IP Protocol:Unreliable connectionless delivery of datagrams.

IP Datagram Forwarding:Forwarding based on routing tables computed by routing protocols.Routing table entries are pairs (network prefix, next-hop IP address).

Error and Control Messages:ICMP Protocol for control, error reporting, and diagnostics.

Page 31: The Internet Protocol - IPv4

UNIVERSITY OF AARHUS

Department of Computer Science Network Protocols and Internetworking03/09/2007 - 31

Introduction to project 1

www.daimi.au.dk/NPaI/project1.html