Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
97 views

Netcom Module IV

This module covers IP addressing and network layer addressing. It has four lessons: 1) IP Addressing, 2) Subnet and Subnet Mask, 3) Public and Private Addresses and Network Address Translation (NAT), and 4) IPv6 Addresses and Managing the Address Space. The objectives are to understand IP addressing schemes including IPv4 classes, public vs private addresses, IPv4 and IPv6 addressing formats, subnetting, and network address translation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Netcom Module IV

This module covers IP addressing and network layer addressing. It has four lessons: 1) IP Addressing, 2) Subnet and Subnet Mask, 3) Public and Private Addresses and Network Address Translation (NAT), and 4) IPv6 Addresses and Managing the Address Space. The objectives are to understand IP addressing schemes including IPv4 classes, public vs private addresses, IPv4 and IPv6 addressing formats, subnetting, and network address translation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

MODULE IV

NETWORK LAYER ADDRESSING

Lesson 1 IP Addressing

Lesson 2 Subnet and Subnet Mask

Lesson 3 Public and Private


Addresses, and Network
Address Translation
(NAT)

Lesson 4 IP v6 Addresses and


Managing the Address
Space

Module I
2

MODULE IV

NETWORK LAYER ADDRESSING

 INTRODUCTION

Fundamental to the operation of IP are the addresses that are used to


identify the senders and receivers of individual messages. There is
information on how the address space is subdivided for ease of management
and routing.

Networks that are directly connected to the Internet must have their
IP addresses assigned by the Internet Network Information Center (InterNIC)
or some other authority. Businesses usually obtain these addresses through
their local Internet service provider (ISP). However, firewall and proxy
server combinations, which are popular on today’s networks, hide a
network’s IP addresses from other hosts on the Internet.

An IPv4 address has 32 bits and is familiar. An IPv6 address has 128
bits and looks wild. Extending the address space was one of the driving
reasons to develop IPv6, along with optimization of routing tables,
especially on the Internet.

The ability to manipulate IP addresses is affected not only on


customer sites but within the global Internet as well. Class-oriented IP
addresses are still used in the customer environment, whereas Classless IP
addressing is used in the Internet itself. Customers are free to use
whichever mechanism efficiently uses the address that is assigned to them.
These routing update protocols distribute the subnet mask for each entry in
its table.

Subnetting is the process of partitioning a single TCP/IP network into


a number of separate networks called subnets. These subnets are then
joined using routers. Advantages of subnetting a network include the
reducing network congestion by limiting the range of broadcasts using
routers, enabling different networking architectures to be joined and
sufficiently use the IP addressing space.

If a network using one of the private address ranges is connected to


the Internet, Network Address Translation (NAT) must be applied to map
local addresses into publicly visible addresses. This process provides a useful
security barrier since no information about the internal addressing or
routing structure will leak out into the wider Internet. Further, the private

Module IV
3

network can exist with only a small number of public addresses because only
a few of the hosts in the private network will be attached to the Internet at
any time.

This module will help you become familiar with the old IPv4
addresses and addressing scheme and will also explain howIPv4 and how IPv6
addressing works and why they have been designed the way they are. We
will also cover the necessity, the principles and the methods of subnetting.
Then we will provide the concepts of Network Address Translation (NAT).

OBJECTIVES

After studying the module, you should be able to:

1. Understand the necessity of IP Addressing.


2. Be familiar with IPv4 classes.
3. Distinguish between public and private IP addresses and their
applications.
4. Be familiar with the types of addresses that are used by the IPv4 and
IP v6 protocols.
5. Describe the IPv4 and IP v6 addressing format.
6. Make a comparison between IPv4 and IP v6 addressing schemes
capabilities.
7. Understand the necessity, the principles and the methods of
subnetting.
8. Be familiar with the concepts of Network Address Translation (NAT).
9. Understand how the address space is managed.

 DIRECTIONS/ MODULE ORGANIZER

There are four lessons in the module. Read each lesson carefully then
answer the exercises/activities to find out how much you have benefited
from it. Work on these exercises carefully and submit your output to your
instructor or to the College of Computer Science office.

In case you encounter difficulty, discuss this with your instructor


during the face-to-face meeting. If not contact your instructor at the
College of Computer Science office.

Good luck and happy reading!!!

Module IV
4

Lesson 1

 IP Addressing

1.1IP Protocol – IPv4

Addressing allows IP to communicate between hosts on a network or


on an internet. Every device that exchanges information using the TCP/IP
protocol suite needs a unique IP address.

Internet Protocol (IP) handles networking aspects and establishes


routes for packets. The network layer, in fact, handles the method of
assigning addresses to packets and determines how they should be
forwarded from one end point to another.

The Internet Protocol produces a header for packets. An IP header


contains the IP addresses of a source node and a destination node,
respectively. There are two IP addressing schemes. The first is the current
32-bit IPv4 addressing scheme used on TCP/IP networks worldwide. Because
the number of hosts connecting to the Internet has skyrocketed in recent
years, unique IP addresses are gradually running out. A new scheme called
IPv6 has been proposed. However, with most corporate networks now hiding
their networks behind firewalls, the pressure to move to IPv6 has lessened
because companies can choose any network ID they want for their private
network. The only assigned IP addresses they require from their Internet
service provider (ISP) are for the public interfaces on their firewall
machines. At this point, IPv4 seems to be firmly entrenched in the
networking world for at least the next few years. Before going far, it is
important to distinguish between the types of addresses in general.

1.2Types of Addresses

Module IV
5

While existing network is functioning, it may use one of the following


types of addresses:

 Unicast address: An identifier for a single interface. A unique address


delivered to a single destination. Unicasting take place when a
certain source sends packets over the network containing a special
address that instructs a certain destination on the network to accept
and process the packet (see Figure 11.1 (A).

 Broadcast address: A broadcast address is exactly an address that is


received by every host on the subnet. Broadcasts take place when
broadcast packets are sent over the network. These packets contain a
special address that instructs every station on the network to accept
and process the packet (see Figure 11.1 (B). Broadcasts are typically
used for announcements by network services, for resolving names into
addresses, and for other similar functions. Broadcasts are usually not
an efficient use of network bandwidth, since only one or a few
network stations might actually be interested in the information
being broadcast. For this reason, directed packets are used for most
network communication, which involves targeting a packet directly
for the intended station. All other stations ignore the directed
packet. Broad casting in a certain network conditions can cause
broadcast storms that can bring down a network. Because of that in
most networks, with IPv6, the broadcast address is not used anymore;
IPv6 uses multicast addresses instead.

 Anycast: an address assigned from unicasts address space referring to


a group of network interfaces typically belonging to different nodes.

Module IV
6

An IP datagram containing the anycast type of address will be


delivered to one of the interfaces listed (the “nearest” one,
according to the routing protocols’ measure of distance) (see Figure
11.1 (D).

 Multicast: A group addresses for a set of interfaces, typically


belonging to different nodes. A packet sent to a multicast address is
delivered to all interfaces identified by that address. Multicasting is
an alternative to broadcasting, which involves a form of limited
broadcast to a select group of hosts (see Figure 11.1 (C).

1.3IPv4 Addressing Scheme

The addressing scheme used to identify hosts is called the 32–bit IP


address. This is also known as a protocol address. There are two types of
network addressing schemes used with IP:

Classless: The full address range can be used without regard to bit
reservation for classes. This type of addressing scheme is primarily not used
in direct host assignment. The scheme is directly applied to the routing
tables of the Internet and ISPs.

Classful: The original segmentation of the 32–bit address into specific


classes denoting networks and hosts.

Most of us will never have to worry about the classless range of IP


addressing, for it is used on the Internet itself and not on customer
networks. It provides an easy method with which to reduce the routing
tables and allow large address ranges to be provided to the ISPs. The first
part of this section will deal with classful, since it started first and is
continuing to be used on many networks. It is confusing, but keeps reading.
In order to provide the flexibility required to support different size
networks, the IP address space divided into five different address classes,
Class A, Class B, Class C, Class D, and Class E. This is often referred to as
"classful" addressing because the address space is split into five predefined
classes, groupings, or categories. Each class fixes the boundary between the
network-prefix and the host-number at a different point within the 32-bit
address. The formats of the fundamental address classes are illustrated in
Figure 11.2.

NetID and HostID

 In classful addressing, an IP address in class A, B, or C is divided into


netID and HostID.
 These parts are of varying lengths, depending on the class of the
address as shown above.
 The class of IP address is used to determine the bits used for network
ID and host ID and the number of total networks and hosts possible in

Module IV
7

that particular class. Each ISP or network administrator assigns IP


address to each device that is connected to its network.

Information on the Number of networks and host in each class is given


below:

 The IP address 0.0.0.0 is used by hosts when they are being booted.
 All addresses of the form 127.xx.yy.zz are reserved for loopback
testing, they are processed locally and treated as incoming packets.

Note: IP addresses are globally managed by Internet Assigned Numbers


Authority (IANA) and regional Internet registries (RIR).

Note: While finding the total number of host IP addresses, 2 IP addresses


are not counted and are therefore, decreased from the total count because
the first IP address of any network is the network number and whereas the
last IP address is reserved for broadcast IP.

1.4IP Classes

Module IV
8

One of the fundamental features of classful IP addressing is that each


address contains a self-encoding key that identifies the dividing point
between the network-prefix and the host-number. For example, if the first
two bits of an IP address are 1-0, the dividing point falls between the 15th
and 16th bits. This simplified the routing system during the early years of
the Internet because the original routing protocols did not supply a
"deciphering key" or "mask" with each route to identify the length of the
network-prefix.

1.4.1 Class A Networks

Each Class A network address has an 8-bit network-prefix with the


highest order bit set to 0 and a seven-bit network number, followed by a 24-
bit host-number. A maximum of 126 (27 -2) networks can be defined. The
calculation requires that the 2 is subtracted because the network 0.0.0.0 is
reserved for use as the default route and the network 127.0.0.0 has been
reserved for the "loopback" function. Each of class A networks supports a
maximum of 16,777,214 (224 -2) hosts per network. The host calculation
requires that 2 is subtracted because the all-0s ("this network") and all-1s
("broadcast") host-numbers may not be assigned to individual hosts.

Since the address block contains 231 (2,147,483,648) individual


addresses and the IPv4 address space contains a maximum of 232
(4,294,967,296) addresses, the address space is 50% of the total IPv4 unicast
address space.

Module IV
9

Example of a Class A IP Addresses

1. 1.0.0.1
2. 126.0.0.1
3. 10.255.255.254
4. 125.125.125.125

Invalid Class A IP Addresses

1. 1.0.0.0 - Host ID (last octet) in which all bits are set to 0 cannot
be assigned because this host ID is used to represent the
network ID of the IP address.

2. 10.255.255.255 – Host ID (last octet) in which all bits (255 =


1111 1111) are set to 1 cannot be assigned
because this host ID is reserved as a broadcast
address to send packets to all the hosts present
on that particular network.

3. 1.254.254.256 - 0 -255 only (256 = 1 1111 1111 = 9bits).

4. 127.0.0.1 - 127 is a loopback address

Example of a Class A IP Address Connection

Ex. 1.
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 1.0.0.1 IP address: 1.0.0.2
Subnet Mask: 255.0.0.0 Subnet Mask: 255.0.0.0

Ex. 2. Wireless

Computer Name: Comp_A Computer Name: Comp_B


IP address: 126.255.0.1 IP address: 126.0.0.254
Subnet Mask: 255.0.0.0 Subnet Mask: 255.0.0.0

Module IV
10

Ex. 3.

UTP Cable

Name: Comp_A Router


IP Address: 12.2.89.250 UTP Cable
Subnet Mask: 255.0.0.0

Name: Comp_C
Name: Comp_B IP Address: 12.22.255.9
IP Address: 12.60.239.1 Subnet Mask: 255.0.0.0
Subnet Mask: 255.0.0.0

Example of a wrong Class A IP Address Connection

Ex. 1
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 2.0.0.1 IP address: 120.0.0.2
Subnet Mask: 255.0.0.0 Subnet Mask: 255.0.0.0
The network ID (NetID) must be the same.

Ex. 2
Wireless

Computer Name: Comp_A Computer Name: Comp_B


IP address: 126.0.0.254 IP address: 126.0.0.254
Subnet Mask: 255.0.0.0 Subnet Mask: 255.0.0.0
Module IV
IP Address Conflict. IP Address must be unique.
11

Ex. 3.

UTP Cable

Name: Comp_A Router


IP Address: 19.2.89.250 UTP Cable
Subnet Mask: 255.0.0.0

Name: Comp_C
Name: Comp_B IP Address: 12.22.255.9
IP Address: 12.60.239.1 Subnet Mask: 255.0.0.0
Subnet Mask: 255.0.0.0

Comp_A cannot connect to the network because of different NetID.

1.4.2 Class B Networks

Class B addresses is the most requested and is the easiest to assign


subnets to. Each Class B network address has a 16-bit network-prefix with
the two highest order bits set to 1-0 and a 14-bit network number, followed
by a 16-bit host-number. Class B networks are now referred to as"/16s" since
they have a 16-bit network-prefix.

A maximum of 16,384 (214) networks can be defined with up to 65,534


(2 -2) hosts per network. Since the entire address block contains 230
16

(1,073,741,824) addresses, it represents 25% of the total IPv4 unicast


address space.

Example of a Class B IP Addresses

Module IV
12

1. 128.56.56.56
2. 191.168.0.1
3. 129.255.255.254
4. 139.139.139.139

Invalid Class B IP Addresses

1. 128.128.128.0 - Host ID (last octet) in which all bits are set to 0


cannot be assigned because this host ID is used to
represent the network ID of the IP address.

2.191.255.255.255 – Host ID (last octet) in which all bits (255 =


1111 1111) are set to 1 cannot be assigned
because this host ID is reserved as a broadcast
address to send packets to all the hosts present
on that particular network.

3. 190.254.254.256 - 0 -255 only (256 = 1 1111 1111 = 9bits).

4. 127.0.0.1 - 127 is a loopback address.

Example of a Class B IP Address Connection

Ex. 1.
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 128.0.0.1 IP address: 128.0.128.2
Subnet Mask: 255.255.0.0 Subnet Mask: 255.255.0.0

Ex. 2. Wireless

Computer Name: Comp_A Computer Name: Comp_B


IP address: 190.255.0.1 IP address: 190.255.255.254
Subnet Mask: 255.255.0.0 Subnet Mask: 255.255.0.0
Module IV
13

Ex. 3.

UTP Cable

Router
Name: Comp_A
IP Address: 130.2.89.250 UTP Cable
Subnet Mask: 255.255.0.0

Name: Comp_C
Name: Comp_B IP Address: 130.2.255.9
IP Address: 130.2.239.1 Subnet Mask: 255.255.0.0
Subnet Mask: 255.255.0.0

Example of a wrong Class B IP Address Connection

Ex. 1
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 129.0.0.1 IP address: 130.0.0.2
Subnet Mask: 255.255.0.0 Subnet Mask: 255.255.0.0
The network ID (NetID) must be the same.

Ex. 2
Wireless

Computer Name: Comp_A Computer Name: Comp_B


IP address: 191.0.0.254 IP address: 191.2.0.254
Module IV
Subnet Mask: 255.0.0.0 Subnet Mask: 255.0.0.0
The network ID (NetID) must be the same.
14

Ex. 3.

UTP Cable

Router
Name: Comp_A
IP Address: 140.2.89.250 UTP Cable
Subnet Mask: 255.255.0.0

Name: Comp_C
Name: Comp_B IP Address: 140.1.255.9
IP Address: 140.2.239.1 Subnet Mask: 255.255.0.0
Subnet Mask: 255.255.0.0

Comp_C cannot connect to the network because of different NetID.

1.4.3 Class C Networks

Class C addresses are the most commonly assigned by the NIC. Class B
addresses have been exhausted. Each Class C network address has a 24-bit
network-prefix with the three highest order bits set to 1-1-0 and a 21-bit
network number, followed by an 8-bit host-number. Class C networks are
now referred to as "/24s" since they have a 24-bit network-prefix.

A maximum of 2,097,152 (2 21) networks can be defined with up to


254 (28 -2) hosts per network. Since the entire address block contains 229
(536,870,912) addresses, it represents 12.5% (or 1/8th) of the total IPv4
unicast address space.

This class allows lots of networks with a fewer hosts per network. A
Class C address is identified by the first 3 bits of the first field. If the first
and second bits are 1s and the third bit is a 0, this will identify a Class C
address. This allows 2,097,152 network numbers, each capable of supporting
254 hosts (all 0s and all 1s are still reserved no matter what type of routing
and addressing you are using).

Example of a Class C IP Addresses

1. 192.56.56.56

Module IV
15

2. 223.223.223.223
3. 192.168.0.1
4. 199.0.0.5

Invalid Class C IP Addresses

1. 192.192.192.0 - Host ID (last octet) in which all bits are set to 0


cannot be assigned because this host ID is used to
represent the network ID of the IP address.

2. 222.255.255.255 – Host ID (last octet) in which all bits (255 =


1111 1111) are set to 1 cannot be assigned
because this host ID is reserved as a broadcast
address to send packets to all the hosts present
on that particular network.

3. 195.254.255.256 - 0 -255 only (256 = 1 1111 1111 = 9bits).

4. 127.0.0.1 - 127 is a loopback address.

Example of a Class C IP Address Connection

Ex. 1.
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 192.168.0.1 IP address: 192.168.0.2
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0

Ex. 2. Wireless

Computer Name: Comp_A Computer Name: Comp_B


IP address: 200.255.0.1 IP address: 200.255.0.254
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
Module IV
16

Ex. 3.

UTP Cable

Router
Name: Comp_A
IP Address: 205.2.89.250 UTP Cable
Subnet Mask: 255.255.255.0

Name: Comp_C
Name: Comp_B IP Address: 205.2.89.9
IP Address: 205.2.89.1 Subnet Mask: 255.255.255.0
Subnet Mask: 255.255.255.0

Example of a wrong Class B IP Address Connection

Ex. 1
UTP Cable

Computer Name: Comp_A Computer Name: Comp_B


IP address: 210.0.0.1 IP address: 200.0.0.2
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
The network ID (NetID) must be the same.

Ex. 2
Wireless

Module IV
17

Computer Name: Comp_A Computer Name: Comp_B


IP address: 192.3.0.1 IP address: 193.3.1.2
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
The network ID (NetID) must be the same.

Ex. 3.

UTP Cable

Router
Name: Comp_A
IP Address: 195.10.89.250 UTP Cable
Subnet Mask: 255.255.255.0

Name: Comp_C
Name: Comp_B IP Address: 195.10.88.9
IP Address: 195.10.89.1 Subnet Mask: 255.255.255.0
Subnet Mask: 255.255.255.0

Comp_C cannot connect to the network because of different NetID.

1.4.4 Class D Networks

The value of the four highest bits of the first byte is 1110. The class D
addresses are not divided into a network and a computer addresses, because
they are multicast addresses themselves.

Class D addresses are special addresses and are known as multicast


addresses. This address type is assigned to a group of network work-stations
and is not assigned to represent a unique address. They are used to send IP
datagrams to a group, but not all of the hosts on a network. These addresses
have many uses, including being used for addressing router update messages
as well as delivering data, video, and voice over IP. D space address consist
6.25 percent of total IPv4 addressing space.
1.4.4 Class E Networks

Class E always starts with 1111; it consists of the rest of the


addressing space and is reserved for future use and network experiments.
Most networking equipment will reject addresses from the Class E space.

Module IV
18

To be masters of IP addressing. You must be familiar with the following


numbering systems.

Decimal Binary
32 0010 0000
19 0001 0011
57 0011 1001

1 decimal = 8 binary bits


8 binary bits = 1 octet

Practice makes perfect, but nobody is perfect so …


Convert the following decimal numbers to binary: (Use separate sheets of
paper)

Decimal Binary
192
128
254
10

1.5 Address Representation:

o notations to show an IPv4 address:

1. Dotted-Decimal Notation

To make Internet addresses easier for human users to read and write,
IP addresses are often expressed as four decimal numbers, each separated
by a dot. This format is called "dotted-decimal notation."

Dotted-decimal notation divides the 32-bit Internet address into four


8-bit (byte) fields and specifies the value of each field independently as a
decimal number with the fields separated by dots. Figure 11.3 shows how a
typical /16 (Class B) Internet address can be expressed in dotted decimal
notation.

Module IV
19

Figure 1 displays the range of dotted-decimal values that can be


assigned to the first octet for each of the three principle address classes.
The other octets can be represented by any positive decimal number less
than 256.

 Decimal numbers from 0 to 255


 Separated by dots

192.168.1.1
2. Binary Notation

 0 or 1
 Separated by dots

11000000.10101000.00000001.00000001
Fig 1: Binary and Dotted decimal notation

IP Address Sequence

159.255.0.111 192.0.0.253 75.0.255.255


159.255.0.112 192.0.0.254 75.1.0.0.
159.255.0.113 192.0.0.255 75.1.0.1
159.255.0.114 192.0.1.0 75.1.0.2
159.255.0.115 192.0.1.1 75.1.0.3

200.255.255.254 1.254.255.254 110.0.253.253


200.255.255.255 1.254.255.255 110.0.253.254
201.0.0.0 1.255.0.0 110.0.253.255
201.0.0.1 1.255.0.1 110.0.254.0
201.0.0.2 1.255.0.2 110.0.254.1
Practice makes perfect, but nobody is perfect so …
IP Address Sequence: (Use separate sheets of paper)

191.255.0.1
192.168.0.5

Module IV
199.200.254.253
20

Range of special IP addresses:

169.254.0.0 – 169.254.0.16: Link local addresses


127.0.0.0 – 127.0.0.8: Loop-back addresses
0.0.0.0 – 0.0.0.8: used to communicate within the current network.

Rules for assigning Host ID:

Host ID’s are used to identify a host within a network. The host ID are
assigned based on the following rules:

 Within any network, the host ID must be unique to that network.


 Host ID in which all bits are set to 0 cannot be assigned because this
host ID is used to represent the network ID of the IP address.
 Host ID in which all bits are set to 1 cannot be assigned because this
host ID is reserved as a broadcast address to send packets to all the
hosts present on that particular network.

Rules for assigning Network ID:

Hosts that are located on the same physical network are identified by the
network ID, as all host on the same physical network is assigned the same
network ID. The network ID is assigned based on the following rules:

 The network ID cannot start with 127 because 127 belongs to class A
address and is reserved for internal loop-back functions.
 All bits of network ID set to 1 are reserved for use as an IP broadcast
address and therefore, cannot be used.
 All bits of network ID set to 0 are used to denote a specific host on
the local network and are not routed and therefore, aren’t used.

Summary of Classful addressing:

Module IV
21

Problems with Classful Addressing:

The problem with this classful addressing method is that millions of class A
address are wasted, many of the class B address are wasted, whereas,
number of addresses available in class C is so small that it cannot cater the
needs of organizations. Class D addresses are used for multicast routing and
are therefore available as a single block only. Class E addresses are
reserved.

Since there are these problems, Classful networking was replaced by


Classless Inter-Domain Routing (CIDR) in 1993.

 EXERCISE

1. List the IP address types.


2. What is the difference between Classless and Classful IP addresses?
3. Why are IP addresses often expressed as four decimal numbers, each
separated by a dot?
4. List the IP address classes.

Module IV
22

Lesson 2


2.1Subnet Masks
Subnet and Subnet Mask

The Internet Address Classes A, B, and C, were designed to


accommodate three different scales of IP internetwork, where the 32 bits of
the IP address are apportioned between network IDs and host IDs depending
on how many networks and hosts per network are needed. However,

Module IV
23

consider the class A network ID, which has the possibility of over 16 million
hosts on the same network. All the hosts on the same physical network
bounded by IP routers share the same broadcast traffic; they are in the
same broadcast domain. It is not practical to have 16 million nodes in the
same broadcast domain. The result is that most of the 16 million host
addresses are not assignable and are wasted. Even a class B network with 65
thousand hosts is impractical.

In an effort to create smaller broadcast domains and to better utilize


the bits in the host ID, an IP network can be subdivided into smaller
networks, each bounded by an IP router and assigned a new subnetted
network ID, which is a subset of the original class based network ID.

This creates subnets, subdivisions of an IP network, each with its own


unique subnetted network ID. Subnetted network IDs are created by using
bits from the host ID portion of the original class-based network ID.

Consider the example in Figure 11.4. The class B network of


174.38.0.0 can have up to 65,534 nodes. This is far too many nodes and, in
fact, the current network is becoming saturated with broadcast traffic. The
subnetting of network 174.38.0.0 should be done in such a way so that it
does not impact or require the reconfiguration of the rest of the IP
internetwork.

Network 174.38.0.0 is subnetted by utilizing the first 8 host bits (the


third octet) for the new subnetted network ID. When 174.38.0.0 is
subnetted, as shown in Figure 11.5, separate networks with their own
subnetted network IDs (174.38.1.0, 174.38.2.0, 174.38.3.0) are created. The
router is aware of the separate subnetted network IDs and will route IP
packets to the appropriate subnet.

Note that the rest of the IP internetwork still regards all the nodes on
the three subnets as being on network 174.38.0.0. The other routers in the
IP internetwork are unaware of the subnetting being done on network
174.38.0.0, and therefore require no reconfiguration.

Module IV
24

A key element of subnetting is still missing. How does the router that
is subdividing network 174.38.0.0 know how the network is being subdivided
and which subnets are available on which router interfaces? To give the IP
nodes this new level of awareness, the router must be told exactly how to
discern the new subnetted network ID regardless of Internet Address
Classes. To tell an IP node exactly how to extract a network ID, either class-
based or subnetted, a subnet mask is used.

The computer has no way of knowing what kind of IP address you


have, this means that there has to be some way of letting your software
extract the network ID from the IP address. To do this, you can use subnet
masks. Typically, a subnet mask will look like this: 255.255.255.0. This tells
us quickly that we are using a Class C IP address as the first three 255's tell
us that these individual numbers cannot change. The zero tells us that this
is the only digit that we can use, so it has to be a Class C IP address.

If we had an IP address of 128.10.11.23 and a subnet mask of


255.255.0.0 then we can quickly see that we have a Class B IP address. The
whole point of a subnet mask is to tell the computer which is the Network ID
and which is the host ID. The bits of the subnet mask are defined as:
 All bits that correspond to the network ID are set to 1.

Module IV
25

 All bits that correspond to the host ID are set to 0.

A default subnet mask is based on the IP address classes and is used


on TCP/IP networks that are not divided into subnets. Table 11.1 lists the
default subnet masks using the dotted decimal notation for the subnet
mask.

Since the network ID bits must be always chosen in a contiguous


fashion from the high-order bits, a shorthand way of expressing a subnet
mask is to denote the number of bits that define the network ID as a
network prefix using the network prefix notation: /<# of bits>. Table 11.1
lists the default subnet masks using the network prefix notation for the
subnet mask.

Custom subnet masks are those that differ from the above default
subnet masks when doing subnetting. For example, 138.96.58.0 is an 8-bit
subnetted class B network ID. Eight bits of the class-based host ID are being
used to express subnetted network IDs. The subnet mask uses a total of 24
bits (255.255.255.0) to define the subnetted network ID.

Subnet masks can be expressed using prefix notation. For example,


the class B network ID 187.96.0.0 with the subnet mask of 255.255.255.0
would be expressed in network prefix notation as 187.96.0.0/26.

And for an 8-bit subnetted class B network ID 138.96.58.0 the subnet


mask uses a total of 24 bits to define the subnetted network ID. The
subnetted network ID and its corresponding subnet mask are then expressed
in network prefix notation as: 138.96.58.0/24
Since all hosts on the same network must use the same network ID,
the ID must be defined by the same subnet mask. For example,
138.23.0.0/16 is not the same network ID as 138.23.0.0/24. The network ID
138.23.0.0/16 implies a range of valid host IP addresses from 138.23.0.1 to
138.23.255.254. The network ID 138.23.0.0/24 implies a range of valid host
IP addresses from 138.23.0.1 to 138.23.0.254. Clearly, these network IDs do
not represent the same range of IP addresses.

2.2 Network / Subnet

 A group of IP addresses that have the same network ID.

Network / Subnet Mask

Module IV
26

 A 32-bit combination used to describe which portion of an address refers


to the network id and which part refers to the host id.

IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0

IP Address: 110000000.10101000.00000001.00000001
Subnet Mask: 11111111. 11111111. 11111111.00000000
Network ID Host ID

IP Address and Subnet Mask Network


IP Address: 10.22.105.9 10. 22.105.9
Subnet Mask: 255.0.0.0 Network ID Host ID
IP Address: 170.2.15.78 170.2. 15.78
Subnet Mask: 255.255.0.0 Network ID Host ID
IP Address: 192.168.1.10 192.168.1 10
Subnet Mask: 255.255.255.0 Network ID Host ID
IP Address: 1.2.2.3 1. 2.2.3
Subnet Mask: 255.0.0.0 Network ID Host ID

Practice makes perfect, but nobody is perfect so …


Get the Network ID of the following IP addresses: (Use separate sheets of
paper)

IP Address and Subnet Mask Network


IP Address: 189.5.55.55
Subnet Mask: 255.255.0.0 Network ID Host ID
IP Address: 126.3.24.36
Subnet Mask: 255.0.0.0 Network ID Host ID
IP Address: 198.68.11.105
Subnet Mask: 255.255.255.0 Network ID Host ID
IP Address: 14.32.52.90
Subnet Mask: 255.0.0.0 Network ID Host ID
Subnet Mask Conversion:

 Dotted Decimal
 Slash

Conversion:

Subnet Mask: 255.0.0.0


(Convert to Binary)
11111111.00000000.00000000.00000000
= 8 network bits
= /8

Subnet Mask: 255.255.0.0

Module IV
27

(Convert to Binary)
11111111. 11111111.00000000.00000000
= 16 network bits
= /16

Subnet Mask: 255.255.255.0


(Convert to Binary)
11111111. 11111111.11111111.00000000
= 24 network bits
= /24

Subnet Mask: 128.0.0.0


(Convert to Binary)
10000000.0000000.00000000.00000000
= 1 network bits
= /1

Subnet Mask: 255.128.0.0.0


(Convert to Binary)
11111111.1000000.00000000.00000000
= 9 network bits
= /9

Subnet Mask: 255.255.224.0.0


(Convert to Binary)
11111111.11111111.11100000.00000000
= 19 network bits
= /19

Subnet Mask: 255.255.255.252


(Convert to Binary)
11111111.11111111.11111111.11111100
= 30 network bits
= /30

Practice makes perfect, but nobody is perfect so …


Get the Dotted Decimal Notation or the Slash Notation: (Use separate sheets
of paper)

Dotted Decimal Notation Slash Notation (Bit Notation)


255.255.248.0
/28
255.248.0.0.
/6
255.255.255.192
/14

2.3 Network, Host, Broadcast Address

Module IV
28

 There are 3 types of IP addresses in a Network/Subnet:

 Network Address: This is the first IP Address in the network/subnet.

 Host Address: All the IP Addresses in between the network address


and the broadcast address.

 Broadcast Address: this is the last IP address in the network/subnet.

IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
Network Address Host Addresses Broadcast Address
192.168.1.0 192.168.1.1 to 192.168.1.255
192.168.1.254

IP Address: 10.1.0.1
Subnet Mask: 255.0.0.0
Network Address Host Addresses Broadcast Address
10.0.0.0 10.0.0.1 to 10.255.255.255
10.255.255.254

IP Address: 174.21.0.1
Subnet Mask: 255.255.0.0
Network Address Host Addresses Broadcast Address
174.21.0.0 174.21.0.1 to 174.21.255.255
174.21.255.254

Practice makes perfect, but nobody is perfect so …


(Use separate sheets of paper)

Build a list of networks:

IP Address: 184.254.0.1
Subnet Mask: 255.255.0.0
Network Address Host Addresses Broadcast Address

IP Address: 8.33.0.1
Subnet Mask: 255.0.0.0
Network Address Host Addresses Broadcast Address

Module IV
29

2.4 Subnetting

It allows a network to be split into several parts for internal use but
still act like a single network to the outside world.

To implement subnetting, the router needs a subnet mask that


indicates the split between network + subnet number and host. Ex.
255.255.252.0/22. Aǁ/22ǁ to indicate that the subnet mask is 22 bits long.

 IPV4 Subnetting – Number of Subnets

Example 1: What subnet mask should be used to support 3 subnets if you are
using a network address of 172.16.0.0/16.

Step 1:
Formula
/original slash + /N = /new slash

Get /N: 2N = ____ >= no. subnets

2N = _ >= 3 subnets

2
2 =
4 >= 3 subnets

/16 + /2 = /18 or 255.255.192.0

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

Module IV
30

/18 is in the 3rd octet and the increment is 64

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


172.16.0.0/18 172.16.0.1/18 to 172.16.63.255/18
172.16.63.254/18
172.16.64.0/18 172.16.63.1/18 to 172.16.127.255/18
172.16.127.254/18
172.16.128.0/18 172.16.128.1/18 to 172.16.191.255/18
172.16.191.254/18
172.16.192.0/18

Example 2: Divide the network: 192.168.1.0/24 in 7 subnets.

Step 1:
Formula
/original slash + /N = /new slash

Get /N: 2N = ____ >= no. subnets

2N = _ >= 7 subnets

3
2 =
8 >= 7 subnets

/24 + /3 = /27 or 255.255.255.224

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

Module IV
31

/27 is in the 4th octet and the increment is 32

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


192.168.1.0/27 192.168.1.1/27 to 192.168.1.31/27
192.168.1.30/27
192.168.1.32/27 192.168.1.33/27 to 192.168.1.63/27
192.168.1.62/27
192.168.1.64/27 192.168.1.65/27 to 192.168.1.95/27
192.168.1.94/27
192.168.1.96/27

Example 3: Divide the network: 10.0.0.0/8 into 20 subnets.

Step 1:
Formula
/original slash + /N = /new slash

Get /N: 2N = ____ >= no. subnets

2N = _ >= 20 subnets

5
2 =
32 >= 20 subnets

/8 + /5 = /13 or 255.248.0.0

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

Module IV
32

/13 is in the 2nd octet and the increment is 8

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


10.0.0.0/13 10.0.0.1/13 to 10.7.255.255/13
10.7.255.254/13
10.8.0.0/13 10.8.0.1/13 to 10.15.255.255/13
10.15.255.254/13
10.16.0.0/13 10.16.0.1/13 to 10.23.255.255/13
10.23.255.254/13
10.24.0.0/13

Practice: (Use separate sheet of paper and follow the steps in the previous
examples.)

1. Divide the network: 192.200.200.0/24 into 30 subnets.


2. What subnet mask should be used to support 40 subnets if you are using
a network address of 191.45.0.0/16.
3. Divide the network: 5.0.0.0/8 into 15 subnets.

 IPV4 Subnetting – Number of Hosts

Example 1: What subnet mask must be used to support 20 hosts if you are
using a network address of 172.16.0.0/16.

Step 1:
Formula
/32 - /H = /new slash

Get /H: 2H = ____ >= no. hosts

2H = _ >= 20 hosts

5
2 =
32-2 = 30 >= 20 hosts

Module IV
33

/32- /5 = /27 or 255.255.255.224

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

/27 is in the 4th octet and the increment is 32

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


172.16.0.0/27 172.16.0.1/27 to 172.16.0.31/27
172.16.0.30/27
172.16.0.32/27 172.16.0.33/27 to 172.16.0.63/27
172.16.0.62/27
172.16.0.64/27 172.16.0.65/27 to 172.16.0.95/27
172.16.0.94/27
172.16.0.96/27
Example 2: What subnet mask must be used to support 500 hosts if you are
using a network address of 50.0.0.0/8.

Step 1:
Formula
/32 - /H = /new slash

Get /H: 2H = ____ >= no. hosts

2H = _ >= 500 hosts

9
2 =
512 -2 = 510 >= 500 hosts

/32- /9 = /23 or 255.255.254.0

Module IV
34

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

/23 is in the 3rd octet and the increment is 2

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


50.0.0.0/23 50.0.0.1/23 to 50.0.1.255/23
50.0.1.254/23
50.0.2.0/23 50.0.2.1/23 to 50.0.3.255/23
50.0.3.254/23
50.0.4.0/23 50.0.4.1/23 to 50.0.5.255/23
50.0.5.254/23
50.0.6.0/23

Example 3: What subnet mask must be used to support 120 hosts if you are
using a network address of 199.2.1.0/24.

Step 1:
Formula
/32 - /H = /new slash

Get /H: 2H = ____ >= no. hosts

2H = _ >= 120 hosts

7
2 =
128 -2 = 126>= 120 hosts

Module IV
35

/32- /7 = /25 or 255.255.255.128

Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).

/25 is in the 4th octet and the increment is 128

Step 3:

Build a list of networks

Network Address Host Addresses Broadcast Address


199.2.1.0/25 199.2.1.1/25 to 199.2.1.127/25
199.2.1.126/25
199.2.1.128/25 199.2.129/25 to 199.2.1.255/25
199.2.254/25
199.2.2.0/25 199.2.2.1/25 to 199.2.2.127/25
199.2.2.126
199.2.2.128/25

Practice: (Use separate sheet of paper and follow the steps in the previous
examples.)

1. What subnet mask must be used to support 100 hosts if you are using
a network address of 150.50.0.0/16.
2. What subnet mask must be used to support 2000 hosts if you are using
a network address of 11s.0.0/8.
3. What subnet mask must be used to support 10 hosts if you are using a
network address of 192.45.45.0/24.

Module IV
36

 EXERCISE

1. What is the reason behind subnetting


2. How can the subnet mask be useful in determining the host id and net
id?
3. How can we determine the number of host bits in order to use for
subnetting?

Module IV
37

Lesson 3

 Public and Private Addresses,


and Network Address Translation (NAT)

3.1Public Addresses

If your intranet is not connected to the Internet, any IP addressing


can be deployed. If direct (routed) or indirect (proxy or translator)
connectivity to the Internet is desired, then there are two types of
addresses employed on the Internet, public addresses and private addresses.

Module IV
38

Public addresses are assigned by Internet Assigned Numbers Authority


(IANA) and consist of class-based network IDs that are guaranteed to be
globally unique to the Internet.

When the public addresses are assigned, routes are programmed into the
routers of the Internet so that traffic to the assigned public addresses can
reach their locations. Traffic to destination public addresses is reachable on
the Internet.

For example, when an organization is assigned a network ID and


subnet mask, that {network ID, subnet mask} pair also exists as a route in
the routers of the Internet. IP packets are routed to the proper destination.

3.2Private Addresses

Each IP node requires an IP address that is globally unique to the IP


internetwork. In the case of the Internet, each IP node on a network
connected to the Internet requires an IP address that is globally unique to
the Internet. As the Internet grew, organizations connecting to the Internet
required a public address for each node on their intranets. This requirement
placed a huge demand on the pool of available public addresses.

When analyzing the addressing needs of organizations, the designers


of the Internet noted that, for many organizations, most of the hosts on the
organization's intranet did not require direct connectivity to Internet hosts.
Those hosts that did require a specific set of Internet services, such as the
World Wide Web access and e-mail, typically access the

Internet services through application layer gateways, such as proxy


servers and e-mail servers. The result is that most organizations only
required a small amount of public addresses for those nodes (such as
proxies, routers, firewalls, and translators) that were directly connected to
the Internet.
For the hosts within the organization that do not require direct access
to the Internet, IP addresses that do not duplicate already-assigned public
addresses are required. To solve this addressing problem, the Internet
designers reserved a portion of the IP address space and named this space
the private address space. An IP address in the private address space is
never assigned as a public address. IP addresses within the private address
space are known as private addresses. Because the public and private
address spaces do not overlap, private addresses never duplicate public
addresses.

The private address space is defined by the following three address blocks:
 10.0.0.0/8: The 10.0.0.0/8 private network is a class A network ID that
allows the following range of valid IP addresses: 10.0.0.1 to
10.255.255.254. The 10.0.0.0/8 private network has 24 host bits which
can be used for any subnetting scheme within the private organization.
 172.16.0.0/12: The 172.16.0.0/12 private network can be interpreted
either as a block of 16 class B network IDs or as a 20-bit assignable

Module IV
39

address space (20 host bits) which can be used for any subnetting
scheme within the private organization. The 172.16.0.0/12 private
network allows the following range of valid IP addresses: 172.16.0.1 to
172.31.255.254.
 192.168.0.0/16: The 192.168.0.0/16 private network can be interpreted
either as a block of 256 class C network IDs or as a 16-bit assignable
address space (16 host bits), which can be used for any subnetting
scheme within the private organization. The 192.168.0.0/16 private
network allows the following range of valid IP addresses: 192.168.0.1 to
192.168.255.254.

Some groups of addresses are reserved for use in private networks and
are never exposed to the wider Internet. The ranges appear to be random
and have historic reasons for their values, but note that there is one address
range chosen from each of Class A, B, and C. They are shown in Table 11.7.
Of course, in a genuinely private network any addresses could be used, but
it is a good exercise in self-discipline to use the allocated ranges.

3.3
3.4Network Address Translation (NAT)

In many organizations using private addresses, the private address space


is reused, helping to prevent the depletion of public addresses.

Since the IP addresses in the private address space will never be assigned
by the IANA as public addresses, there will never exist routes in the Internet
routers for private addresses. Traffic to destination private addresses is not
reachable on the Internet.
Therefore, Internet traffic from a host that has a private address must
either send its requests to an application layer gateway (such as a proxy
server), which has a valid public address, or have its private address
translated into a valid public address by a network address translator (NAT)
before it is sent on the Internet.

Module IV
40

Private LANs may that have or don’t have intent to connect to the Internet
as in figure 11.8. Private LANs with no intent to connect to the Internet can
choose any addresses they want, even public addresses that have been
assigned by the IANA. If an organization later decides to connect to the
Internet, its current address scheme may include addresses already assigned
by the IANA to other organizations. These addresses would be duplicate or
conflicting addresses and are known as illegal addresses. Connectivity from
illegal addresses to Internet locations is not possible and it must be
changed.

Further, if the private network does become attached to the public


Internet at some point, it is much easier to see whether internal addresses
are leaking into the Internet and simple for the ISP to configure routers to
filter out any packets to or from the private address ranges.

If a network using one of the private address ranges is connected to the


Internet, Network Address Translation (NAT) must be applied to map local
addresses into publicly visible addresses. This process provides a useful
security barrier since no information about the internal addressing or
routing structure will leak out into the wider Internet. Further, the private
network can exist with only a small number of public addresses because only
a few of the hosts in the private network will be attached to the Internet at
any time.

Module IV
41

NAT replaces the internal network IP address for each Internet Protocol
(IP) packet passing through the firewall with a dummy one from a fixed pool
of addresses. The actual IP addresses of computers on the private network
are thus hidden from users outside the firewall. All requests that pass
through the firewall have their addresses translated on the way to the
private network, and all responses returned to the unsecure public network
have their addresses translated back on the way out of the private network.

Implementing NAT on a router or firewall essentially involves creating


and configuring a NAT table containing the private/public IP address
mappings. These mappings can be statically created or dynamically
generated from a specified pool of IP addresses (either randomly or, more
often, on a round-robin basis). A static NAT table essentially consists of a
series of NAT rules that specify how IP addresses will be translated.

In addition to securing your private corporate network, NAT also reduces


the need to get a block of unique IP addresses from your Internet service
provider (ISP). Only the far side of your router or firewall server needs a
unique IP address from your ISP—you can use any IP addresses within your
network because your private network is securely hidden from the outside
world behind your firewall. This reduces costs and helps extend the viability
of the current IPv4 system by reducing the number of unique IP addresses
required on the Internet.

3.4.1 Automatic IP Address Allocation

We'll never get a device to work on a TCP/IP network unless it has an IP


address. There are three automatic ways of getting an IP address into a
network device. DHCP is found in Windows NT and Novell Netware. BOOTP
and RARP are typically used in UNIX systems. If we do not use one of these
automatic procedures, you must manually allocate an IP address to the
device.

3.4.2 Dynamic Host Configuration Protocol (DHCP)

DHCP is a way of getting your server to allocate an IP address to the


device that you wish to connect to the network. Basically, a piece of
software on the server is programmed with a list of IP addresses that it can
give to a device upon request. This means that if a product supports DHCP,

Module IV
42

and you have enabled that protocol and the DHCP server is running on our
network, then our device will be given an IP address by the server.

DHCP is sometimes called a plug-and-play protocol, whereby hosts can


join or leave a network without requiring configuration by network
managers.

The convenience of this method of address assignment gives DHCP


multiple uses of IP addresses. If any ISP manager does not have a sufficient
number of IP addresses, DHCP is used to assign each of its connecting hosts
a temporary IP address. When a host joins or leaves, the management server
must update its list of available IP addresses. If a host joins the network,
the server assigns an available IP address; each time a host leaves, its
address is included in the pool of available addresses. DHCP is especially
useful in mobile IP, with mobile hosts joining and leaving an ISP frequently.

One way to configure DHCP is to use a router employing DHCP. The


router acts as a gateway between a private IP network and the public
Internet. In this configuration, the IP address is only temporarily assigned to
the communicating host within the private IP network as it is illustrated in
Figure 11.10. By such means it is possible to share the public IP address
space given that the number of hosts requiring addresses at any one time
does not exceed the total number of public addresses available to the DHCP
for dynamic address assignment.

DHCP servers can be employed for the allocation of IP addresses in


private LANs and private IP networks since this makes for much easier
administration of the numbering range.

DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and
various DHCP options from DHCP servers in a four-step process as it are
illustrated in Figure 11.9:

1. DHCPDISCOVER: The client broadcasts a Discover message for a DHCP


server when it is attached to an Ethernet and boots up.
2. DHCPOFFER: DHCP servers on the network respond with offer messages
offering an address to the client.
3. DHCPREQUEST: The client broadcasts a request to lease an address from
one of the offering DHCP servers. It asks the selected server for
configuration information
4. DHCPACK: The selected DHCP server responds with an Ack message
carrying the requested information. It assigns client any configured DHCP
options, and updates its DHCP database. The client then initializes and
binds its TCP/IP protocol stack and can begin network communication.

Module IV
43

DHCP has a further use in dial-up networking for discovering the IP


address and network configuration parameters a computer should use when
it is attached to the Internet. The same technique is used more generally
for any dynamic assignment of IP addresses such as in DSL or cable modem
connectivity.

At its most basic level, the IP address is taken from a pool of free IP
addresses, this means that the IP address could change from one day to
another. This can cause problems in some situations. For example, if a
printer is configured on the network queue to work with a particular IP
address and the DHCP server allocates a different IP address to the one that
the queue is expecting to use, the printer will not be able to print as the IP
address is different.

3.4.3 Bootstrap Protocol (BOOTP)

BOOTP is a TCP/IP protocol and service that allows diskless workstations


to obtain their IP address, other TCP/IP configuration information, and their
boot image file from a bootstrap protocol (BOOTP) server. The network
interface card (NIC) on these diskless workstations contains a programmable
read-only memory (PROM) chip containing code necessary to initialize the
client.

Module IV
44

BOOTP is used on many UNIX systems and is a more controllable way of


allocating IP addresses. Basically, there is a BOOTP server, which contains a
list of all available network resources. There are two pieces of information
that the BOOTP server needs:

 MAC Address
 IP address that the supervisor would like to use.

When a BOOTP compatible device is switched on, it communicates with


the BOOTP server. The server retrieves the MAC address and then looks in a
look up table to see if it can find the device MAC address, if it finds the MAC
address the server then looks at what IP address it should allocate to the
server. The device is then programmed with that address.

This is better than DHCP as you always know what IP address you will
have in the device. The drawback to it is that you have to add an entry to
the BOOTP server every time you buy a new network device.

3.4.4 Prioritization of Automatic IP Addresses

We'll often find the devices that support these three protocols have some
kind of prioritization that allows us to specify which protocol should be used
first. Imagine that you had a DHCP server; a BOOTP server and a RARP
server. As the network card supports all three IP address allocation
methods, there may be some confusion as to what IP address the card might
get. To get around this, a card should be able to specify which IP address
method it will use first, so it might use DHCP first, then fall back to BOOTP,
etc…

It is also possible to specify an IP address using the ARP command from a


TCP/IP system.

Module IV
45

 EXERCISE

1. How can private addresses be distinguished from public addresses?


2. What are the three private address blocks?
3. Why does some network need to use the NAT?
4. How does the NAT work?
5. How does the DHCP work?
6. What are the differences between DHCP and BOOTP?

Module IV
46

Lesson 4

 IP v6 Addresses and
Managing the Address Space

4.1IP v6 addresses

An IPv6 address has 128 bits and looks wild. Extending the address space
was one of the driving reasons to develop IPv6, along with optimization of
routing tables, especially on the Internet.

While it is true that the addressing was changed to 128 bits, there are
many more features about the address space and its allocation that were
carefully crafted. IPv6 addresses provide the same function as IPv4:
identifiers for interfaces and sets of interfaces.

4.1.1 Types of Address Inscription

An IPv6 address is written in hexadecimal and consists of groupings of 8


containing 4 hexadecimal digits or 8 groups of 16 bits each. This takes the
form:
xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx

There are principal types of address inscription:

 An IPv6 address is normally written as eight blocks of four hexadecimal


digits separated by colons. For example,
2001:0250:02FF:0210:0250:8BFF:FEDE:67C8 is an IP v6 address.
 Leading zeros do not need to be written. So, we can write the previous
address as follows 2001:250:2FF:210:250:8BFF: FEDE:67C8.
 A double colon, at most one of which may appear in any address,
indicates multiple zero blocks. So, the following IP v6 address:
FEDC: 0000:0000:0000:00DC:0000:7076:0010

could be written more compactly as


FEDC:: DC:0:7076:10).
In mixed networks of IPv6 and IPv4, the last four bytes of the IPv6
address are sometimes written as an IPv4 dotted quad address. For
example, FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
could be written as:
FEDC:BA98:7654:3210:FEDC:BA98:118.84.50.16.

As in IPv4, nodes don't assigned IPv6 addresses. Only interfaces can be


assigned IP addresses. Nodes can therefore be identified by the address
of any of its interfaces, so each interface of a node needs at least one
unicast address. A single interface can also be assigned multiple IPv6
addresses of any type (unicast, multicast, anycast).

Module IV
47

It is also possible to assign one unicast address to multiple interfaces


for load sharing reasons, but if you do this, you need to make sure that
the hardware and the drivers support it. Unlike IPv4 with IPv6, all zeros
and ones are legal values for any field in an address.

A typical IPv6 address consists of three parts as shown in Figure


11.10.

 Global routing prefix: It is used to identify a special address, such as


multicast, or an address range assigned to a site.
 Subnet ID: This part is used to identify a link within a site. The subnet ID
may also be referred to as subnet prefix or simply "subnet". A subnet ID
is associated with one link. Multiple subnet IDs may be assigned to one
link.
 Interface ID: An interface ID is used to identify an interface on a link and
needs to be unique on that link.

The first few bits of the IPv6 address don't specify the class, but they tell
something about the address. For example, where the address has been
assigned an address type and is known as the format prefix.

The amount of space used for these prefixes are specified by the formula
1 / 2 X, where x is the number of bits used. For example, if the first 8 bits
are 0000 0000, then this is 1 / 2 8, or 1/256.

Prefixes are also used in this environment just like in the CIDR
environment. A /30 indicates the first 30 bits are used for routing. Also
notice that fields in certain types of addresses are given names to further
identify the sub address portions.

There are three address types that are assigned out of the 0000 0000
format prefix space. These are the “unspecified address,” the loopback
address, and the IPv6 addresses with embedded IPv4 addresses. This
allocation supports the direct allocation of provider addresses, local use
addresses, and multicast addresses. Space is reserved for NSAP addresses,
IPX addresses, and geographic addresses. The remainder of the address
space is unassigned for future use. This can be used for expansion of existing
use (e.g., additional provider addresses, etc.) or new uses (e.g., separate
locators and identifiers).

A value of FF (11111111) identifies an address as a multicast address; any


other value identifies an address as a unicast address. Multicast addresses
are used extensively throughout auto configuration of addresses and
neighbor discovery. Anycast addresses are taken from the unicast address
space, and are not syntactically distinguishable from unicast addresses.

Module IV
48

A 128-bit address obviously allows scope for 2128 distinct addresses.

IPv6 addresses are represented for human manipulation using


hexadecimal encoding with a colon placed between each 16-bit word.

The first bits of an IPv6 address, called the Format Prefix (FP), indicate
the use to which the address is put and the format of its contents. They are
now managed by the Internet Assigned Numbers Authority (IANA). The
number of FP bits varies from usage to usage, but can always be determined
by the pattern of the early bits. Table 11.8 lists the currently defined FP bit
settings.

4.1.2 IPv6 Address Formats

There are five addresses types identified by the Format Prefix bits shown
in Table 11.8.

1. Global unicast addresses are formatted as shown in Figure 11.11. The


address is broken into three topology-related segments.
 Public Topology contains four fields:
a. Format Prefix (FP): 3 bits information field identifies the address
type.
b. Top Level Aggregation ID (TLA ID): 13-bits used by the naming
authorities to identify up to 8192 major ISPs or carriers.

Module IV
49

c. Next Level Aggregation ID (NLA ID): 24-bits is used by an individual


major ISP to subdivide its address space for administrative purposes
or for assignment to small ISPs or customer networks that get their
IPv6 Internet attachment through the larger ISP.
d. Reserved: 8 bits between the TLA ID and NLA ID make it possible to
extend the range of either of these fields in the future if necessary.

 Site Topology: 16bit field contains Site Level Aggregation ID (SLA ID),
which is used by an ISP or organization to break their network up into as
many as 65,536 smaller administrative chunks.
 Interface Topology: 64 bits of the address used for the Interface ID to
identify an individual router, host, or interface.

2. Link Local Unicast Addresses: (see Figure 11.12) are used between
neighbors on the same link. Their scope is limited to the link and they
are not distributed more widely. This is useful for dial-up devices or for
hosts on a local network.

3. Site Local Unicast Addresses: As shown in Figure 11.13, the site local
address includes a subnetwork ID which can be used in a hierarchical
manner within the organization’s network in the same way as the SLA ID
in the global address are equivalent to the three reserved address ranges
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 in IPv4. They are
addresses that are allocated within an organization but are not
distributed more widely. Hosts using site local addresses rely on Network

Module IV
50

Address Translation to access the wider Internet.

4. Multicast addresses: The multicast address format is shown in Figure


11.14. It contains in addition to FT and reserved fields the following
other fields:
 T-bit flag: It is used to indicate that the address is transient (1) or is
permanently assigned (0).
 Scope: 4 bits indicates how the group ID should be interpreted and how
widely it applies only a few values have been defined so far, as shown in
Table 11.9. The rest of the address carries the group identifier which is
otherwise unstructured.

5. Network Service Access Point (NSAP) addresses: NSAP address is encoded


into 121 bits within the IPv6 address, as shown in Figure 11.15. The NSAP
address is a 40-digit hexadecimal string.

Module IV
51

4.2 Managing the Address Space

The Internet’s stability is directly dependent on the uniqueness of


publicly used network addresses. Thus, some mechanism was needed to
ensure that addresses were, in fact, unique. This responsibility originally
rested within an organization known as the Internet Network Information
Center (InterNIC). This organization is now defunct and was succeeded by
the Internet Assigned Numbers Authority (IANA). .

One important goal is to ensure that duplication of publicly used


addresses does not occur. Such duplication would cause instability on the
Internet, and compromise its ability to deliver datagrams to networks using
the duplicated addresses.

The Internet Registry (IR) hierarchy was established in order to achieve


address uniqueness, distribution of hierarchical distribution of global
Internet addresses, and, most of all, produce a conservation of IPv4 Internet
addresses. It consists of IANA, Regional IRs, and Local IRs.

The IANA is the Internet Assigned Numbers Authority, and it has overall
authority for the number space used in the Internet. This number space
includes port number, address, IP version numbers, and many other
significant number assignments.

The Regional IRs operate under the authority of IANA. They operate in
large geographical areas such as continents. Currently, there are three
defined:

 The American Registry for Internet Numbers (ARIN), which manages


North America, South America, and sub-Saharan Africa
 Réeseaux IP Européens (RIPE), which manages Europe and North Africa
 The Asia Pacific Network Information Center (APNIC), which manages
Asia and Australia

These IRs do not cover all areas. It is expected that each IR covers any
area not specifically specified, but within its immediate area. Local IRs are
established under the authority of the regional IR and IANA. They cover
national dimensions.

Module IV
52

Addresses are allocated to ISPs by regional registries, which in turn assign


them to their customer Base. ISPs that exchange routing information
directly with other ISPs get their address allocation from their geographic
IR. Other ISPs are referred to these ISPs for address assignment. In other
words, if your address block has a reasonable chance of being propagated
through the global Internet routing tables, then your address allocation will
come from the IR. Otherwise, you will get your address assignment from
your upstream ISP. Customers (commercial corporations) need not worry
about this. They will get their address assignments from the ISP they sign up
with. This is just a basic introduction to the IP addressing scheme.

IANA, too, has been dismantled, and the new caretaker of the Internet’s
names and address numbers is the Internet Corporation for the Assignment
of Names and Numbers (ICANN). ICANN is currently creating a competitive
registry structure that will enable commercial entities to compete with each
other in the registration of IP names and numbers.

Module IV
53

 EXERCISE

1. What are the five IPv6 addresses types?


2. Explain the role of the IANA in managing the address space.

Module IV

You might also like