the internet protocol - 2

21
159.334 Computer Networks 159.334 Computer Networks The Internet Protocol - 2 Professor Richard Harris School of Engineering and Advanced Technology (SEAT)

Upload: others

Post on 12-Sep-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Internet Protocol - 2

159.334 Computer Networks159.334 Computer Networks

The Internet Protocol - 2

Professor Richard Harris

School of Engineering and AdvancedTechnology (SEAT)

Page 2: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/22

159.334 Computer Networks159.334 Computer Networks

Presentation Outline

Page 3: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/33

159.334 Computer Networks159.334 Computer Networks

Learning Objectives

You will be able to:

Discuss the format of IP packets

Apply internet addressing to sample problems

Perform allocation of hosts and subnets to meetrequirements for IP network design.

Page 4: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/44

159.334 Computer Networks159.334 Computer Networks

References

Tanenbaum, “Computer Networks”, 4th Edition

Forouzan, “Data Communications and Networking”, 4th

Edition

Cisco CCNA1 Module 10 - part 1

Stallings, William 2000 ‘Data and ComputerCommunications’, Prentice Hall, Sixth Edition

Russell, Travis 1997 ‘Telecommunications Protocols’,McGraw Hill

Page 5: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/55

159.334 Computer Networks159.334 Computer Networks

Special Purpose Addresses - 2

The special address 255.255.255.255 is known asthe limited broadcast address

This address can only be used as a destination address

Send a packet to all the hosts on the local subnet.

Packets cannot be relayed to any other network outside ofthe local one.

The special addresses A.255.255.255 orB.B.255.255 or C.C.C.255 are referred to asdirected broadcast message addresses.

Packets sent to these addresses are intended to reachall hosts within the Class A, B or C networksrespectively.

Page 6: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/66

159.334 Computer Networks159.334 Computer Networks

Special Purpose Addresses - 3

A consequence of this special purpose addressing is thatno subnet is allowed to have a null number, or a numberthat is expressed entirely in binary ones.

If we use 3 bits for the subnet number, for example, then wecan use only the values from 1 - 6.

In addition, we cannot have a subnet with a number that isonly one bit long!!!

In addition to the above special addresses, Internetnumbering authorities have reserved other special“multicast” addresses as well.

Page 7: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/77

159.334 Computer Networks159.334 Computer Networks

Special Purpose Addresses - 4

Multicast addresses224.0.0.1 = All systems on this subnet

224.0.0.2 = All routers on this subnet

Examples

Some unknown host (source)Any host (destination)Host 3 in Class B network 129.34Some host in network 129.34 (source)Any host in 129.34 (destination)Host number 3 on this network (source)This host (local loop)

Addresses Description

0.0.0.0255.255.255.255129.34.0.3129.34.0.0129.34.255.2550.0.0.3127.0.0.1

Page 8: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/88

159.334 Computer Networks159.334 Computer Networks

Internet Protocol - Introduction

The Internet Protocol will now be presented in moredetail.

The components of interest are:Formats

Procedures

Service types

Fragmentation

Reassembly

Options

Page 9: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/99

159.334 Computer Networks159.334 Computer Networks

Internet Header - 1

012345678901234567890123456789011 2 3

Version IHL Type of service Total Length

Identification

Protocol

Flags

Header Checksum

Source Address

Destination Address

PaddingOptions

Fragment Offset

Time to live

The following diagram shows the Internet Headerdetails:

Page 10: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1010

159.334 Computer Networks159.334 Computer Networks

Internet Header - 2

The header must carry source and destination information,parameters for use by the routers in the network and optiondetails.

We review the first 32 bits of the header below:

IHL Type of service Total LengthVersion

Version: Currently is version ‘4’

IHL: Internet header length, expressed in 32-bit words(Varies from 5 to 15 depending on options present)

Type of Service: Packet’s precedence and desired routing.

Total Length: Number of octets contained in the packet(including the packet header). As this field is 16 bits longthis limits the packet size to 65,535 octets.

Page 11: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1111

159.334 Computer Networks159.334 Computer Networks

Internet Header - 3

The identification, flags and fragment offset will beconsidered in more detail a little later.

The second 32 bit section is presented below:

Identification Flags Fragment Offset

Page 12: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1212

159.334 Computer Networks159.334 Computer Networks

Internet Header - 4

The third 32 bit word of the header:

Time to live Protocol Header Checksum

Time to live: This was supposed to be measured in seconds andrepresented the maximum lifetime in the network.Decremented by one after passing through a router. Ifzero, the packet should be destroyed. More detail later.

Protocol: When the packet reaches its destination, this field isused to determine which program should be passedthe packet. (See later for possible programs.)

Header Checksum:This is computed as the 16-bit one’s complement sumof all 16-bit words in the header after zeroing thechecksum field itself.

Page 13: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1313

159.334 Computer Networks159.334 Computer Networks

Internet Header - 5

The fourth and fifth 32 bit words from the header are thesource and destination addresses

Source Address

Destination Address

Page 14: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1414

159.334 Computer Networks159.334 Computer Networks

Internet Header - 6

The Sixth 32 bit word from the header

Options Padding

Options: This field was defined for the specific purpose of requestingparticular routing for some packets. A packet can carry severaloptional parameters - all concatenated together.

Padding: This field simply contains “No Op” fields to follow the optionsinformation where required.

Page 15: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1515

159.334 Computer Networks159.334 Computer Networks

Protocol Numbers

As mentioned above, the protocol field is used to identify theprogram to run when the packet is received at the destination.

The following table lists some of these programs:

01234568

172938808889

255

ProtocolKeywordDecimal

ICMPIGMPGGPIPSTTCPEGPUDPISO-TP4IDPR-CMTPISO-IPIGRPOSPF

ReservedInternet Control MessageInternet Group ManagementGateway to GatewayIP in IP (encapsulation)StreamTransmission ControlExterior Gateway ProtocolUser DatagramISO-Transport Protocol Class 4IDPR-Control Messager Transport ProtocolISO- Internet Protocol (CLNP)IGRPOpen Shortest Path FirstReserved

Page 16: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1616

159.334 Computer Networks159.334 Computer Networks

Precedence and Type of Service Field

The type of service field actually carries two sub-fieldsPrecedence

An indication of priority

Type of service

An indication for routing

Precedence Type of service

D T R C

0 1 2 3 4 5 6 7

D - Delay; T - Throughput; R - Reliability; C - Cost

Page 17: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1717

159.334 Computer Networks159.334 Computer Networks

Precedence

The precedence indicator affects queueing.

If several packets are awaiting transmission on the samechannel, the one with the highest precedence issupposed to be sent first.

There are eight preference values, viz:

111 - Network Control110 - Inter-network Control101 - CRITIC-ECP100 - Flash Override011 - Flash010 - Immediate001 - Priority000 - Routine

Page 18: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1818

159.334 Computer Networks159.334 Computer Networks

Type of Service

Often there is more than one route to adestination. These routes may have quitedifferent characteristics. Eg telephone circuits,satellite links, radio channels,…

We want to indicate to the routing protocols howwe would like the packet to be routed.

As indicated above, the four types of service areD, T, R and C:

D - Delay: This is a mechanism for requesting low delays (avoidsatellite links)

T - Throughput: Select path with highest throughput (avoid telephonelinks)

R - Reliability: Highest reliability (avoid radio channels)

C - Cost: Cheapest route

Page 19: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/1919

159.334 Computer Networks159.334 Computer Networks

Fragmentation and Reassembly - 1

Internetworking programs need to pass packets from one networkto another.

Sometimes this means that the packets are the wrong size andthey would be rejected or broken into more manageable pieces.

The sizes used may be related to the maximum size but it is morecommon to have them related to the data rate of the network or tothe expected/known error rate.

The IP Header contains specific fields to manage thefragmentation and reassembly process involved in interworkingbetween networks.

Version IHL Type of service Total Length

Identification Flags Fragment Offset

Network

Page 20: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/2020

159.334 Computer Networks159.334 Computer Networks

Fragmentation and Reassembly - 2

The flags field has three bits.

The first bit is reserved for future use and must be set tozero.

The DF bit means don’t fragment. If this bit is set, thenthe router should discard the packet if it is too large. (AnICMP error message needs to be returned to the sourceaddress - if possible.)

The MF bit means more fragments to follow.

Flags0

DF

MF

0 1 2

Page 21: The Internet Protocol - 2

Computer NetworksComputer Networks -- 1/1/2121

159.334 Computer Networks159.334 Computer Networks

Options and Header Processing

Options are not used very often in modern internets andintranets

There is an overhead penalty in processing these options in theheader.

Alternative approaches have been found - particularly for highspeed networks.