0% found this document useful (0 votes)
29 views17 pages

NET3

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

NET3

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

What is an IP address?

An IP address is an Internet Protocol address used as an endpoint identifier in IP-based


communications. In simplified language, an IP address is just like a telephone
number. When you want to call another person over your mobile, you use the
telephone number of the other person who receives the call from your telephone
number. Basically, the phone call is between phone numbers. In the same way, when a
device wants to communicate using IP communication, it sends the data to the remote
device's IP address. Every mobile phone has a telephone number. In the same
way, every device needs to have an IP address to send and receive data over an IP
network.
A key point here is that, by standard, an IP address is 32 bits long (4 bytes), which
means that there are only 232 (4,294,967,296) possible unique IP addresses (and they
were officially exhausted in April 2017). That's it; new addresses could never be
produced. The IPv4 address space is a finite resource, and we need to wisely utilize
each IP address (similar to our planet's land).
What is an IP network?
Let's get back to the analogy with telephony to understand what is an IP
network. When you call a landline telephone number in your area, you just
call the number directly. However, when you call another landline
telephone number in another area, you do not call the number directly but
dial the area code first. An IP network is a group of IP addresses that share
the same broadcast domain and don't need a router to communicate -
similar to how we directly dial phone numbers within the same area. Within
one IP network, each device can resolve the MAC addresses of each IP
address via ARP and communicate directly at the Ethernet layer because all
IPs share the same broadcast domain and can receive a copy of each other's
broadcast packets.
If we look at figure 2 above, hosts 1, 2, and 3 are in one IP network-A and share
the same Ethernet segment. When host 1 sends broadcast packets, such as ARP
requests, all other hosts (2, 3, and the router) hear the broadcast and can
respond back. This behavior is referred to as flood-and-learn. Host-1 floods the
broadcast domain saying, "I am looking for host-3". Each host in the subnet
receives the broadcast packet, including host-3, which answers back, and both
hosts start communicating directly. However, when a device wants to
communicate to an IP address part of another network, it has to send the
packets to a router (the default gateway). The router forwards the packets
based on its routing table toward the destination IP address. Routers stop the
flood-and-learn way of communicating and introduce a path selection logic
based on routing protocols.
We can summarize what we have shown so far with three essential rules
related to IP networks that every network engineer should always remember:
Rule #1. One subnet = Broadcast domain = One VLAN
Rule #2. IP addresses in the same subnet communicate directly through
Ethernet switching and aren't separated by a router
Rule #3. IP addresses in different subnets are separated by one or more
routers and communicate through IP routing.
Number of IP
Network Number of IP addresses per
Class Mask networks network Range
A 255.0.0.0 (/8) 128 16,777,216 0.0.0.0 –
127.255.255.2
55
B 255.255.0.0 16,384 65,536 128.0.0.0 –
(/16) 191.255.255.2
55
C 255.255.255.0 2,097,152 256 192.0.0.0 –
(/24) 223.255.255.2
55
D Multicast 224.0.0.0 –
239.255.255.2
55
E Reserved (Not used) 240.0.0.0 –
255.255.255.2
55
How Classful Addressing Works
As we have said, when a device communicates with a remote IP address that is part
of the same IP network, it uses the flood-and-learn technique using ARP. On the
other hand, when it wants to communicate with an IP address outside its IP
network, it sends the packets to the router on the segment (the default gateway).
Hence when a device wants to communicate using IP, it has to know whether the
remote device's IP address is part of the same IP network or not. That is where
the Network Mask comes into the picture!
The network mask tells the device which part of the IP address is identifying the
network and which is identifying a particular host on that network. The 255s in the
network mask define the network portion of the addresses, and the 0s in the mask
define the host portion as shown in figure 4 below.
Introduction to Subnetting and Classless Addressing
At some point in the 1990s, people realized that the size of IP networks shouldn't
necessarily be fixed to the classful subnet mask. And this idea created a
technique called variable-length subnet masking (VLSM). VSLM allowed
organizations to subdivide their classful network into smaller subnets that most
efficiently fit their needs
Classful vs. Classless
Classful Addressing Classless Addressing
An IP address allocation method that An IP address allocation method that
assigns IP address blocks according to uses variable-length address blocks
the five pre-defined classes (A, B, C, D, that belong to no class
E).

Less practical and efficient. More practical and efficient


Network ID and Host ID There is no boundary between the
change depending on the class. network ID and the maskhost ID
The network mask is The size of IP networks isn't fixed to
always fixed depending on the the classful subnet mask. Any IP
class. The IP address implies the address could have any network mask.
network mask. For example, a class-A For example, 10.1.1.2 can have a mask
address such as 10.1.1.2 always has a 255.255.224.0 (/19).
mask of 255.0.0.0 (/8).

Classful addressing wastes a huge Classless addressing allows us to


number of IP addresses in too-large control the size of an IP network
blocks assigned for the need of a few based on the need. This is what we
hosts. call subnetting (subdividing
networks).
Converting IP addresses into Binary
Numeral systems for expressing numbers have a base. The base determines how
many unique digits the system has. We humans use the base-10 decimal system,
which indicates that there are only ten unique digits, 0 through 9. Combining
these ten digits creates all other possible numbers.
On the other hand, routers, switches, and computers use a base-
2 numbering system called binary. There are only two possible unique digits in
the binary numeral system:
0 = Off
1 = On
All other binary numbers are created using these two digits.
An IP address
An IP address is a 32-bit long binary number divided into four octets, as shown in
figure 1 below
Routers and switches see IP addresses like this:
110000.10101000.00000001.00101101However, we humans find it hard to work
and remember binary numbers. That is why we work and write IP addresses in
decimal representation that looks like this:
192.168.1.45We refer to this IP address representation as a dotted-decimal
format. It's obviously much easier for humans to work with the decimal version
of the IP address space. However, computers work with binary, so to really
understand subnetting, we must be able to convert a dotted-decimal IP
representation into a binary one.
Binary Math
In this lesson, we will learn a technique called the positional notation method. In
binary numbers, each successive bit within a group represents a power of two
and the values ascend from right to left. Therefore, the rightmost bit represents
20, the second most-right bit represents 21, and so on, as is shown in the table
below. Each successive bits on the left represent twice the value. The value of
each digit in a binary number is determined by its position in the table. The sum
of all these column values for each digit gives the decimal representation of the
binary number.
Values of each bit in an octet
8th bit 7th bit 6th bit 5th bit 4th bit 3th bit 2th bit 1th bit
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1

Binary to Decimal
Using this logic, we can easily calculate the decimal representation of a binary
number like 11100011 for example. We just turn the respective bits "ON" and
calculate the value of the decimal values.

Binary number 11100011


8th bit 7th bit 6th bit 5th bit 4th bit 3th bit 2th bit 1th bit
(128) (64) (32) (16) (8) (4) (2) (1)
1 1 1 0 0 0 1 1
The table above shows that the bits with the values 128, 64, 32, 2, and 1 are all
turned on. As mentioned before, calculating the value of a binary number
means totaling all the values for the "on" bits. So for the binary value in the
table, 11100011, we add together 128+64+32+2+1 to get the number 227.
11100011 = 227The following animation shows a few examples of converting
binary numbers into decimals using the power of two tables.

Decimal to Binary
Converting decimal numbers to binary uses the same logic. We start with the
decimal number we want to convert and look for the highest column value that
goes into the decimal. Then we subtract the column value from the original
number and repeat the process until the original number becomes zero. Figure
3 illustrates the process graphically.

You might also like