0% found this document useful (0 votes)
62 views20 pages

Chapter06.IP Addressing

Uploaded by

Vijaya Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views20 pages

Chapter06.IP Addressing

Uploaded by

Vijaya Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

E2-E3: ENTERPRISE & WHOLESALE

CHAPTER-6
IP ADDRESSING
(Date of Creation:01-04-2011)

BSNL, India For Internal Circulation Only Page: 1


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

IP Addressing

1.0. IP Addressing – Introduction


IP is Internet Protocol & is responsible for moving packet of data from node to node. &
forwarding each packet based on a four-byte destination address (the IP address).

Each host on the internet is assigned a 32-bit integer address called its internet address or
IP address. The clever part of internet addressing is that the integers are carefully chosen
to make routing efficient. Every host and router on the internet has an IP address, which
encodes its network number and host number. The combination is unique: no two
machines have the same IP address. The address is coded to allow a variable allocation of
bits to specify network and host.

The IP address scheme is to break up the binary number into pieces and represent each
piece as a decimal number. A natural size for binary pieces is 8 bits, which is the familiar
byte or octet (octet is the telecommunication term, but two words can be used
interchangeably). So let‟s take our binary number , write it using groups of 8 bits, and
then represent each group as a decimal number: This is called Dotted Decimal Notation

Example 1: 140.179.220.200
It is sometimes useful to view the values in their binary form.
140 .179 .220 .200
10001100.10110011.11011100.11001000
Every IP address consists of two parts, one identifying the network and one identifying
the host. The Class of the address and the subnet mask determine which part belongs to
the network address and which part belongs to the host address.
10111100 00011010 000111110 00111100
156 26 30 60
We can use a dot as a separator. Now our IP address has the form

Example 2: 156.26.30.60
which is referred to as the dotted decimal notation.

2.0. IP Address should be hierarchical


For a protocol to be routable, its address structure must be hierarchical, meaning that the
address must contain at least two parts: the network portion and the host portion. A host

BSNL, India For Internal Circulation Only Page: 2


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011
is an end station such as a computer workstation, a router or a printer, whereas a network
consists of one or more hosts.
3.0. Addressing Scheme & Classes
• Two types of addressing schemes for IPv4
– Classfull
– Classless
• Classfull
– Original style of addressing based on first few bits of the address.
– Generally used in customer sites.
• Classless
– A new type of addressing that disregards the class bit of an address (first 4
bits) and applies a variable prefix (mask) to determine the network number.

This encoding provides flexibility in assigning addresses to host and allows a mix of
network sizes on an internet. In particular, the three network classes are best suited to the
following conditions:

 Class A: Few networks, each with many hosts. It allows for up to 126 networks with
16 million hosts each.
 Class B: Medium number of networks, each with a medium number of hosts. It allows
for up to 16,328 networks with up to 64K hosts each;
 Class C: Many networks, each with a few hosts. It allows for up to 2 millions
networks with up to 254 hosts each;
 Class D: Reserved for IP Multicasting.
 Class E: Reserved for future use. Addresses beginning with 1111 are reserved for
future use.

3.1. More about IP address Classes


You can determine which class any IP address is in by examining the first 4 bits of the IP
address.
 Class A addresses begin with 0xxx, or 1 to 126 decimal.
 Class B addresses begin with 10xx, or 128 to 191 decimal.
 Class C addresses begin with 110x, or 192 to 223 decimal.
 Class D addresses begin with 1110, or 224 to 239 decimal.
 Class E addresses begin with 1111, or 240 to 254 decimal.

Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for
internal testing on a local machine. [You can test this: you should always be able to ping

BSNL, India For Internal Circulation Only Page: 3


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

127.0.0.1, which points to yourself] Class D addresses are reserved for multicasting.
Class E addresses are reserved for future use. They should not be used for host addresses.
Now we can see how the Class determines, by default, which part of the IP address
belongs to the network (N) and which part belongs to the host (h).

 Class A -- NNNNNNNN.hhhhhhhh. hhhhhhhh. hhhhhhhh


 Class B -- NNNNNNNN.NNNNNNNN. hhhhhhhh. hhhhhhhh
 Class C -- NNNNNNNN.NNNNNNNN.NNNNNNNN. hhhhhhhh

In the example, 140.179.220.200 is a Class B address so by default the Network part of


the address (also known as the Network Address) is defined by the first two octets
(140.179.x.x) and the host part is defined by the last 2 octets (x.x.220.200).

In order to specify the network address for a given IP address, the host section is set to all
"0"s. In our example, 140.179.0.0 specifies the network address for 140.179.220.200.
When the host section is set to all "1"s, it specifies a broadcast that is sent to all hosts on
the network. 140.179.255.255 specifies the example broadcast address. Note that this is
true regardless of the length of the host section.
3.2. Class-A address

• Number of Networks = 27 i.e.128 (0-127)


• Network ID „0‟ is not used & Network ID „127‟ is reserved for loop back and is
used for internal testing.
• Number of Networks = 126
• Network IDs = 1-126
• Number of Hosts=224=16,777,216
• No Host ID can have all zeros i.e. 0.0.0 as it specifies network address & no Host
ID can have all ones i.e. 255.255.255 as it specifies the broadcast address.
• Number of Hosts per network= 224 -2=16777214
• Class A networks are referred as"/8s" network, since they have a 8-bit network-
prefix

BSNL, India For Internal Circulation Only Page: 4


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

3.3. Class-B address

• Number of Networks = 214 i.e.16384


• Number of Hosts = 216 i.e. 65,536 (0-65,535)
• No Host ID can have all zeros
i.e. 0.0 and specifies network address.
• No Host ID can have all ones
i.e. 255.255 and specifies the broadcast address.
• Number of Hosts per network= 216 -2=65534
• Class B networks are referred as "/16s" Network, since they have a 16-bit
network-prefix

3.4. Class-C address

• Number of Networks = 221 i.e. 2097152


• Number of Hosts = 28 i.e. 256 (0-255)
• No Host ID can have all zeros
i.e. 00000000 and specifies network address.
• No Host ID can have all ones
i.e. 11111111 and specifies the broadcast address.
• Number of Hosts = 28-2 = 254
• Class A networks are referred to as "/24s“ Networks since they have a 24-bit
network-prefix.

3.5 Class-D & E addresses

• Class D are special addresses are known as multicast addresses

BSNL, India For Internal Circulation Only Page: 5


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

• This address is assigned to a group of networks and not to represent a unique


address
• This address is used to send IP datagrams to a group but not to all the hosts on the
network
• This address is also used to address router update messages

3.6. Summary
Class Higher Order Bit Address range No of No. of Hosts
Networks
Class A 0XXXXXXX 1 to 126 126 16,777,214
Class B 10XXXXXX 128 to 191 16384 65534
Class C 110XXXXX 192 to 223 2097152 254
Class D 1110XXXX 224 to 239 Multicasting

Class E 1111XXXX 240 to 254 For Future use

4.0. Subnetting
Chopping up of a network into a number of smaller networks is called subnetting..It
allows to assign some of the bits, normally used by the host portion of the address, to the
network portion of the address. Subnet is a real network under a network. Any of the
classes can be subnetted. Subnetting allows efficiently uses the full network address.

The format of subnetted IP address would be <network number, subnet number, host
number>

Subnetting an IP Network can be done for a variety of reasons, including organization,


use of different physical media (such as Ethernet, FDDI, WAN, etc.), preservation of
address space, and security. The most common reason is to control network traffic. In an
Ethernet network, all hosts on a segment see all the packets transmitted by all the other
hosts on that segment. Performance can be adversely affected under heavy traffic loads,
due to collisions and the resulting retransmissions. A router is used to connect IP
networks to minimize the amount of traffic each segment must receive.

BSNL, India For Internal Circulation Only Page: 6


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

4.1. Subnet Masking


Applying a subnet mask to an IP address allows you to identify the network and host
parts of the address. The network bits are represented by the 1s in the mask, and the host
bits are represented by the 0s. Performing a bitwise logical AND operation between the
IP address and the subnet mask results in the Network Address or Number.

For example, using our test IP address and the default Class B subnet mask, we get:
10001100.10110011.11110000.11001000 140.179.240.200 Class B IP Address
11111111.11111111.00000000.00000000 255.255. 0. 0 Default Class B S/N Mask
--------------------------------------------------------
10001100.10110011.00000000.00000000 140.179.0.0 Network Address

Default Subnet masks:


 Class A - 255.0.0.0 - 11111111.00000000.00000000.00000000
 Class B - 255.255.0.0 - 11111111.11111111.00000000.00000000
 Class C - 255.255.255.0 - 11111111.11111111.11111111.00000000

4.2 More Restrictive Subnet Masks


Additional bits can be added to the default subnet mask for a given Class to further
subnet, or break down, a network. When a bitwise logical AND operation is performed
between the subnet mask and IP address, the result defines the Subnet Address (also
called the Network Address or Network Number). There are some restrictions on the
subnet address. Host addresses of all "0"s and all "1"s are reserved for specifying the
local network (when a host does not know it's network address) and all hosts on the
network (broadcast address), respectively. This also applies to subnets. A subnet address
cannot be all "0"s or all "1"s. This also implies that a 1 bit subnet mask is not allowed.
This restriction is required because older standards enforced this restriction. Recent
standards that allow use of these subnets have superceded these standards, but many
"legacy" devices do not support the newer standards. If you are operating in a controlled
environment, such as a lab, you can safely use these restricted subnets.

To calculate the number of subnets or hosts, use the formula (2n-2) where n = number of
bits in either field, and 2n represents 2 raised to the nth power. Multiplying the number of
subnets by the number of hosts available per subnet gives you the total number of hosts
available for your class and subnet mask. Also, note that although subnet masks with
non-contiguous mask bits are allowed, they are not recommended.

BSNL, India For Internal Circulation Only Page: 7


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

Example:
10001100.10110011.11011100.11001000 140.179.220.200 IP Address
11111111.11111111.11100000.00000000 255.255.224.000 Subnet Mask
--------------------------------------------------------
10001100.10110011.11000000.00000000 140.179.192.000 Subnet Address
10001100.10110011.11011111.11111111 140.179.223.255 Broadcast Address
In this example a 3 bit subnet mask was used. There are 6 (23-2) subnets available with
this size mask (remember that subnets with all 0's and all 1's are not allowed). Each
subnet has 8190 (213-2) hosts. Each subnet can have hosts assigned to any address
between the Subnet address and the Broadcast address. This gives a total of 49,140 hosts
for the entire class B address subnetted this way. Notice that this is less than the 65,534
hosts an unsubnetted class B address would have.

You can calculate the Subnet Address by performing a bitwise logical AND operation
between the IP address and the subnet mask, then setting all the host bits to 0s. Similarly,
you can calculate the Broadcast Address for a subnet by performing the same logical
AND between the IP address and the subnet mask, then setting all the host bits to 1s. That
is how these numbers are derived in the example above.

Subnetting always reduces the number of possible hosts for a given network. There are
complete subnet tables available here for Class A, Class B and Class C. These tables list
all the possible subnet masks for each class, along with calculations of the number of
networks, hosts and total hosts for each subnet.

4.3 An Example
Here is another, more detailed, example. Say you are assigned a Class C network number
of 200.133.175.0 (apologies to anyone who may actually own this domain address). You
want to utilize this network across multiple small groups within an organization. You can
do this by subnetting that network with a subnet address.

We will break this network into 16 subnets of 14 hosts each. This will limit us to 224
hosts on the network instead of the 254 we would have without subnetting, but gives us
the advantages of traffic isolation and security. To accomplish this, we need to use a
subnet mask 4 bits long.

Recall that the default Class C subnet mask is


255.255.255.0 (11111111.11111111.11111111.00000000 binary)

BSNL, India For Internal Circulation Only Page: 8


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

Extending this by 4 bits yields a mask of


255.255.255.240 (11111111.11111111.11111111.11110000 binary)

This gives us 16 possible network numbers:


Subnet bits Network Number Host Addresses Broadcast Address
0000 200.133.175.0 .1 thru .14 200.133.175.15

0001 200.133.175.16 .17 thru .30 200.133.175.31

0010 200.133.175.32 .33 thru .46 200.133.175.47

0011 200.133.175.48 .49 thru .62 200.133.175.63

0100 200.133.175.64 .65 thru .78 200.133.175.79

0101 200.133.175.80 .81 thru .94 200.133.175.95

0110 200.133.175.96 .97 thru .110 200.133.175.111

0111 200.133.175.112 .113 thru .126 200.133.175.127

1000 200.133.175.128 .129 thru .142 200.133.175.143

1001 200.133.175.144 .145 thru .158 200.133.175.159

1010 200.133.175.160 .161 thru .174 200.133.175.175

1011 200.133.175.176 .177 thru .190 200.133.175.191

1100 200.133.175.192 .193 thru .206 200.133.175.207


1101 200.133.175.208 .209 thru .222 200.133.175.223

1110 200.133.175.224 .225 thru .238 200.133.175.239

1111 200.133.175.240 .241 thru .254 200.133.175.255

4.4. Private Subnets


There are three IP network addresses reserved for private networks. The addresses are
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. .They are illustrated below.

1. 10.0.0.0 - 10.255.255.255 (10.0.0.0/8 prefix)


a. 24-bit block
b. Complete class-A network number

BSNL, India For Internal Circulation Only Page: 9


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

2. 172.16.0.0 - 172.31.255.255 (172.16.0.0/12 prefix)


a. 172.0001/0000.0.0-172.0001/1111.255.255
b. 20-bit block
c. Set of 16 contiguous class-B network numbers
3. 192.168.0.0-192.168.255.255 (192.168.0.0/16 prefix)
a. 16-bit block
b. Set of 256 contiguous class-C network numbers.

They can be used by anyone setting up internal IP networks, such as a lab or home LAN
behind a Router performing NAT (Network Address Translation) or proxy server. It is
always safe to use these because routers on the Internet will never forward packets
coming from these addresses. These addresses are defined in RFC 1918.

5.0. Supernetting:
The "classful" system of allocating IP addresses can be very wasteful; anyone who could
reasonably show a need for more that 254 host addresses was given a Class B address
block of 65533 host addresses. Even more wasteful were companies and organizations
that were allocated Class A address blocks, which contain over 16 Million host
addresses! Only a tiny percentage of the allocated Class A and Class B address space has
ever been actually assigned to a host computer on the Internet.

People realized that addresses could be conserved if the class system was eliminated. By
accurately allocating only the amount of address space that was actually needed, the
address space crisis could be avoided for many years. This was first proposed in 1992 as
a scheme called Supernetting. Under supernetting, the classful subnet masks are
extended so that a network address and subnet mask could, for example, specify multiple
Class C subnets with one address. For example, If I needed about 1000 addresses, I could
supernet 4 Class C networks together:
192.60.128.0 (11000000.00111100.10000000.00000000) Class C subnet address
192.60.129.0 (11000000.00111100.10000001.00000000) Class C subnet address
192.60.130.0 (11000000.00111100.10000010.00000000) Class C subnet address
192.60.131.0 (11000000.00111100.10000011.00000000) Class C subnet address
------------------------------------------------------------------------------------------------------------
----
192.60.128.0 (11000000.00111100.10000000.00000000) Supernetted address
255.255.252.0 (11111111.11111111.11111100.00000000) Subnet Mask
192.60.131.255 (11000000.00111100.10000011.11111111) Broadcast address

BSNL, India For Internal Circulation Only Page: 10


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

In this example, the subnet 192.60.128.0 includes all the addresses from 192.60.128.0 to
192.60.131.255. As you can see in the binary representation of the subnet mask, the
Network portion of the address is 22 bits long, and the host portion is 10 bits long.
Instead of spelling out the bits of the subnet mask, it is simply listed as the number of 1s
bits that start the mask. In the above example, instead of writing the address and subnet
mask as 192.60.128.0, Subnet Mask 255.255.252.0 the network address would be written
simply as: 192.60.128.0/22 which indicates starting address of the network, and number
of 1s bits (22) in the network portion of the address. If you look at the subnet mask in
binary (11111111.11111111.11111100.00000000), you can easily see how this notation
works.

6.0. CIDR – Classless Inter Domain Routing


IP has been in heavy use for over a decade. It has worked extremely well, as
demonstrated by the exponential growth of the Internet. Unfortunately, IP is rapidly
becoming a victim of its own popularity: it is running out of addresses. This looming
disaster has sparked a great deal of discussion and controversy within the Internet
community about what to do about it. In this section we will describe both the problem
and several proposed solutions. A more complete description is given in (Huitema, 1996).

Back in 1987, a few visionaries predicted that some day the Internet might grow to
100,000 networks. Most experts pooh-poohed this as being decades in the future, if ever.
The 100,000th network was connected in 1996. The problem, simply stated, is that the
Internet is rapidly running out of IP addresses. In principle, over 2 billion addresses exist,
but the practice of organizing the address space by classes waste millions of them. In
particular, the real villain is the class B network. For most organizations, a class A
network, with 16 million addresses is too big, and a class C network, with 256 addresses
is too small. A class B network, with 65,536, is just right. In Internet folklore, this
situation is known as the three bears problem (as in Goldilocks and the Three Bears).

In reality, a class B address is far too large for most organizations. Studies have shown
that more than half of all class B networks have fewer than 50 hosts. A class C network
would have done the job, but no doubt every organization that asked for a class B address
thought that one day it would outgrow the 8-bit host field. In retrospect, it might have
been better to have had class C networks use 10 bits instead of eight for the host number,
allowing 1022 hosts per network. Had this been the case, most organizations would have
probably settled for a class C network, and there would have been half a million of them
(versus only 16,384 class B networks).

BSNL, India For Internal Circulation Only Page: 11


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

However, then another problem would have emerged more quickly: the routing table
explosion. From the point of view of the routers, the IP address space is a two-level
hierarchy, with network numbers and host numbers. Routers do not have to know about
all the hosts, but they do have to know about all the networks. If half a million class C
networks were in use, every router in the entire Internet would need a table with half a
million entires, one per network, telling which line to use to get to that network, as well
as other information.

The actual physical storage of half a million entry tables is probably doable, although
expensive for critical routers that keep the tables in static RAM on I/O boards. A more
serious problem is that the complexity of various algorithms relating to management of
the tables grows faster than linear. Worse yet, much of the existing router software and
firmware was designed at a time when the Internet had 1000 connected networks and
10,000 networks seemed decades away. Design choices made then often are far from
optimal now.

In addition, various routing algorithms require each router to transmit its tables
periodically. The larger the tables, the more likely some parts will get lost underway,
leading to incomplete data at the other end and possibly routing instabilities.

The routing table problem could have been solved by going to a deeper hierarchy. For
example, having each IP address contain a country, state, city, network, and host field
might work. Then each router would only need to know how to get to each country, the
states or provinces in its own country, the cities in its state or province, and the networks
in its city. Unfortunately, this solution would require considerably more than 32 bits for
IP addresses and would use addresses inefficiently (Liechtenstein would have as many
bits as the United States).

In short, most solutions solve one problem but create a new one. One solution that is now
being implemented and which will give the Internet a bit of extra breathing room is CIDR
(Classless InterDomain Routing). The basic idea behind CIDR, which is described in
RFC 1519, is to allocate the remaining class C networks, of which there are almost two
million, in variable-sized blocks. If a site needs, say, 2000 addresses, it is given a block
of 2048 addresses (eight contiguous class C networks), and not a full class B address.
Similarly, a site needing 8000 addresses gets 8192 addresses (32 contiguous class C
networks).

BSNL, India For Internal Circulation Only Page: 12


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

In addition to using blocks of contiguous class C networks as units, the allocation rules
for the class C addresses were also changed in RFC 1519. The world was partitioned into
four zones, and each one given a portion of the class C address space. The allocation was
as follows:

Addresses 194.0.0.0 to 195.255.255.255 are for Europe


Addresses 198.0.0.0 to 199.255.255.255 are for North America
Addresses 200.0.0.0 to 201.255.255.255 are for Central and South America
Addresses 202.0.0.0 to 203.255.255.255 are for Asia and the Pacific

• Each zone is given about (2x224) 32 million addresses to allocate


• Another (20x224) 320 million Class-C addresses 204.0.0.0 to 223.255.255.255 are
reserved for future.
• 32 million address entries have been compressed to one router table entry.
• Any route outside Europe that gets packet addressed to 194.0.0.0 to
195.255.255.255 can just send it to Standard European Gateway.
• Once a packet gets to Europe (2x28x28) 131072 network entries are needed, if /16
bits prefix is used.

In this way, each region was given about 32 million addresses to allocate, with another
320 million class C addresses from 204.0.0.0 through 223.255.255.255 held in reserve for
the future. The advantage of this allocation is that now any router outside of Europe that
gets a packet addressed to 194.xx.yy.zz or 195.xx.yy.zz can just send it to its standard
European gateway. In effect 32 million addresses have now been compressed into one
routing table entry. Similarly for the other regions.

Of course, once a 194.xx.yy.zz packet gets to Europe, more detailed routing tables are
needed. One possibility is to have 131,070 entries for networks 194.0.0.xx through
195.255.255.xx, but this is precisely this routing table explosion that we are trying to
avoid. Instead, each routing table entry is extended by giving it a 32-bit mask. When a
packet comes in, its destination address is first extracted. Then (conceptually) the routing
table is scanned entry by entry, masking the destination address and comparing it to the
table entry looking for a match.

To make this comparison process clearer, let us consider an example. Suppose that
Cambridge University need 2048 addresses and is assigned the addresses 194.24.0.0
through 194.24.7.255, along with mask 255.255.248.0. Next, Oxford University asks for

BSNL, India For Internal Circulation Only Page: 13


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

4096 addresses. Since a block of 4096 addresses must lie on a 4096-byte boundary, they
cannot be given addresses starting at 194.8.0.0. Instead they get 194.24.16.0 through
194.24.31.255 along with mask 255.255.240.0. Now the University of Edinburgh asks for
1024 addresses and is assigned addresses 194.24.8.0 through 194.24.11.255 and mask
255.255.252.0.

The routing tables all over Europe are now updated with three entries, each one
containing a base address and a mask. These entries (in binary) are:
Address Mask

11000010 00011000 00000000 00000000 11111111 11111111 11111000 00000000


11000010 00011000 00010000 00000000 11111111 11111111 11110000 00000000
11000010
Now 00011000
consider 00001000
what happens when a 00000000 11111111
packet comes 11111111
in addressed 11111100
to 194.24.17.4, 00000000
which in
binary is
11000010 00011000 00010001 00000100
First it is Boolean ANDed with the Cambridge mask to get
11000010 00011000 00010000 00000000

This value does not match the Cambridge base address, so the original address is next
ANDed with the Oxford mask to get

11000010 00011000 00010000 00000000

This value does match the Oxford mask, so the packet is sent to the Oxford router. In
practice, the router entries are not tried sequentially; indexing tricks are used to speed up
the search. Also, it is possible for two entries to match, in which case the one whose mask
has the most 1 bits wins. Finally, the same idea can be applied to all addresses, not just
the new class C addresses, so with CIDR, the old class A, B and C network

BSNL, India For Internal Circulation Only Page: 14


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

Allowed Class A Subnet and Host IP addresses

# bits Subnet Mask CIDR # Subnets # Hosts Nets * Hosts

2 255.192.0.0 /10 2 4194302 8388604

3 255.224.0.0 /11 6 2097150 12582900

4 255.240.0.0 /12 14 1048574 14680036

5 255.248.0.0 /13 30 524286 15728580

6 255.252.0.0 /14 62 262142 16252804


7 255.254.0.0 /15 126 131070 16514820

8 255.255.0.0 /16 254 65534 16645636

9 255.255.128.0 /17 510 32766 16710660

10 255.255.192.0 /18 1022 16382 16742404

11 255.255.224.0 /19 2046 8190 16756740

12 255.255.240.0 /20 4094 4094 16760836

13 255.255.248.0 /21 8190 2046 16756740

14 255.255.252.0 /22 16382 1022 16742404

15 255.255.254.0 /23 32766 510 16710660

16 255.255.255.0 /24 65534 254 16645636


17 255.255.255.128 /25 131070 126 16514820

18 255.255.255.192 /26 262142 62 16252804

19 255.255.255.224 /27 524286 30 15728580

20 255.255.255.240 /28 1048574 14 14680036

21 255.255.255.248 /29 2097150 6 12582900

22 255.255.255.252 /30 4194302 2 8388604

BSNL, India For Internal Circulation Only Page: 15


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

Allowed Class B Subnet and Host IP addresses

# bits Subnet Mask CIDR # Subnets # Hosts Nets * Hosts

2 255.255.192.0 /18 2 16382 32764

3 255.255.224.0 /19 6 8190 49140

4 255.255.240.0 /20 14 4094 57316

5 255.255.248.0 /21 30 2046 61380

6 255.255.252.0 /22 62 1022 63364

7 255.255.254.0 /23 126 510 64260

8 255.255.255.0 /24 254 254 64516

9 255.255.255.128 /25 510 126 64260

10 255.255.255.192 /26 1022 62 63364

11 255.255.255.224 /27 2046 30 61380

12 255.255.255.240 /28 4094 14 57316

13 255.255.255.248 /29 8190 6 49140

14 255.255.255.252 /30 16382 2 32764

Allowed Class C Subnet and Host IP addresses

# bits Subnet Mask CIDR # Subnets # Hosts Nets * Hosts

2 255.255.255.192 /26 2 62 124

3 255.255.255.224 /27 6 30 180

4 255.255.255.240 /28 14 14 196

5 255.255.255.248 /29 30 6 180

6 255.255.255.252 /30 62 2 124

BSNL, India For Internal Circulation Only Page: 16


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

7.0 IPv6
• To meet the continual growth of the Internet ,IETF(Internet Engineering Task
Force) has proposed a set of specifications commonly known as the next
generation IP protocol (“IPng” or IPv6”).
• IPv6 increases the address size from 32 bits to 128 bits, supporting up to 3.4X1038
nodes.
• It is represented using hexadecimal values separated by colons using the format
X:X:X:X:X:X:X:X:, where each X refers to a four digit hexadecimal integer (16
bits each).
• One such address could be
BA98:7654:3210:FEDC:BA98:7654:3210:0043.

7.1 Advantages
• Bigger address space
– The bigger address space IPv6 offers is the most obvious enhancement over
IPv4.
– Allows full, unconstrained IP connectivity for today's
• IP based machines
• Upcoming mobile devices like PDAs and cell phones
• Mobility
– IPv6 supports for roaming between different networks, with global
notification when you leave one network and enter the other one.
• Security
– IPv6 protocol stacks are required to include IPsec.
– IPsec allows authentication, encryption, and compression of IP traffic.
– This allows that all applications on a machine can benefit from
• Encryption
• Authentication
• Policies can be set on a per host (or even per-network) basis, not
per application/service.
• Stateless auto configuration of hosts
• Multicast
• Jumbo grams
• Network layer security

BSNL, India For Internal Circulation Only Page: 17


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

7.2 Address categories in IPv6


Categories of IPV6 addressees are
– a) Unicast
– b) Multicast
– c) anycast

8.0. Logical Operations


This page will provide a brief review and explanation of the common logical bitwise
operations AND, OR, XOR (Exclusive OR) and NOT. Logical operations are performed
between two data bits (except for NOT). Bits can be either "1" or "0", and these
operations are essential to performing digital math operations.

AND:The logical AND operation compares 2 bits and if they are both "1", then the result
is "1", otherwise, the result is "0".
Input 1 1 0 1 0
Input 2 1 0 0 1
Output 1 0 0 0

9.0. Conclusion
IP is Internet Protocol & is responsible for moving packet of data from node to node. &
forwarding each packet based on a four-byte destination address (the IP address). IP
version 4 uses 32 bits and addressing schemes are (a) classfull which has 5 classes A, B,
C,D & E and (b) classless.The Subnetting and supernetting alongwith CIDR are used for
optimum utilization of IP addresses. IPV6 has 128 bits and has features of bigger address
space, enhanced security, mobility, Stateless auto configuration of hosts, Jumbo grams.

BSNL, India For Internal Circulation Only Page: 18


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

Chapter 6:IP addressing


Sample Self study Objective Type Questions

1. IPv4 address consists of ----bits


a. 32
b. 33
c. 128
d. 127

2. For multicasting which class is used


a. Only Class D
b. Only Class B
c. Only Class C
d. Class A, B, C

3. Class B addresses begin with A)10xx, or B) 128 to 191 decimal.


a. Both A & B are true
b. A is true
c. B is true
d. Both A & B are false

4. In order to specify the network address for a given IP address, the host section is
set to all "-------"s.
a. 1
b. 0
c. No change
d. Data insufficient

5. Addresses 198.0.0.0 to 199.255.255.255 are for


a. Europe
b. North America
c. Central and South America
d. Asia and the Pacific

BSNL, India For Internal Circulation Only Page: 19


E2-E3/E&WS/IP Addressing Rev date: 01-04-2011

6. CIDR, is described in
a. RFC 1519
b. RFC 1918
c. RFC 1520
d. RFC 1920

7. No of hosts in class A network are


a. 224
b. 224 -1
c. 224 -2
d. 224 -3

8. 126.0.0.3 belongs to which class?


a. Class A
b. Class B
c. Class C
d. Class D

9. When the host section is set to all "1"s, it specifies a.


a. Broadcast address
b. Loopback address
c. Host Address
d. None of these

10. Class C addresses have how many bits used for networks?
a. 8
b. 16
c. 24
d. 0

BSNL, India For Internal Circulation Only Page: 20

You might also like