The Internet Protocol Version 4 (IPv4)


Uploaded by itfreetraining on 26.07.2011

Transcript:
In this section I will look at IP version 4 address. Even though I P version 6 networking
is available and is starting to be used, I P version 4 networking will still be around
for a long time to come. In this video I will first look at what is
IP version 4 followed by what is an IP version 4 address. It is important to understand what
makes up an IP version 4 address. When IP version 4 was first developed they introduced
the concept of classfull networking. Even though this concept has become depreciated
over the years, it is still important to understand how it works to have an understanding of IP
version 4. Next I will look at the process of subnetting.
Subnetting is taking a large network and dividing it up into smaller parts. Finally I will have
a look at private addresses. Private addresses are IP addresses that you can allocate how
you see fit inside your organization. I P version 4 is the fourth version of the
IP protocol. It is the default protocol for the internet and by far the most popular protocol
in use today. Version 5 of the I P protocol never got adopted on the internet, however
IP version 6 is starting to be used. Even so, IP version 4 will be in use for a long
time to come and thus it is important that you have a good understand of the protocol.
To understand how IP version 4 protocol works consider this. The IP and the TCP protocol
combine together to provide a complete network solution. TCP is responsible for keeping messages
in order and retransmission data when lost while the IP part is simply responsible for
sending packets from one location to anther. IP version 4 addresses are 32 bits long. They
are divided into 4 octets of 8 bits separated by dots to make reading easier. For example
192.168.0.1. An IP address identifies your computer and allows other computers to contact
yours. Think of it like a telephone number. Telephone numbers have areas codes while IP
addresses have network ID’s to help separate and organise your network into logical parts.
Originally all networking was divided into classes. These classes when from a to e and
depending on the class determined how many computers could be on that network.
These networks can be broken down into smaller parts in a process called subnetting. IP version
4 since it was originally introduced has been improved and developed. The system of classes
put limits on the way networks could be designed. Since than classless networks have been added
which allow you to change the way networks are designed. They introduce a system called
supernetting which allows you to combined multIPle networks together. I will go through
all of these features individually, but first lets start with class networks otherwise known
as classful networking. Originally all IP addresses were allocated
based on a class. The class used determines the number of hosts that can be deployed on
that network. Today classless networks have become more common which I will cover later.
The remnants of classful networking still exist today and often use in the discussion
of networking so it is important topic to know.
The first class, class a supports 16,777,214 hosts. These are available in 126 networks.
The network and host ID can not be all zeros. The 127 network is reversed for loopback.
If you ping any addresses in the 127 network you are pinging your local computer. This
is using for testing. The last host ID, or a host ID with all 1’s is reversed for broadcast.
The next class is called class B. This class has 16,384 networks and 65534 host per network.
As you can see both class A and class B have a lot of hosts per network. The original system
of allocating IP addresses based on class created a lot of wasted IP addresses.
The class C network has 2,097,152 networks with 254 hosts per network. This network is
more suitable for smaller networks, however you can see that even if you have 100 computers
on a network there is still a lot of wasted IP addresses.
Class D is reversed for multicast. Multicast allows you to send one packet to many computers.
The last class is class E. This class is reversed and not currently in used. Using classful
networking by itself creates a lot of wasted IP addresses. In order to use the address
space better you can use subneting. Subnetting allows you to break up a network
into smaller parts. It is also used to determine which traffic is local traffic and which traffic
is for a remote network. Unfortunately once you start subnetting your network you will
need to start working in binary. To see how subneting works consider this example. As
you can see the IP address, subnet mask and destination IP address are displayed in binary.
When the subnet mask is shown in binary you can see that it is a unbroken list of ones
followed by zeros. Ones must always be on the left and zero’s on the right. Because
of this you can represent the subnet by the IP address slash number of bits. If I was
to show this IP address and subnet mask shown in the example using slash notation it would
be 192 dot 168 dot 10 dot100 slash 24 as there are 24 one bits in the subnet mask.
The subnet mask is used to determine if the traffic is for a remote network or the local
network. To do this, the bits from the IP address and the destination address are compared
but only with reference to the subnet mask. In this example, the subnet mask is 24 bits
so the first 24 bits of the IP address and the destination IP address are compared. If
they match, which in this case they do, the packet is sent to the local network.
Now you may be thinking, I could just look at the first 3 octects of the IP address and
the destination IP address to see if they match. The answer is you could in this case
because the subnet mask is a simple one. The idea behind subnetting is you can take a larger
network and make it a smaller network. If I were to change the subnet mask as follows.
The subnet is no longer as simple to work out. By using this subnet I now have divided
my original network into 14 smaller networks which I can put 14 hosts per network in each
network. In other words I have allocated 4 bits of
the host part of the address to the network part of the IP address. If you take the same
IP address and the same destination address again and compare the subnet mask against
the IP address and destination address you get the following.
You can see that the first 4 bits in the last octect do not match. Since they do not match
this packet is not for the local network and will be sent to the default gateway. As you
can see, subnetting gives you a lot of flexible and power to break down larger networks into
smaller ones. The trade off is that you need to start doing some binary operations.
Using subnetting you can break away from the limits imposed by classful addresses and divide
a network up any way you want. This is called classless inter domain routing. The subnet
masked used is called variable length subnet masking. In the real world, classless inter
domain routing is the primary method used and classfull networks are a thing of the
past. It is important to know about classfull network as they are often referenced in literacy
and the real world. Classless inter domain routers uses a different
way to indicate the subnet mask. To indicate the number of bits in the subnet it uses a
slash subnet mask as shown in these examples. The number indicated after the slash indicates
the number of bits in the subnet mask. Using classless inter domain routing you can
also perform what is called supernetting. Super netting combines multIPle network together
to form a larger network. If you had the networks 192.168.0.0 to 192.168.3.0 this would be 4
class c networks with 254 hosts in each network. If you needed a larger network you could combine
the networking into one using super netting. By using the subet mask 22 you can combine
the 4 networks in one. This will give you one network with 1022 hosts. As you can see
once you start using classless inter domain routing the IP address space can be divided
up any way that you want without any of the limits imposed by classful networking.
In the IP address space, there are a number of addresses reserved for private use. These
address you are free to allocate anyway you want. These addresses are not routable on
the internet. A lot of companies use this fact to help with their security. If you place
all your computers on a private network a would be hacker on the internet can not connect
to any of your computers directly. This is because there is no routing from their computer
to your computers. There are 3 groups of private addresses. The
first is class a which goes from 10.0.0.0 to 10.255.255.254. The next is class b from
127.16.0.0 to 172.31.255.254 and lastly class C, 192.168.0.0 to 192.168.255.254. All these
addresses you are free to use anyway that you want and route them in your organisation
any way that you want. Just remember that they are not routable on the internet.
On the topic of private addresses, if you start using them you should be aware of the
Automatic private IP address system. This system is used by windows when windows can
not contact a dhcp to get an IP address. When this occurs, windows will allocate a
random IP address from the network 169 dot 254 dot 0 dot 0. This allows the computer
to communicate on a local network. The idea of this system is that you could connect a
computer up at home to a switch with one or more computer connected to the same switch.
The computers will automatically allocate an IP address using Automatic private IP address
and be able to communicate with each other. Remember however these addresses are not routable
on the internet. If you decide to use private address ranges on your network, bare in mind
that you should avoid using this range otherwise you may gets some unexpected results.
Look out for IP addresses in this range. When troubleshooting if you get an address in this
range will mean that the computer is having trouble accessing the DHCp server.
Once you have decided on your network address and subnet masks, there are two more special
addresses that you should be made aware of. For example if I take the following IP address
and subnet mask. This would translate to the following subnet in binary and the following
IP address in binary. You will notice that the host part of the
IP address shown in red in all zeros. This address is not valid and can’t be used.
This is often used as the network ID. The other address that is not valid is when the
host part of the IP address is all ones. For example the following IP address , if
I again look a the subnet in binary and than compare it to the IP address in binary, you
will notice the host part of the IP address is all ones. This kind of IP address is used
for broadcast. If you want to sent data to all computers
on a network sent it to this address. It is also possible to sent a broadcast from anther
network to this address. You will however find that a broadcast like this will often
be blocked by the router to that network. This is done as broadcast like these have
been used in denial of service attacks. When working out the subnets for you network
and how many hosts you will have, the usable amount of IP addresses can be worked out using
the formula 2 the power of hosts bits minus 2. If I take the previous example. 2 to the
power of 10 minus 2 gives us 1022 usable hosts. When dividing your networks into smaller parts
using subnetting, make sure you factor in some growth for your network otherwise you
may find that your network will become full. Remember with IP version 4, even though it
has been around since the 70’s, it has been developed and improved since than and will
be around for a long time to come. It is costly for a company to change it’s networking
over to IP version 6 and with out a driving need and a lot of people will stay on IP version
4 for a long time to come. Also a lot of network equIPment, even though
support for IP version 6 is growing, still only support IP version 4. If you are planning
to use private addresses, remember that they are not routable on the internet. Lastly when
setting up your network plan for growth. Networks can often expand a lot larger than they were
originally envisioned. You may think you have enough space now, but
think about if you company decided to give everyone an IP based phone or a had a major
expansion. In short, IP version 4 is not here to stay, but will be here for a long time
so it is worth the time to learn.