Monday, 20 November 2017

Transport Layer

Today single device can run multiple applications and provide multiple services such as email, web, video, audio and instant messaging. Data from each of these applications are packaged, transported and delivered to the right application on the destination device



 The transport layer (Layer 4) of the OSI model accepts data from the application layer and prepare it for addressing at the network layer. A sending device communicates with a receiving device to make a decision how to split data into segments, how to make possible data sending without losing any segment, how to confirm all the segments arrived at receiving the device.


The transport layer is responsible for end-to-end communication over a network. It provides logical communication between application processes running on different hosts within a layered architecture of protocols and other network components.


Functions of the Transport Layer


Following are the functions of the transport layers.



  • Connection management

  • Segmentation

  • Reliable and unreliable data delivery

  • Flow control

  • Connection multiplexing

  • It makes possible to allow multiple applications work at the same time send and receive data.

  • Data transmission method can be connection-oriented or connectionless according to requirement. Connectionless uses UDP and connection-oriented uses TCP.

  • The sequence numbers and acknowledgments (ACKs) are used for reliability.

  • Reliable connection controls flow through the uses of windowing or acknowledgments.


In the next, lesson we will discuss the above functions in depth.


 


Friday, 17 November 2017

Subnetting IPv6 Addresses

As I say in my previous IPv6 lessons that IPv6 addresses are going to replace IPv4 addresses?  The reason is that IPv4 address space is running out. So, the 32-bit IPv4 addresses are not enough to link every device which wants connectivity to the Internet. The IPv6 is 128 bit address which allows approximately, 340,282,366,920,938,463,463,374,607,431,768,211,456, or 340 undecillion addresses, almost equivalent to each particle of sand on the Earth. Basically, the addresses are too large for the human being to seize.





Presently CIDR, VLSM, and NAT are being used to save IPv4 address space as much as possible. These tools are not available in IPv6 addresses. The subnetting of IPv6 requires a different approach than IPv4 subnetting. The main reason is that with IPv6 there are so many addresses, so the reason for subnetting is totally different.


IPv4 subnetting limiting the broadcast domains and it is also required for managing IP addresses shortage. The VLSM and subnet mask helps to keep IPv4 addresses. The IPv6 subnetting is not concerned with keeping address space. The /64 is the smallest recommended subnet in IPv6. This means that even if you have few devices on your subnet you must use /64 that has 264 IP addresses. The important thing that IPv6 does not use network and broadcast addresses. An address where the host bits are all 0s or all 1s is still valid!



There are two types of assignable IPv6 addresses



  1. link-local

  2. Global Unicast Addresses


Each IPv6 enabled device can create a unique link-local address based on the MAC address of that device. The method of link-local address already describes in the previous article. The method changes the MAC address to 64-bits from 48-bits.


The IPv6 Global Unicast Addresses


The IPv6 global unicast address normally consists of a /48 global routing prefix, a 16-bit subnet ID, and a 64-bit interface ID. The figure illustrates the global unicast address.



The subnet ID includes more than enough subnets. IPv6 subnetting is about building an addressing hierarchy based on the number of sub-networks needed.


Subnetting IPv6 addresses Using Subnet ID


The 16-bit subnet ID section of IPv6 global unicast address can be used to create internal subnets. The subnet ID provides enough subnets and hosts support for any organization.  The 16-bit section can create 65536/64 subnets without borrowing any bit from the interface ID section of the address. Each subnet support 18,000,000,000,000,000,000 or 18 quintillion host IPv6 address per subnet. Subnetting of IPv6 subnetting is much easier than IPv4 because there is no binary conversion required. It is just required counting in hexadecimal.



Example of Subnetting IPv6 Addresses


Suppose there are IPv6 address 2001:AD10:110B::/48 has been assigned to an organization with 16-bit subnet ID. The network administrator can subnet the IP address just counting /16 bit in hexadecimal upward. This would allow the administrator to create 65,536 /64 subnets. The table below illustrates the subnetting procedure of IPv6 address.


 














































































2001:AD10:110B::/48



Subnets



2001:AD10:110B:0000::/64



2001:AD10:110B:0001::/64



2001:AD10:110B:0002::/64



2001:AD10:110B:0003::/64



2001:AD10:110B:0003::/64



2001:AD10:110B:0004::/64



2001:AD10:110B:0005::/64



2001:AD10:110B:0006::/64



2001:AD10:110B:0007::/64



2001:AD10:110B:0008::/64



2001:AD10:110B:0009::/64



2001:AD10:110B:000A::/64



2001:AD10:110B:000B::/64



2001:AD10:110B:000C::/64



2001:AD10:110B:000D::/64



2001:AD10:110B:000E::/64



2001:AD10:110B:000F::/64



2001:AD10:110B:0010::/64



2001:AD10:110B:0011::/64



2001:AD10:110B:0012::/64



UPTO



2001:AD10:110B:FFFF::/64



 



IPv6 Subnet Allocation


Any IPv6 based network required subnets for each LAN as well as for the WAN link. Unlike IPv4, the


 


 IPv6 WAN link subnet will not be subnetted further. Although this may “waste” addresses, that is not a concern when using IPv6.


subnetting ipv6 addresses


As shown in Figure 1, there is 5 subnetwork which allotted first five subnets, with the subnet IDs 0000 through 0004 and for four WAN links which allotted subnet from IDs 0005 through to 0008. for this example. Each /64 subnet will provide more addresses than will ever be needed. As shown in the Figure, each LAN segment and the WAN link is assigned a /64 subnet.  Similar to configuring IPv4, the Figure 2 displays that every router interfaces have been configured to be on a different IPv6 subnet.


Saturday, 28 October 2017

Network Address Planning

The Internet Protocol especially IPv4 is now being used for almost all business and personal digital communications, from data centers to telephones to industrial control systems. Now, the Internet protocols have been adopted for 3G, 4G, and 4G LTE mobile systems and are a serious enabler for the Internet of Things. This time billions of IP addresses are being used in the world.




The network address planning is a documentation usually developed by the network administrator and network engineers to show how the IP addresses will be distributed among the network devices based on the network architecture or topology in a way that supports the required services.  There are multiple levels of network address planning are required.


Setting up network subnets requires a check of both the needs of an organization’s network usage and how the subnets will be organized. Performing a network address planning, a study is the starting point.


Before you effectively implement an IP network infrastructure, you have to identify your IP addressing requirements. The address plan includes determining the needs of each subnet.Some of the things that you need to consider include:



  • Will you need a public or private IP address range on the internal network?

  • Does the network require multiple subnets?

  • How many hosts per subnet?

  • How will host addresses be assigned, static or automatic?

  • Which hosts will require static IP addresses?

  • Which hosts can use DHCP for obtaining their addressing information?


The subnet size involves planning the number of hosts that will require IP host addresses in each subnet of the subdivided private network.


For example, in an organization network design, you may consider how many hosts are needed in the 


 


Management LAN, Finance LAN, Sales LAN, HR LAN and Engineer department LAN. In a home network, a consideration may be done by the number of hosts.


We already discussed the private IP address range in previous lessons. The use of private addresses on a LAN is the selection of the network administrator and desires careful to be sure that sufficient host addresses will be available for the currently known hosts and for future expansion. The ranges of private IP address for different classes are following:


Class-A


10.0.0.0 - 10.255.255.255 with a subnet mask of 255.0.0.0 or /8


Class-B


172.16.0.0 - 172.31.255.255 with a subnet mask of 255.240.0.0 or /12


Class-C


192.168.0.0 - 192.168.255.255 with a subnet mask of 255.255.0.0 or /16


You should know the IP address requirements will determine the range or ranges of host addresses you implement.


Knowing IP address requirement is necessary for network administrator for determine the host addresses. Subnetting the chosen private IP address space will give the host addresses to cover your network needs. Public addresses are typically allocated from a service provider. For subnetting of public IP address the same principles would apply, this is the responsibility of the service provider.


network address planning


Planning to Address the Network


The four primary segments for planning address allocation are Management LAN, Finance LAN, Sales LAN, HR LAN and Engineer department LAN in our example.


To Preventing the IP address conflict required each host in an internetwork must have a unique address. An IP address conflict resulting in access issues for both hosts. Without the proper network address planning and documentation, an address could be assigned to more than one host.


Some hosts like servers provide and share resource to other hosts. The IP address assigned to a server can be used to control access to that server. If the address is randomly assigned and not static, controlling access is more difficult.


Monitoring performance and security of hosts means network traffic is examined for source IP addresses that are generating or receiving too many packets. The proper network address planning of network addressing, problematic network devices can easily be found.


Assigning Addresses to Network Devices


There are different types of devices can be found in the network that requires IP addresses including:



  • End-user clients– Many network administrators allocate addresses automatically using DHCP to their end-user clients. The automatic IP address assignment reduces the load on network support staff and also eliminates the IP address assignment errors. The DHCP has only leased the IP addresses for a period of time. Changing the subnetting scheme is easy and the administrator just needs to reconfigure the DHCP server, and the clients must renew their IP addresses.

  • Servers and peripherals– The servers provide service and share resource to other hosts insidehttp://marketing.net.daraz.pk/ts/i3801839/tsc?amc=performance.Darazpk.339137.351755.76374&tst=!!TIMESTAMP!! the network and also outside the network. The IP address assigned to a server can be used to control access to that server. So the must be static to provide service and share the resources. Use a consistent numbering system for these devices.

  • Servers that are accessible from the Internet–Some servers must be made available to the remote users from the internet. In the major cases, these servers are assigned private IP addresses internally, and the router at the edge of the network must be configured to translate the internal address into a public IP address.

  • Intermediary network devices– These network devices are assigned addresses for network management, monitoring, and security. These devices should have statically assigned IP addresses.

  • Gateway- Routers have an IP address assigned to every interface which serves as the gateway for the hosts in that network. Typically, the router interface uses both the lowest or highest address in the network.

Friday, 27 October 2017

VLSM in Practice

With the Variable Length Subnet Mask (VLSM), the LAN and WAN segments can be assigned addresses without any waste. As shown the scenarios in Figure 1, the hosts in each of the sub-network will be assigned a valid host address with the range of that subnet and /26 masks. Each of the routers will have a LAN interface with a /26 subnet and serial interfaces with a /30 subnet.




 


Using the addressing scheme we already discussed in the previous lesson, the first host IPv4 address for each subnet is assigned to the LAN interface of the router. The WAN interfaces of the routers are assigned the IP addresses and mask for the /30 subnets. Hosts on each subnet will have a host IPv4 address from the range of host addresses for that subnet and an appropriate mask. Hosts will use the address of the attached router LAN interface as the default gateway address. The table below is the 


 


addressing scheme we already discussed in the previous lesson.



























































































Subnet



Network ID



Remarks



0



130.10.0.0/26



Assign to LAN-1



1



130.10.0.64/26



Assign to LAN-2



2



130.10.0.128/26



Assign to LAN-3



3



130.10.0.192/26



Assign to LAN-5



4



130.10.1.0/26



Not used /Spare for future expansion



5



130.10.1.64/26



Not used /Spare for future expansion



6



130.10.1.128/26



Not used /Spare for future expansion



7



130.10.1.192/27



Assign to LAN-4



8



130.10.1.224/30



Assign to WAN R1-R2



9



130.10.1.228/30



Assign to WAN R2-R3



10



130.10.1.232/30



Assign to WAN R3-R4



11



130.10.1.236/30



Assign to WAN R4-R5



12



130.10.1.240/30



Not used /Spare for future expansion of WAN



13



130.10.1.244/30



Not used /Spare for future expansion of WAN



14



130.10.1.248/30



Not used /Spare for future expansion of WAN



15



130.10.1.252/30



Not used /Spare for future expansion of WAN



 


 


vlsm chart


VLSM Chart


An addressing chart is an important element to identify which blocks of addresses are already used which block are available. as shown in the above table. The VLSM chart helps to avoid assigning addresses that have previously been allocated.

Thursday, 26 October 2017

Variable Length Subnet Mask (VLSM)

Variable length subnet mask (VLSM) is a method that allows network administrators to divide an IP address space into subnets of different sizes, unlike simple same-size Subnetting. Variable Length Subnet Mask (VLSM) means subnetting a subnet. To simplify further, VLSM is the breaking down of IP addresses space into multiple level subnets and allocating it according to the individual need on a network.




As illustrated in Figure 1, 2 and 3 the traditional subnetting creates subnets of equal size. Each subnet in a traditional plan uses the same subnet mask.But Variable Length Subnet Masking allows a network space to be divided into different sizes. With VLSM, the subnet mask will vary on how many bits have been borrowed for a particular subnet.


The difference between VLSM and FLSM is that subnetting is not a single practice. With VLSM, the network is initially subnetted, and then the subnets are subnetted again and again to create subnets of various sizes.


In the process of using VLSM, always start by satisfying the host requirements of the largest subnet and continue subnetting until the host requirements of the smallest subnet are fulfilled.


Fixed length Subnet Mask (FLSM)


FLSM is a Traditional Subnetting method which causes wastes of IP Addresses. Using this method, the same number of addresses is allocated for each sub-network. If all the sub-network have the same requirements for hosts. These fixed size address blocks would be efficient. But, usually, that is not the case.



The topology shown in Figure 1 above requires 5 subnets, one for each of the four LANs, and one for WAN connection between routers. Using traditional subnetting with the address of 130.10.0.0/23, 1 bit can be borrowed from the third octet and 2 bits can be borrowed from the last octet of the host portion to meet the subnet requirement of 5 subnets. As shown in Figure 2, borrowing 3 bits creates 8 subnets and leaves 6 host bits with 62 usable hosts per subnet. This plan creates the desired subnets and meets the host necessity of the largest LAN.



Though this traditional subnetting meets the requirements of the largest LAN and divides the address space into enough number of subnets, So it results in the major waste of unused addresses.


For example, only two addresses are required for WAN subnet, But each subnet has 62 usable addresses, there are 60 unused addresses available in this subnets. This also limits the growth of network by reducing the total number of subnets available. This incompetent use of addresses is the feature of traditional subnetting. Traditional subnetting scheme to this scenario is not very professional and is full of waste. To avoid a waste of IP address subnetting a subnet, or using Variable Length Subnet Mask (VLSM), was designed. Figure 3 Show the pie chart for the above table of fixed length subnet masking.



The Chart in Figure 3 illustrates the traditional subnetting which divided the address space into equal sub-networks.


Basic VLSM


Go back to the example in Figure 1 and Figure 2 the network 130.10.0.0/23 was subnetted into eight subnets of equal size. Five subnets were allocated and three subnets were spare for future expansion. Four subsets were used for the LANs and one subnet for the WAN connections between the two routers. The wasted address space was in the all subnets but especially in the subnet used for the WAN connections; where only two addresses used out of sixty-two; one for each router interface. To avoid this waste, VLSM can be used to create smaller subnets according to hosts requirement. To create smaller subnets according to host requirement, the subnets will be subnetting again and again. In this example, the last subnet, 130.10.1.192, will be further subnets according to the host requirements of LAN-4 and for the WAN segment between both routers.


Remember that when the number of needed host addresses is known, the formula 2h-2 (where h equals the number of host bits remaining) can be used. The LAN-4 required 20 hosts and for 20 hosts 5 bits are required in the host portion. So there are 6 host bits in the subnetted 130.10.0.0/26 address space, 1 more bits can be borrowed; leaving 5 bits in the host portion, as shown in Figure 4. The subnetting at this point is exactly the same as those used for traditional subnetting. The bit is borrowed, and the resulting subnet ranges are determined. With borrowing 1-bit form 130.10.1.192/26 resulting two subnets 130.10.1.192/27 and 130.10.1.224/27.


VLSM


The subnet 130.10.1.192/27 is assigned to LAN4. Now we required a subnet for the WAN segment between both routers. The WAN segment required two IP address. If we apply the formula of host  22-2=2, So we required 2 bits in the host portion; as shown in Figure 5 the subnet 130.10.1.224 is subnetted according to the requirement of the WAN segment.



The subnet 130.10.1.224 is subnetted into 8 more subnets each consisting of 2 usable host address; the first subset of these are assigned to WAN segment. This subnetting scheme reduces the number of addresses per subnet to a size appropriate for the WANs. Subnetting subnet 7 for  LAN-4 and WANs. Subnetting with VLSM allows subnets 3, 4, 5, 6 to be available for future networks; as well as 7 additional subnets available for WANs segments. The chart in Figure 6 illustrates the subnetting with VLSM.


VLSM

Wednesday, 25 October 2017

Subnetting Based on Network Requirements

Sometimes a number of sub-networks are required, with less importance on the number of host addresses per sub-network. For example, an organization wants to separate their network traffic based on internal structure or department setup. In this case, the number of subnets is most important in determining how many bits to borrow.


Remember the number of subnets created when bits are borrowed can be calculated using the formula 2n (where n is the number of bits borrowed). The important thing is to balance the number of hosts required and the number of hosts needed for the largest subnet. The more bits borrowed to create additional subnets means fewer hosts per subnet.


Examples Subnetting Based on Network 


 


Requirements


 


 


Good network administrators plan the network addressing scheme to accommodate the maximum number of hosts for each network and the number of subnets. The addressing scheme must allow for expansion in the number of host addresses per subnet and the total number of subnets.


In this example, an organization has allocated a network address of 130.10.0.0/23. As shown in Figure 1, the host portion consists of 9 bits. So the number of hosts is 29-2=510.



 


Now the organization tasks the network administrator to isolate the traffic of all departments from each other. The topology for the departments shown in Figure 2, consists of 4 LAN segments and one router segment, So 5 subnets are required. The largest subnet requires 55 hosts and the smallest segment requires 20 hosts.


 



The 130.10.0.0/23 network address has 9 host bits as shown in Figure 1. The largest subnet requires 55 hosts, a minimum of 6 host bits are required to provide addressing for 55 hosts. The formula for determining a host, we already discuss which is: 26 – 2 = 62 hosts. So if we required 6 bits for host portion then we can borrow 3 bits from host portion for subnetting. We can determine the subnet using the formula: 23 = 8.  Therefore, the first 3 bits of the host portion can be used to assign subnets, as shown in Figure 3. When 2 bits are borrowed, the new prefix length is /26 with a subnet mask of 255.255.255.192.So, the example internetwork requires 5 subnets and the available subnet is 8, this will allow for some additional growth.


Network Requirements

Tuesday, 24 October 2017

Subnetting based on host requirements

There are two considerations for planning a network:



  • The number of hosts required for each network.

  • The number of sub-network needed.


The table below in the figure displays the details for subnetting a /24 network. Observe how there is an opposite relationship between the number of hosts and the number of subnets. The more bits borrowed to create subnets, the fewer host bits available. If more host addresses are required, more host bits are necessary, which resulting in fewer subnets.






Here in this lesson, we will discuss the subnetting based on the host requirements. So we will jump right into the examples because that's the best way to learn.


The examples here we will be talking about will look and feel the same as the ones we did in the previous lesson but there is a most important twist that makes it special.


Let's suppose you have a network administrator in an organization, which purchased the class C address 200.10.1.0 with the subnet mask 255.255.255.0 and you are required to break that address into 30 hosts per network. The number of host addresses required in the subnet will determine how many bits must be left in the host portion. Remember that two of the addresses cannot be used, so the usable number of addresses can be calculated as 2h-2. The process is almost exactly the same with the one based on network requirements.


Convert the number of hosts to binary


Required Host       - 30 (So convert 30 into binary)


                                     30 =   11110


Reserve bits in the subnet mask and find the increment


Its mean that we required 5 bits in the host portion of the address. The difference here is that we convert the number of host per network back to binary instead of converting the number of networks.




[caption id="attachment_7648" align="alignright" width="300"] Advertisement[/caption]


Remember! We have already learned that 1s represent the network and 0s represent the hosts.


Keep in mind we are still subnetting.But, our focus this time is not how many networks I get but how many hosts I get per network. 30's binary representation takes up to 5 bits, right?


255.255.255.0=11111111.11111111.11111111.00000000


255.255.255.224=11111111.11111111.11111111.111000000


The new subnet mask is 255.255.255.224 or /27. So, 30 needs 5 bits so we need to save 5 host bits. Notice that instead of going from left to right like we did with the network requirements, I went from right to leave because that's where my 0s exist. we know that we can get 30 hosts per sub-network.



Use the increment in order to find the network ranges


Our focus is just on the 0s in Subnetting on host-based. So let's now figure out our network ranges. Our increment is 32 because the lowest network bit converted back to a decimal number is 32 in our case.




























































Net



Network ID



Broadcast IP



Total IP Addresses



Net-0



200.10.1.0     +


000.00.0.32



200.10.1.31    +


000.00.0.32



32


 



Net-1



200.10.1.32    +


000.00.0.32



200.10.1.63   +


000.00.0.32



32


 



Net-2



200.10.1.64    +


000.00.0.32



200.10.1.95    +


000.00.0.32



32


 



Net-3



200.10.1.96   +


000.00.0.32



200.10.1.127   +


000.00.0.32



32


 



Net-4



200.10.1.128   +


000.00.0.32



200.10.1.159   +


000.00.0.32



32


 



Net-5



200.10.1.160   +


000.00.0.32



200.10.1.191   +


000.00.0.32



32


 



Net-6



200.10.1.192   +


000.00.0.32



200.10.1.223   +


000.00.0.32



32


 



Net-7



200.10.1.224



200.10.1.255



32



 


We know that first and the last address of each sub-network aren't usable therefore we exactly 30 usable hosts per network.


Sunday, 22 October 2017

Creating 2000 Subnets with a /8 Network

Some organizations may need even more subnets. For example, a small ISP that requires 2000 subnets for its clients. Each client will need an abundance of space in the host portion to create their own subnets.


The network address 10.0.0.0 has a default subnet mask of 255.0.0.0 or /8 prefix. This means there are 24 host bits available to borrow toward subnetting with /8 prefix length address. Therefore, the small ISP will subnet the 10.0.0.0/8 network. To create subnets we must borrow bits from the host portion of the IP address. Starting from the left to the right with the first available host bit, we will borrow a single bit at a time until we reach the number of bits necessary to create 2000 subnets. As shown in in the table in table in figure 1, we need to borrow 11 bits to create 2048 subnets. Specifically, we need to borrow the 8 bits in the second octet and 3 extra bits from the third octet. Figure 2 display the resulting subnet mask for all sub-network convert from  (255.0.0.0  - 11111111.00000000.00000000.00000000)  to (255.255.224.0  - 11111111.11111111.11100000.00000000) or a /19 prefix.




The resulting subnets of borrowing 11 bits creating subnets from 10.0.0.0 /19 to 10.255.224.0 /19. Each sub-network containing 8190 hosts. The Sub-network starting from 0 to 2047 (2048 total sub-networks).So how can we find the address range of any sub-network.? There are several ways to find the address range of any sub-network. Here we will find the address range for any sub-network using the sub-network number. There are five steps to find the address ranges for any sub-network which is following



  1. Convert the number of the network into binary.

  2. Place the binary digits into borrowed bits positions.

  3. For the first usable IP address, all bits will be 0, except the most right bit which should be 1.

  4. For the last usable IP address, all bits will be 1’s except the rightmost bit, which should be 0.

  5. All bits should be changed to 1 in the host portion of the broadcast address.


Examples of finding the network range for any subnetwork


Example-1 – fined the address range for network number 300.



Example-2 – fined the address range for network number 1035.



Example-3 – fined the address range for network number 1975.


 


Example-4 – fined the address range for network number 2047


Saturday, 21 October 2017

Creating Subnets with a /16 prefix

In circumstances where required a large number of subnets, an IP network is required that has more hosts bits to borrow from. For example, the class B network address 172.16.0.0 has a default mask of 255.255.0.0, or /16. So, this address has 16 network bits in the network portion and 16 host bits in the host portion. The 16 bits in the host portion are available to borrow for creating subnets. The table in the figure highlights all the possible scenarios for subnetting a /16 prefix. The total number of host in a network with /16 prefix is ( 216-2 =65536 ). This is a large network, for better management and performance we can subnet this network according to our requirement. The table below highlights all the possible scenarios for subnetting a /16 prefix.



/16 prefix


Example - Creating 50 Subnets with a /16 Prefix


Think about that you are a network administrator for a large enterprise that requires 50 sub-networks. You have chosen the private address 172.16.0.0/16 as its internal network address.


Borrowing bits from a /16 address, it should start in the third octet, going from left to right. Borrow a single bit one by one until the number of bits necessary to create 50 subnets is reached.


The table in figure 1 display the number of subnets and the number of host per subnet. We can consult this table.we can also create a custom table for 50 subnets which are shown in figure 2. Which displays the number of subnets that can be created when borrowing bits from the third octet. Notice there is up to 14 host bits that can be borrowed in Class B network.


IP Address - 172.16.0.0


Subnet Mask - 255.255.0.0   or  /16


Network Bits (N) - 16


Host Bits (H) - 16


Required Sub-networks - 50 


 


For 50 Sub-network we will be required to borrow 6 bits of the third octet. the prefix will be changed for each network from /16 + 6 =/22. Subnet mask will be 255.255.252.0 for each Sub-network. For Network ID we will follow the following procedure.


There are 6 borrowed bits. the arrangement of these borrowed bits will be according to the network number like the following table.  

































































Network NumberBorrowed bits arrangement in the third octetRemarks
000000000 The First six digits is the binary of the 0
100000100 The First six digits is the binary of the 1
200001000 The First six digits is the binary of the 2
300001100 The First six digits is the binary of the 3
...
...
5011001000 The First six digits is the binary of the 50
...
...
6211111000 The First six digits is the binary of the 62
6311111100The First six digits is the binary of the 63

So we can derive the address ranges, network ID, Broadcast IP, First and Last Usable IP addresses with the help of these digits. The figures below illustrate the address ranges of different networks.  









We can do the same process for All 64 sub-networks. So now we can use 50 sub-networks from the 64 sub-networks


Calculating the Hosts for subnets


To calculate hosts each subnet can support, look at the third and fourth octet. After borrowing 6 bits for the subnet, there is two host bit remaining in the third octet and 8 host bits in the fourth octet for a total of 10 bits that were not borrowed. So, apply the host calculation formula. There are only 1026 host addresses that are available for each /22 subnet.

Sunday, 8 October 2017

Classless Subnetting Examples

To understand subnetting at a classless level see the following classless subnetting examples. The private network address 192.168.10.0/24, In figure 1; the first three octets are displayed in decimal, while the last octet is displayed in binary. This is because we will be borrowing bits from this octet to create more sub-network.



The subnet mask is 255.255.255.0 as indicated by the /24 prefix length. Its mean that the first three octets are the network portion and the last octet is the host portion as shown in the above figure. With /24 prefixes (without subnetting) this network provide 254 usable host addresses supporting a single LAN. If we required an additional LAN from the same IP network (192.168.10.0/24 ), the network would need to be subnetted. Following is some questions/ problem for subnetting for the same IP network.


Example 1 – Required 2 sub-network from the 192.168.10.0/24 network.



  1. Total IP addresses with /24 prefix?

  2. Total usable IP addresses with /24 prefix?

  3. What is the Network Address?

  4. What is the Broadcast Address?


So, first of all, we are going to explain the above questions.


We know that there are total 32



[caption id="attachment_7648" align="alignright" width="136"] Sponsors[/caption]

bits in IP address /24 means that 24 bits are parts of the network portion and the remaining 32-24 = 8 bits are the parts of host portion and we know that:


 




h= 8




Total Host Addresses -  2h =xx


Putting the values -  28 =256


So Total Addresses - 256   (From 192.168.10.0  - 192.168.10.255 )




Total usable IP Addresses - 2h – 2 =xx


Putting the values -  28 -2 =254


The first and last IP addresses of the network cannot be used for the host so total usable IP addresses are 254.


The Firs IP address 192.168.10.0 is network Id, and the last IP address 192.168.10.255 is broadcast address




Now we are required 2 sub-network and we have required getting all above answer for both sub-networks. Remember that the fourth octet is displayed in binary because we will be borrowing bits from this octet to create more sub-network.


classless subnetting examples


The first question is that how much bits we should be borrowing for 2 networks, the formula for network is "2n = number of network"


So if we put 21 = 2, its mean that we should borrow 1 bit from host portion as shown in the figure 2. 1 bit is borrowed from the most significant bit (leftmost bit) in the host portion; therefore extending the network portion to 25 bits or /25. This enables the creation of two subnets. We also know that bits in the network portion must be 1’s in the subnet mask as shown in figure 2.


classless subnetting examples


Figure 3 displays the two subnets 192.168.10.0/25 and 192.168.10.128/25. The two subnets are resulting from varying the value of the bit borrowed to either 0 or 1. Because the bit borrowed is the 128 bit, the decimal value of the fourth octet for the 2nd subnet is 128.


classless subnetting examples


Figure 4 and Figure 5 displays the sub-network with the resulting subnet mask. Notice how it uses a 1 in the borrowed bit position to indicate that this bit is now part of the network portion.


The Figures also displays the dotted decimal representation of the both subnet addresses and their common subnet mask. Because one bit has been borrowed, the subnet mask for each subnet is 255.255.255.128 or /25.


classless subnetting examples


classless subnetting examples


Figure 6 displays the important addresses of the first subnet; 192.168.10.0/25 and Figure 7 display the important addresses of the subnet, 192.168.10.128/25. Notice how the



  • Network addresses are 168.10.0/25 and 192.168.10.128/25 both contains all 0 bits in the host portions

  • First host addresses of both networks are 168.10.1 and 192.168.10.129, both contain all 0 bits plus a right-most 1 bit in the host portion.

  • The last host addresses of both networks are 168.10.126 and 192.168.10.254, both contain all 1 bits plus a right-most 0 bit in the host portion.

  • Broadcast addresses of both networks are 168.1.127 and 192.168.10.255 contains all 1 bits in the host portion.


classless subnetting examples


classless subnetting examples


 


Example 2 – Required 4 sub-network from the 192.168.10.0/24 network.


Now we are required 3 sub-networks from the same private network address 192.168.10.0/24. Borrowing a single bit only provided 2 subnets so, another host bit must be borrowed as shown in Figure 8. Using the 2n formula for two borrowed bits results in (22 = 4) subnets. The details of the four subnets are shown in Figure 9. The resulting subnet mask of /26 or 255.255.255.192 is used by all four subnets. The subnet mask is also shown in Figure 9.




To determine the number of hosts, look at the last octet as shown in Figure 9. After borrowing 2 bits for the subnet from the fourth octet, there are 6 host bits remaining. Apply the host calculation formula (2h-2= Usable host) as shown to reveal that each subnet can support usable 62 host addresses. The significant addresses of each subnet are displayed in Figure 10.