Lecture 7

IP Addressing ICMP

Overview
IP Addressing
         

Introduction Hierarchical Addressing IP Address Format IP Address Component Field Requesting an IP Address IP Address Class IP Address Bit Pattern Network Address Broadcast Address Private Address

ICMP (Internet Control Message Protocol)

Introduction
• The network layer is responsible for moving
data through a set of networks • The function of the network layer is to find the best path through the network. • The network layer's addressing scheme is used by devices to determine the destination of data as it moves through the networks • To accomplish this, it uses two addressing methods:
• Flat addressing (Physical Address) • Hierarchical addressing (IP Address)

Hierarchical addressing
• Hierarchical addressing schemes enable information to traverse an internetwork, along with a method to find the destination in an efficient fashion

• The telephone network is an example of the use
of hierarchical addressing
• The telephone system uses a country code that designates a country for the call's first stop (first hop) • The next digits represent an area code that designates a geographical area (second hop) • The next three digits represent the local exchange (third hop) •The final digits represent the individual destination

IP Addressing Format
• An IP address is represented by a 32 bit binary
number • The 32 bits of the address are divided into four octets (an octet is a group of 8 bits), separated by dots and represented in decimal • This is known as dotted decimal format

IP Address Component Fields
Every IP address has two parts • Network ID
The network number of an IP address identifies the network to which a device is attached

• Host ID
The host portion of an IP address identifies the specific device on that network

Requesting an IP Addresses
• Each network connected to the Internet must have a unique network number • An organization called the International Network Information Center (InterNIC) assigns unique network number • They assigns blocks of IP address based on the size of the networks • The host number is assigned by the network administrator

ARIN - American Registry for Internet Numbers

IP Address Class
For easy administration, the designer of the IP addressing scheme determined that there should be five address classes. Class A, Class B, Class C, Class D & Class E Among these five classes, only three of these – Class A, Class B & Class C address are used commercially

• Class A – Class A addresses are reserved for
governments, large organizations with may hosts (Hewlett Packard, Stanford University have a Class A address)

• Class B – Class B addresses for medium-sized
companies (Cisco Systems has Class B address)

• Class C – Most smaller organizations use a Class C or
several Class C addresses

IP Address Class
• Class A address format is network.host.host.host • Class B address format is network.network.host.host • Class C address format is network.network.network.host

Class A
• When written in a binary format, the first (leftmost) bit of a Class A address is always 0 • A network is to look at the first octet of its IP address, which will range from 0 -126 (127 does start with a 0 bit, but has been reserved for special purposes) • All Class A IP addresses use only the first 8 bits to identify the network part of the address • The remaining three octets can be used for the host portion of the address • An example of a Class A IP address is 124.95.44.15

Class B
• The first 2 bits of a Class B address are always 1 0 (one and zero) • Class B IP addresses always have values ranging from 128 to 191 in their first octet • All Class B IP addresses use the first 16 bits to identify the network part of the address • The two remaining octets of the IP address can be used for the host portion of the address • An example of a Class B IP address is 151.10.13.28

Class C
• The first 3 bits of a Class C address are always 1
1 0 (one, one and zero) • Class C IP addresses always have values ranging from 192 to 223 in their first octet • All Class C IP addresses use the first 24 bits to identify the network part of the address • Only the last octet of a Class C IP address can be used for the host portion of the address • An example of a Class C IP address is 201.110.213.28

IP Address Bit Patterns
The following illustration shows the classes of network, the bits in the first octet that defines it and the number of bits that are included in the network and host portion of the address
0 - 126 0_______ ________ ________ ________

Class A 1st octet

Class B 1st octet 128-191 Class C 1st octet 192-223 Class D 1st octet 224-239 Class E 1st octet 240-255

10______

________

________

________

110____ _ 1110___ _ 11110__ _

________

________

________

________

________

________

________

________

________

127 does start with a 0 bit, but has been reserved for special purposes

Hosts for Classes of IP Address
• Every network that uses a Class A IP address can have assigned up to 2 to-the-power of 24 (224) (minus 2), or 16,777,214, possible IP addresses to devices that are attached to its network •Every network that uses a Class B IP address can have assigned up to 2 to-the-power of 16 (216) (minus 2), or 65,534, possible IP addresses to devices that are attached to its network • Every network that uses a Class C IP address can have assigned up to 28 (minus 2), or 254, possible IP addresses to devices that are attached to its network

Network Address
• An IP address that ends with binary 0s in all host bits is reserved for the network address (sometimes called the wire address) • A router uses a network's IP address when it forwards data on the Internet

Example
• In a Class A network, 113.0.0.0 is the network address containing the host 113.1.2.3 • In a Class B network, the IP address 176.10.0.0 is a network address • The IP address 176.10.0.0 is reserved for the network address and can never be used as an address for any device that is attached to it

Broadcast Address
• If you wanted to send data to all of the devices on a network, you would need to use a broadcast address • A broadcast occurs when a source sends out data to all devices on a network • Broadcast IP addresses end with binary 1s in the entire host part of the address (the host field)

Example
• In a Class B network, 176.10.255.255 would be the broadcast address to reach all the host on the network 176.10.0.0 (since 255 is the decimal value of an octet containing 11111111) • The IP address 176.10.255.255 is reserved for the broadcast address and can never be used as an address for any device that is attached to it

Broadcast Address

Private Addresses
• There are certain addresses in each class of IP address that are not assigned • These addresses are called private addresses • Private addresses might be used • by hosts that use network address translation (NAT), or a proxy server, to connect to a public network • by hosts that do not connect to the Internet at all

Example
• Banks may use TCP/IP to connect to Automatic Teller Machines (ATMs). These machines do no connect to the public network, so private addresses are ideal for them • Private addresses can also be used on a network where there are not enough public addresses available

Private Addresses Space

ICMP (Internet Message Control Protocol)
ICMP is implemented by all TCP/IP hosts  It provides information relevant to IP packet processing.  ICMP messages are carried in IP datagram  It is used to send error and control messages

Example
Destination Unreachable Router sends this message to the source if it is unable to deliver a packet to the final destination  Echo Reply Successful reply to a ping command

ICMP Messages
Various ICMP messages
          

Time to Live Exceeded Parameter Problem Source Quench Redirect Echo Timestamp Timestamp reply Information Request Information Reply Address request Address Reply

Review

Problem

Problem
128 191 10000000 10111111 First three Last three 11100010 Class B Yes 142.226.0.0

254 16382 Four 65534 Eight

Problems
No Yes No Yes No No No

Sign up to vote on this title
UsefulNot useful