fall 2010ceg 41882-1 ceg-4188 lecture 2: internetworking and the internet protocol (ip) prof. gregor...

35
Fall 2010 CEG 4188 2-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course notes are based on slides prepared by Drs. Makrakis and Shirmohammadi

Upload: berenice-lawrence

Post on 15-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-1

CEG-4188Lecture 2:

Internetworking andthe Internet Protocol (IP)

Prof. Gregor v. BochmannSITE - University of Ottawa

These course notes are based on slides prepared by Drs. Makrakis and Shirmohammadi

Page 2: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-2

Network LayerProvides the upper layers withindependence from the datatransmission and physicalnetworking technologies.Responsible for sending datafrom source to destination.

This includes the nodes in- between (and therefore it is not end-to-end)

Responsible for requestingnetwork facilities, such aspriority, bit-rate, etc…Responsible for routing.

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Session Layer

Presentation Layer

Application Layer

Page 3: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-3

Basic network functions• Data transfer (in packet switching mode)• Two modes of transfer:

– Connection-oriented (end-to-end connection must be established before data transfer can occur)

– Connection-less

• Addressing– Address identifies destination– Multicasting (broadcasting only over small networks)

• Additional features:– Ordered delivery– Flow control– Error control

Page 4: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-4

Connection-oriented vs. Connection-less

• Debate in the 1970ies• The connection-less IP protocol was adopted

– Simpler to realize, especially for inter-networking– Cannot provide ordered delivery, flow control and error

control (if this is required by application, TCP must be used)

• Circuit-switched networks favor connection-oriented service. Also in optical networks, technology favors connection-orientation. However, IP is expected to remain the main internetworking protocol.

Page 5: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-5

Internetworking

Internetworking is a scheme for interconnecting multiple networks of not identical technologies

Uses both hardware and software • Extra hardware positioned between networks • Software on each attached computer

System of interconnected networks is called an internetwork or an internet

Page 6: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-6

TCP/IP Protocol Suite vs. OSI

Page 7: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-7

Internetworking architecture

Page 8: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-8

Autonomous System (AS)• AS is a set of routers and networks managed

by a single organization.• AS consists of a group of routers exchanging

information via a common routing protocol.• Claiming that an AS is “connected”, means

that (excluding times of failures) there is always a “path” between any pair of nodes.

Page 9: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-9

Example: A 2-AS formed Internet

Page 10: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-10

A “possible” Internet Architecture(1)

Page 11: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-11

A “possible” Internet Architecture(3)

AS-5

AS-1

AS-4

AS-3AS-2

Page 12: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-12

Routing• Autonomous System

(AS): set of networks and routers operated by a single organization.

• Interior Router Protocol (IRP): passing routing information within and AS.

• Exterior Router Protocol (ERP): passing routing informationbetween different ASs.

Page 13: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-13

Routing Approaches

• Distance Vector Routing: each node exchanges information with its neighboring nodes; e.g. Routing Information Protocol (RIP).

• Link-state Routing: sends link costs of each of its network interfaces to all routers (not just neighboring). Typically used with a Dijkstera-based algorithm; e.g., Open Shortest Path First (OSPF).

• Path-vector Routing: router provides information about which networks can be reached by a given router and the ASs that must be crossed; e.g. Border Gateway Protocol (BGP).

Page 14: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-14

Internet Protocol (IP) v4

• defined in RFC 791

• part of TCP/IP suite

• will (eventually) be replaced by IPv6

Page 15: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-15

IP Header

Page 16: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-16

IP Header Fields• Version (4 bits): currently 4• Internet Header Length (4 bits)

– Minimum is 5, for 20 octets– Header may include options and padding

• Type of Service (8 bits)– rarely used, for differentiated services and congestion notification

• Total Length (16 bits) of datagram, in octets (header & data)• Identification (16 bits)

– Sequence number– Together with addresses and user protocol, this field identifies the

datagram uniquely (used for fragmentation)• Flags (3 bits)

– Only 2 bits used for fragmentation: More bit, and Don’t Fragment bit

Page 17: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-17

IP Header Fields (…)• Fragmentation offset ( 13 bits)

• Time to Live (8 bits)

• Protocol (8 bits)– Next higher layer to receive data field at destination

• Header Checksum (16 bits)– Re-verified and recomputed at each router

– 16 bit ones-complement sum of all 16 bit words in the header

• Source Address (32 bits)

• Destination Address (32 bits)

• Options (Security, timestamp, …)• Padding, to fill to multiple of 32 bits long

Following the header: Data field (contains user data): maximum lengths 65 535 octets

Page 18: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-18

Internetworking RequirementsAre they satisfied by IP ?

Design requirements: accommodate differences in constituting sub-networks:

1. Different maximum packet size2. Different addressing schemes3. Different network access mechanism4. Different maximum packet lifetime5. Different transmission modes (connection-oriented,

connectionless)6. Error control7. Flow control

Page 19: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-19

(1) Fragmentation and Reassembly: Why?• Main reason: Different maximal packet sizes

– Lower-level protocols may need to break data up into smaller blocks, an action called fragmentation

– Each network only accepts blocks of a certain size, or it has a minimum and maximum limit for the allowed size of data blocks (e.g. • ATM: 53 bytes cell size (48 payload + 5 control)• Ethernet frames: minimum size = 72 bytes; maximum size = 1526 bytes

• Other reasons– more efficient error control & smaller retransmission units– fairer access to shared facilities– Less waiting times of packets of higher priority in queues– smaller buffers

• Disadvantages– more bandwidth wasted in overhead related data– more interrupts & processing time

Page 20: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-20

PDUs and Fragmentation

Page 21: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-21

Fragmentation Example

Page 22: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-22

(2) Different Addressing Schemes

• Introduce IP address as a global address

• All hosts on the Internet must have a unique IP address– Exception: techniques such as NAT (network

address translation) allow private IP addresses that might be duplicated somewhere else.

– NAT is very common (because IP v4 does not have enough address space)

Page 23: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-23

IP Address Each IP address is divided into a prefix and a

suffix

• prefix identifies the network to which the computer is attached • suffix identifies the computer within that network • we allocate some bits for prefix, some for suffix (total of 32

bits)» large prefix, small suffix - many networks, few hosts per network » small prefix, large suffix - few networks, many hosts per network

Network numbers are unique

• assignment of network numbers must be coordinated globally; assignment of host addresses can be managed locally

Page 24: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-24

IP Address format

0 netid hostid

8

Class A

10 netid hostid

16

Class B

110 netid hostid

24

Class C

32

32

32

1110 Class D

32

multicast

Page 25: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-25

IP Address format

11110 Class EReserved for future use

Address Class No. of Networks No. of Hosts Comments

A 126 16777214 Very Large Networks

B 16384 65534 Medium Size Network

C 2097151 254 Large number of

small networks

Host id 0 is never assigned to an individual host. It refers to the network itself.

Page 26: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-26 26

Class A

Class C

Class B

Page 27: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-27

Subnets and Subnet Masks• Allow arbitrary complexity of internetworked LANs within

organization.• Insulate overall internet from growth of network numbers

and routing complexity.• To rest of internet, site looks like single network.

Page 28: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-28

Routing Using Subnets

Page 29: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-29

Address Mapping (ARP)

• Sometimes, in order to reach a destination, there is no need to go through an IP router.– E.g.?

• In that case, the physical address can be used directly.

Page 30: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-30

ARP (Address Resolution Protocol)

Page 31: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-31

(4) Different maximum packet lifetimeWhy limiting the maximum packet lifetime ?• Datagrams could loop indefinitely

– Consumes resources– Transport protocol may need upper bound on datagram lifetime

Solution proposed for IP:– Time To Live (TTL) field in IP header

• the value represents the maximum hop count• It is decremeted each time the packet passes through a router

– When the value of TTL becomes zero, the datagram is discarded (not forwarded)

– Note: This does not solve the problem of the Transport protocol, since the time waiting in a router is not bounded, so there is no enforced maximum lifetime, only a maximum hop count.

Page 32: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-32

Internetworking Requirements

Design requirements: accommodate differences in constituting networks:

1. Different maximum packet size2. Different addressing schemes3. Different network access mechanism (implemented

in each router, as required)4. Different maximum packet lifetime5. Different transmission modes (connection-oriented,

connectionless)6. Error control (not provided by IP)7. Flow control (not provided by IP)

Page 33: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-33

IP v6

Why Change IP ? • Address space exhaustion (this is the main reason)

– growth of networks and the Internet

• Requirements for new types of services– new addressing features– flow identification– features for resource allocation

• New header structure for more efficient processing

Page 34: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-34

IPv6 Enhancements (1)• Expanded IP address: 128 bit address space

– increase of address space by a factor of 296

– allows (on the order of) 6 1023 unique addresses per square meter of the surface of the earth, which seems inexhaustible.

• Improved (flexible) option mechanism – options are placed in separate optional headers ( between IPv6

header & transport- layer header).

– most optional headers are not examined/processed by any internet router on the packet's path.

– simplifies and speeds up IPv6 (vs. IPv4) packet routing processing.

– Easier to add additional options.

Page 35: Fall 2010CEG 41882-1 CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course

Fall 2010 CEG 4188 2-35

IPv6 Enhancements (2)

• dynamic address assignment (using address auto-configuration)• Increased addressing flexibility

– includes anycast & multicast

– anycast: packet is delivered to just one of a set of nodes. – scalability of multicast routing is improved by adding scope field to

multicast addresses.

• Support for resource allocation– labelled packet flows– distinguishes different flows coming from the same (IP address) source

(e.g. can identify a Video over IP or Voice over IP session (having real-time constraints) from a file transfer or web browsing session (which are fine with best effort treatment).