Você está na página 1de 13

X INTRODUCTION

From its beginning as a research collaboration tool useful to a handful of students


and scientists, the Internet has become a universal communication tool
connecting people around the globe as never before.

Individuals, businesses, and governments are making increasing demands for
Internet resources. In order to accommodate this phenomenal growth, a much
larger pool of unique identifiersaddressesis required.

The most common Internet address assignment scheme in use today-IPv4 -
provides the bank of routing addresses based on the size of the organisation. This
is referred to as classful IP addressing. Three variants of classful addressing are in
common use today: Class A for extremely large organisations, Class B for large
organisations, and Class C for smaller organisations (see Table 5.1).


T
T
o
o
p
p
i
i
c
c
5
5

IP Addressing
X


By the end of this topic, you should be able to:
1. Name the addressing scheme widely used at network layer;
2. State five IPv4 classes;
3. State techniques to overcome the shortcoming of classful IPv4
addresses;
4. Identify the IP address and sub netting for Class C network; and
5. List several reserved IPv4 addresses.
LEARNING OUTCOMES
TOPIC 5 IP ADDRESSING W


73
Table 5.1: IPv4 Classes
IP Address Class High Order Bits
First Octet Address
Range
Number of Bits in the
Network Address
Class A 0 0 127 * 8
Class B 10 128 191 16
Class C 110 192 223 24
Class D 1110 224 - 239 28

* The 127.x.x.x address range is reserved as a loopback address, used for testing and
diagnostic purposes.

Unforeseen limitations to classful addressing have been found as the demand for
IP addresses has grown. Various workarounds have been developed to help
overcome the limitations of classful addressing and accommodate the
exponential growth in demand for IP addresses. These include subnetting,
Variable Length Subnet Mask (VLSM) subnetting and Classless Interdomain
Routing (CIDR).

Another workaround is to use reserved or private addresses within an
organisation and have a Network Address Translator/Port Address Translator
(NAT/PAT) between the public Internet and the corporate network. This method
is frequently implemented as a part of an overall security plan.

Unless the growth of Internet routing tables can be controlled, whole sections of
the Internet may simply disappear as Internet backbone routers are forced to
drop routes because of address exhaustion and the high volume of routing
information that they must process.

The long-term solution to these problems lies in the widespread deployment of IP
Next Generation, known as IPng or IPv6, which provides a greatly expanded
range of addresses. IPv4 addresses are 32 bits in length, whereas IPv6 is a 128-bit
addressing scheme.




X TOPIC 5 IP ADDRESSING


74

THE REVOLUTION OF
TELECOMMUNICATIONS
INFRASTRUCTURE
Every machine on the Internet has a unique identifying number, called an IPv4
address. A typical IPv4 address looks like this:
x 216.27.61.137
To make it easier for us humans to remember, IPv4 addresses are normally
expressed in decimal format as a "dotted decimal number" like the one above. But
computers communicate in binary form. Look at the same IPv4 address in binary:
x 11011000.00011011.00111101.10001001
The four numbers in an IPv4 address are called octets, because they each have
eight positions when viewed in binary form. If you add all the positions together,
you get 32, which is why IPv4 addresses are considered 32-bit numbers. Since
each of the eight positions can have two different states (1 or 0), the total number
of possible combinations per octet is 2
8
or 256. So each octet can contain any value
between 0 and 255. Combine the four octets and you get 2
32
or a possible
4,294,967,296 unique values!

Out of the almost 4.3 billion possible combinations, certain values are restricted
from use as typical IP addresses. For example, the IPv4 address 0.0.0.0 is reserved
for the default network and the address 255.255.255.255 is used for broadcasts.

The octets serve a purpose other than simply separating the numbers. They are
used to create classes of IPv4 addresses that can be assigned to a particular
business, government or other entity based on size and need. The octets are split
into two sections: Net and Host. The Net section always contains the first octet. It
is used to identify the network that a computer belongs to. Host (sometimes
referred to as Node) identifies the actual computer on the network. The host
section always contains the last octet. There are five IPv4 classes plus certain
special addresses:
x Default Network - The IPv4 address of 0.0.0.0 is used for the default network.
x Class A - This class is for very large networks, such as a major international
company might have.
- IPv4 addresses with a first octet from 1 to 126 are part of this class.
- The other three octets are used to identify each host.
- Valid Host IP addresses range from 1.0.0.1-126.255.255.254.
5.1
TOPIC 5 IP ADDRESSING W


75
- This means that there are 126 Class A networks each with 16,777,214 (2
24

-2) possible hosts for a total of 2,147,483,648 (2
31
) unique IPv4 addresses.
Class A networks account for half of the total available IPv4 addresses.
- In Class A networks, the high order bit value (the very first binary
number) in the first octet is always 0. Example as follows:
Net Host or Node
Hexadecimal 115. 24.53.107
Binary 01110011. 00011000.00110101.01101011

x Loopback - The IPv4 address 127.0.0.1 is used as the loopback address.
- This means that it is used by the host computer to send a message back
to itself.
- It is commonly used for troubleshooting and network testing.
Net Host or Node
Hexadecimal 127. 0.0.0.1
Binary 01111111. 00000000.00000000.00000001

x Class B - Class B is used for medium-sized networks. A good example is a
large college campus.
- IPv4 addresses with a first octet from 128 to 191 are part of this class.
- Class B addresses also includes the second octet as part of the Net
identifier.
Valid Host IP addresses range from 128.1.0.1-191.255.255.254.
- The other two octets are used to identify each host.
- This means that there are 16,384 (214) Class B networks each with 65,534
(216 -2) possible hosts for a total of 1,073,741,824 (230) unique IPv4
addresses.
- Class B networks make up a quarter of the total available IPv4 addresses.
- Class B networks have a first bit value of 1 and a second bit value of 0 in
the first octet. Example as folows:
Net Host or Node
Hexadecimal 145.24. 53.107
Binary 10010001.00011000. 00110101. 01101011

X TOPIC 5 IP ADDRESSING


76
x Class C - Class C addresses are commonly used for small to mid-size
businesses.
- IPv4 addresses with a first octet from 192 to 223 are part of this class.
- Class C addresses also include the second and third octets as part of the
Net identifier.
- The last octet is used to identify each host.
- Valid Host IP addresses range from 192.0.1.1-223.255.255.254.
- This means that there are 2,097,152 (2
21
) Class C networks each with 254
(2
8
-2) possible hosts for a total of 536,870,912 (2
29
) unique IPv4 addresses.
- Class C networks make up an eighth of the total available IPv4 addresses.
- Class C networks have a first bit value of 1, second bit value of 1 and a
third bit value of 0 in the first octet. Example as follows:

Net Host or Node
Hexadecimal 195.24.53. 107
Binary 11000011.00011000.00110101. 01101011

x Class D - Used for multicasts, Class D is slightly different from the first three
classes.
x It has a first bit value of 1, second bit value of 1, third bit value of 1 and fourth
bit value of 0.
x The other 28 bits are used to identify the group of computers the multicast
message is intended for. Class D accounts for 1/16
th
(268,435,456 or 2
28
) of the
available IPv4 addresses. Example as follows:

Net Host or Node
Hexadecimal 224. 24.53.107
Binary 11100000 00011000.00110101.01101011

x Class E - Class E is used for experimental purposes only. Like Class D, it is
different from the first three classes.
x It has a first bit value of 1, second bit value of 1, third bit value of 1 and fourth
bit value of 1.
TOPIC 5 IP ADDRESSING W


77
x The other 28 bits are used to identify the group of computers the multicast
message is intended for.
x Class E accounts for 1/16
th
(268,435,456 or 2
28
) of the available IPv4
addresses.
Net Host or Node
Hexadecimal 240. 24.53.107
Binary 11110000 00011000.00110101.01101011
x Broadcast - Messages that are intended for all computers on a network are
sent as broadcasts. These messages always use the IP address 255.255.255.255.
or binary 11111111.11111111.11111111.11111111.

IP ADDRESS SERVICE
Currently, there are two types of Internet Protocol (IP) addresses in active use: IP
version 4 (IPv4) and IP version 6 (IPv6). IPv4 was initially deployed on 1
st

January 1983 and is still the most commonly used version. IPv4 addresses are 32-
bit numbers often expressed as 4 octets in "dotted decimal" notation (for example,
192.0.32.67). Deployment of the IPv6 protocol began in 1999. IPv6 addresses are
128-bit numbers and are conventionally expressed using hexadecimal strings (for
example, 1080:0:0:0:8:800:200C:417A).

Both IPv4 and IPv6 addresses are assigned in a delegated manner. Users are
assigned IP addresses by Internet service providers (ISPs). ISPs obtain allocations
of IP addresses from a local Internet registry (LIR) or national Internet registry
(NIR), or from their appropriate regional Internet registry (RIR) as follows:
x Asia Pacific Network Information Centre (APNIC) in Asia/Pacific Region;
x American Registry for Internet Numbers (ARIN) in North America and Sub-
Sahara Africa;
x Regional Latin-American and Caribbean IP Address Registry (LACNIC) in
Latin America and some Caribbean Islands; and
x Rseaux IP Europens (RIPE-NCC)in Europe, the Middle East, Central Asia,
and African countries located north of the equator.

5.2
X TOPIC 5 IP ADDRESSING


78
The Internet Assigned Number Authority (IANA) role on the other hand is to
allocate IP addresses from the pools of unallocated addresses to the RIRs
according to their established needs. When an RIR requires more IP addresses for
allocation or assignment within its region, the IANA makes an additional
allocation to the RIR.

IANA carefully manages the remaining supply of IP addresses to ensure that
duplication of publicly used addresses does not occur. Duplication would cause
instability in the Internet and compromise its ability to deliver datagrams to
networks.

CASE STUDY: IP ASSIGNMENT AND
SUBNETTING FOR CLASS C NETWORK


What is subnetting?

Subnetting is the process of borrowing bits from the HOST bits, in order to divide
the larger network into small subnets.

Subnetting does NOT give you more hosts, but actually costs you hosts.

You lose two host IP Addresses for each subnet, and perhaps one for the subnet
IP address and one for the subnet broadcast IP address.

You lose the last subnet and all of its hosts IP addresses as the broadcast for that
subnet is the same as the broadcast for the network.

In older networks, you would have lost the first subnet, as the subnet IP address
is the same as the network IP address. (This subnet can be used in most
networks.)

As mentioned earlier, subnetting is one of the techniques used to overcome the
shortage of Classful IPv4 addresses. Other schemes used are Private addressing
with NAT/PAT, Supernetting and IPv6.

5.3
TOPIC 5 IP ADDRESSING W


79
Let us demonstrate how to subnetting class C IPv4 Address by the following
example:
Given the following scenario:
An academic institution has acquired a Class C address 192.168.1.0 from the local
TELCO. The company needs to create subnets to provide low level security and
broadcast control on the LAN. The LAN consists of the following, each of which
will require its own subnet:
x Classroom #1 28 nodes
x Classroom #2 22 nodes
x Computer lab 30 nodes
x Instructor 12 nodes
x Administration 8 nodes

Answer the following:
(a) How many subnets are needed for this network?
(b) What is the subnet mask for this network?
(i) Dotted decimal
(ii) Binary
(iii) Slash format
(c) How many usable hosts are there per subnet?
(d) Complete the following table

Subnet # Sub Network IP Host Range Broadcast









X TOPIC 5 IP ADDRESSING


80
(e) What is the host range for subnet six?
(f) What is the broadcast address for the 3rd subnet?
(g) What is the broadcast address for the major network?
(h) Is 192.168.1.32 a usable IP address?
(i) What is the first usable address in the 3rd subnet?
(j) What is the last address for the 4th subnet?
(k) Are 192.168.1.45 and 192.168.1.65 in the same subnet?

Before we show you the step by step processes on how to find Subnet IP, Host
Range and Broadcast, let us recap on the truth table for NOT, OR, AND and XOR
operators. Details of these operations are available in any Digital Electronic
books.
INPUT OUTPUT
A B NOT A A OR B A AND B A XOR B
0 0 1 0 0 0
0 1 1 1 0 1
1 0 0 1 0 1
1 1 0 1 1 0


Figure 5.1: Not, OR, AND and XOR gates for single bit input
TOPIC 5 IP ADDRESSING W


81
Later in the solution we are going to AND 8 bits binary number.

When you AND, if both input are 1 then the ouput will be 1, other than that the
output will be 0. Therefore if you have the binary number 11111111 AND with
11111111 the result will be 11111111.

If on the other hand you have binary YYYYYYYY AND with 00000000 you will
always get 00000000 where Y is bit 0 or 1.

However ANDing YYYYYYYY with 11111111 will give you YYYYYYYY back.

For example:
x 10101011 AND 00000000 equals to 00000000
x 10101011 AND 11111111 equals to 10101011
How do we get this value?

You need to AND each bit at a time from right to left , hence



Now let us see the solution for the above problem on IPV4 subnetting.

Step by Step to Find Subnet IP, Host Range and Broadcast ID

1. First, find the network ID. This is done by ANDing the given IP address
with Default Subnet Mask.
Information: The default subnet mask for class C is 255.255.255.0
Regardless the problem in hand the network IP address/
Network ID for the customise network remain in its class,
hence always AND the given IP address with the right
default Subnet Mask.





X TOPIC 5 IP ADDRESSING


82
Working in decimal

Operand 1st Octet 2nd Octet 3rd Octet 4th Octet
192. 168. 1. 0
AND 255. 255. 255 0
Result 192 168 1 0

OR in binary

Operand 1st Octet 2nd Octet 3rd Octet 4th Octet
11000000 10101000 00000001 00000000
AND 11111111 11111111 11111111 00000000
Result 11000000 10101000 00000001 00000000
Result: Network ID is 192.168.1.0 which is also the Zero Subnet for
IPv4 address

2. Find the Subnet bit to be borrowed.
Information: Number of subnet that is required by the academy is equal
to five (5), one for each group.
Formula: 2
n
2 where n is the number of borrow bits from the 4
th

Octet.
Rule of Thumb: 3 bits since 2
3
2 is 6 and since the number of subnet that
we require is 5 hence one subnet is available for future
used. If we choose 2 bits then we only have 2
2
2 = 2
subnet and if we choose 4 bits to be borrowed then we have
2
4
2 = 14 subnets. Therefore 3 borrowed bits are just what
doctors order.

3. Find the new Subnet Mask for the customise network.

4. In binary 11111111 11111111 11111111 11100000

5. Convert Subnet Mask to decimal value

6. In decimal 255 255 255 224

7. Find the Host bit left in the 4th Octet
Information: Maximum number of host required per subnet is 30
Formula: 2
m
2 where m is the number of host bits left in the 4th
Octet

TOPIC 5 IP ADDRESSING W


83
Rule of Thumb: 5 bits because 2
5
2 is 30 and maximum number of host
per network is 30 is just nice.

8. Complete the Subnet IP, refer to answer (d)

9. Complete Broadcast Address- Largest Address in Subnet, refer to answer
(d)

10. Find usable host range, refer to answer (d) whereby First address = Subnet
IP + 1 and Last address = Broadcast Address 1

ANSWERS:

(a) 2
3
2 = 6 , this network only requires 5 subnets hence there will be one extra
subnet.

(b) Dotted Notation 255.255.255.224
Binary Notation 11111111.11111111.11111111.11100000
Slash Notation 192.168.1.0/27 (count all ones the binary notation)
(c) 2
5
2 = 30, Maximum of 30 hosts per subnet.
(d) Customise network

Usable Subnet Subnet # Subnetwork IP Host Range Broadcast
*Not in used 0 Subnet 192.168.1.0 192.168.1.1-192.168.1.30 192.168.1.31
Classroom #1 1st Subnet 192.168.1.32 192.168.1.33-192.168.1.62 192.168.1.63
Classroom #2 2nd Subnet 192.168.1.64 192.168.1.65-192.168.1.94 192.168.1.95
Computer Lab 3rd Subnet 192.168.1.96 192.168.1.97-192.168.1.126 192.168.1.127
Instructor 4th Subnet 192.168.1.128 192.168.1.129-192.168.1.158 192.168.1.159
Administrator 5th Subnet 192.168.1.160 192.168.1.161-192.168.1.190 192.168.1.191
Extra Subnet 6th Subnet 192168.1.192 192.168.1.193-192.168.1.222 192.168.1.223
*Not in Used 7th Subnet 192.168.1.224 192.168.1.225-192.168.1.254 192.168.1.255
* Note that Zero Subnet and the Last Subnet are reserved by Network
Administrator for other used and not are assigned to host. These are reserved
subnets.


X TOPIC 5 IP ADDRESSING


84
(e) 192.168.1.193-192.168.1.222
(f) 192.168.1.127
(g) 192.168.1.255
(h) No, since it is the subnetwork IP for 1st Subnet.
(i) First usable in 3rd Subnet is 192.168.1.97
(j) Last usable address in 4th Subnet is 192.168.1.158
(k) No sin 192.168.1.45 is in 1st Subnet and 192.168.1.65 in 2nd Subnet.


x This topic describes IPv4 Addressing scheme for network layer. Step by step
example to find IPv4 Addressing and Subnetting for Class C network is
shown.
x In addition to IPv4 subnetting, other techniques such as using Private
Address with NAT/PAT, IPv6, supernetting, VLSM and CIDR are used to
overcome the shortage of logical address at network layer.
x Though some of these schemes are beyond the syllabus and therefore briefly
mentioned.

Broadcast
Classless Interdomain Routing Class
(CIDR)
Classful Network
Classless Network
Internet Assign Number Authority
(IANA)
Multicast
Unicast
Variable Length Subnet Mask (VLSM)

Internet Assign Number Authority. Retrieved April 9, 2009 from
http://computer.howstuffworks.com/framed.htm?parent=dns.htm&url=
http://www.iana.org

Você também pode gostar