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.