Networking fundamentals tutorial – Internet Protocol, IPv4 part2


Hello again,
In this post we will continue talking about the IPv4 protocol.
As you probably know, a host can acquire an IP address either by using a static or dynamic configuration. Usually static addressing is used with servers, printers or network equipment while dynamic addressing is used with hosts. It is a time consuming method to assign static IPs to computers or laptops in a network that’s why a dynamic configuration service is used, like DHCP (Dynamic Host Control Protocol).
We will talk about DHCP in a a future post, for know you’ll have to know that this protocol is used for dynamic addressing.
When you use static configuration, you’ll have to manually assign a device the IP address, gateway, mask address and DNS servers (preferred and alternate). On a Microsoft Windows machine, to assign static IP configuration go to Control Panel, Network and Internet, Network Connection. Select your desired connection, right click, Internet Protocol Version 4(TCP/IPv4) and then press Properties. The network configuration panel will appear and here you’ll have to add IP addresses.:

IP configuration
To select a dynamic configuration  on a Microsoft Windows workstation, press “Obtaion IP address automatically” and “Obtain DNS server address automatically”. If this settings are selected, the DHCP negotiation process will begin. This process is described in a past post: http://www.ittrainingday.com/2013/01/networking-fundamentals-tutorial_12.html#.UPv4pScqZWY
IP configuration
Static addressing is used by servers, routers, firewalls, peripherals and intermediary devices because this kind of devices are accessed by their IP address.
When a packet is forwarded to a device, it’s destination address must be read and interpreted. This is done by using the AND Operation, read more here: http://en.wikipedia.org/wiki/Bitwise_operation. When a packet is destined for a remote host, the network destination must be determined. The AND operation, compares groups of two bites one by one as follows:
1 AND 1=1
1 AND 0=0
0 AND 1=0
0 AND 0=0
Let’s take the following example: let’s pretend we have to send a packet to a host with 192.168.4.8 ip address and 255.255.255.0 mask. Now we’ll have to determine the network IP address, but first let’s convert these numbers in binary format:
11000000.10101000.00000100.00001000 IP
11111111.11111111.11111111.00000000 MASK
Now let’s do the AND operation between IP and MASK address:
11000000.10101000.00000000.00000000 The network address:
192.168.0.0 – This is the remote network address where the packet must be forwarded.
Subnetting is the operation in which an IP class is divided into multiple logical addresses: http://en.wikipedia.org/wiki/Subnetwork. Let’s take the following example:
we have a network with 192.168.1.0 IP address and 255.255.255.0 mask and we want to create 4 subnets from this network. Subnets are calculated by “borrowing” some bits from the host portion. How many bits we borrow depends on how many subnets we want to create. From one bit we can create 2 subnets, form two bits we can create 4 networks and so on. The formula is 2^X, X is the number of bits borrowed. In our case we need two bits, so our subnets are the following:
192.168.1.00 000000 or 192.168.1.0
192.168.1.01 000000 or 192.168.1.64
192.168.1.10 000000 or 192.168.1.128
192.168.1.11 000000 or 192.168.1.192
with a /26 mask or 255.255.255.192 ( this is because from the /24 mask we added two bits).
Every subnet has a number of 64 IP addresses. The number of IPs in a subnet is calculated from the remaining host bits. We have 6 bits in the host portion so there are 2^6=64 IP addresses in every subnet.
By borrowing more bits from a subnet we can continue subnetting . Let’s take for example the 192.168.1.192 with /26 mask, subnet. Let’s create 4 more subnets:
192.168.1.11 00 0000 or 192.168.1.192
192.168.1.11 01 0000 or 192.168.1.208
192.168.1.11 10 0000 or 192.168.1.224
192.168.1.11 11 0000 or 192.168.1.240
With a /28 mask or 255.255.255.240
In every subnet we have 2^4=16 addresses.
This is the basic mechanism when subnetting. Usually you create subnets according to your needs. In a company, different departments have different numbers of devices. You can create a subnet for each department for better management. In a future post we will talk about VLSM mechanism in which we can use different network mask address for different subnets in a network.
This is all folks for today, I hope you’ve enjoyed this post, I wish you all the best.
Advertisements

One thought on “Networking fundamentals tutorial – Internet Protocol, IPv4 part2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s