CCNA Study Guide online cisco ccna training guide – collection of high quality CCNA tutorials.
These tutorials are prepared with single slogan; “provide best online CCNA training absolutely free”. This comprehensive collection of CCNA Study material is exactly; what you need to prepare for following exams CCNA Routing and Switching; Cisco Certified Entry Networking Technician (CCENT), Interconnecting Cisco Networking Devices – part 1 (ICND-1); Interconnecting Cisco Networking Devices – part 2 (ICND-2). CCNA certificate is a goal in your career journey. So to get this goal we arranged this exclusive CCNA training program in such a way that you get advantage from these CCNA tutorials in exam and after getting certificate in your job life.
The transport layer uses two port numbers: the source port and the destination port. The source port numbers belong to the originating application on the local host, while the destination port numbers belong to the destination application on the remote host.
Port numbers resolve the protocol to which incoming traffic should be directed. It allows a single host with a single IP address to run different network services simultaneously. Each port number identifies a separate service, and each host can have 65535 ports per IP address. The types of ports are:-
Source Port
The originating device dynamically generates the source port numbers to identify a conversation between two devices. It allows multiple conversations to take place at the same time. It is common for a device to send multiple HTTP service requests to a web server simultaneously. Each separate HTTP conversation is tracked based on the source port numbers.
Destination Port
The host can put destination port numbers in the segment to tell the destination server about the requested service. For example, when a client specifies port 53 in the destination port, the server receives the message requesting the DNS service.
A server can offer multiple services simultaneously, such as DNS services on port 53, FTP service on port 21, and web services on port 80. The figure below illustrates the services of more than one service simultaneously.
Socket Pairs
Source and destination port numbers are placed within the segment, and then the segments are encapsulated within an IP packet. The IP packet contains the source and destination IP addresses. The combination of the source IP address and source port number, or the destination IP address and destination port number, is known as a socket. We can recognize the server and service requested by the user using a socket.
A user socket might look like this: 192.168.1.100:1220, while the port number is 1220. The socket on an FTP server might be 115.110.0.150:21. Both source and destination sockets combine to form a socket pair: for example, 192.168.1.100:1220 and 115.110.0.150:53 are a socket pair. The Figure above illustrates the connection and socket of DNS and FTP ports.
Multiple processes running on a client are made possible by sockets. Socket differentiates themselves from each other and differentiates various connections to a server process from each other—the source port number used as a return address for the requesting application. The transport layer keeps a track record of ports and the application that initiated the request so that it can be forwarded to the correct application when a reply is returned.
Port Numbers Groups
The Internet Assigned Numbers Authority (IANA) assigns various addressing standards and port numbers. Port numbers range from 0 to 65535 and are divided into three different types:-
Well-known Ports Number
Well, known port numbers start at 0 and range to 1023. These ports are reserved for service and application. Applications such as email clients, web browsers, and remote access clients use these ports. We can program well-known ports for server applications and also a client application to request a connection to that specific port and its associated service.
Registered Ports Number
The range of registered port numbers is from 1024 to 49151. The Internet Assigned Numbers Authority (IANA) assigned registered ports upon requesting the person use them with particular processes or applications. These processes are generally individual applications a user has selected to install and use rather than common applications that would receive a well-known port number.
Dynamic or Private Ports Numbers
The range of dynamic or private port numbers is from 49152 to 65535. The dynamic or private ports are also known as ephemeral ports. The ephemeral ports are generally assigned dynamically to the client’s operating system when a connection to a service is initiated.
We can use dynamic ports to identify the client’s application during communication. Some client operating systems also use registered port numbers as an alternative to dynamic port numbers for assigning source ports.
The TCP and UDP transport layer protocols handle data communications between terminals in an IP network. The TCP is a connection-oriented protocol, and UDP is a connectionless protocol.
TCP
Transmission Control Protocol (TCP) tracked the packet transmission from source to destination. For example, sending a software file to someone or downloading software from a website ensures it is 100% delivered or downloaded. WhatsApp is another example of TCP, it is used TCP as transmission control protocol. It informs the user about the receipt of the messages and if those messages have been seen and reproduced. The TCP has three basic operations:-
Numbering and tracking segments transmitted to a specific destination from a particular application
Acknowledging received data
Retransmitting any unacknowledged data after a certain period
Understanding the difference between UDP and TCP is very important. Understanding the work procedure of each protocol, the implementation of reliability features, and how they track the conversation.
Establishing a Session
TCP is a connection-oriented protocol which negotiates and establishes a permanent session between the source and destination devices before forwarding any data. Throughout the session establishment, the devices check for the amount of traffic that can be sent at a specified time, and the communication data between the two can be closely managed.
Reliable Delivery
A segment can become corrupted or lost as transmitted over the network. The reliability ensures each sending segment must arrive at the destination.
Same-Order Delivery
Data can arrive in the wrong order due to multiple routes on the network with different transmission rates and speeds. Using numbering and sequencing, TCP ensures the segments are back in the correct order.
Flow Control
The TCP provides flow control between the source and destination host. The flow control ensures the data rate at which a sender is transmitting. It ensures the data-sending speed according to the speed of the receiver’s receiving capabilities. It is used to manage the flow of data/packets among two different nodes, especially in cases where the sending device can send data faster than the receiver can take in.
UDP
User Datagram Protocol (UDP) is a connectionless and unreliable protocol. It is not guaranteed to reach its destination. Sending someone a non-registered letter or postcard is an example of User Datagram Protocol, where you put it in the postbox. Now, you have no information about the letter’s status or postcard because you don’t know about the receiver’s availability to receive the letter. The chances are good that it will get where it’s supposed to go, but there is no guarantee.
There is a possibility of loss in the way. The post office is not responsible for tracking the letter or informing the sender if the letter does not arrive at the destination. The User Datagram Protocol works Just like the above example.
The User Datagram Protocol provides essential functions for delivering data segments between suitable applications with tiny overhead and data checking. However, the User Datagram Protocol does not acknowledge the receiving data at the destination.
No transport layer processes inform the sender of a successful delivery using UDP. While the TCP reliability functions allow more dynamic communication among applications, they also incur extra overhead and possible transmission delays.
UDP Features
UDP is a best-effort, lightweight transport protocol that offers the same data segmentation and reassembles as TCP but with no TCP reliability and flow control. The features of UDP are as follows:- No Ordered Data Reconstruction – Data is reconstructed according to its receiving order. Unreliable Delivery – Any lost segments, like TCP, have not been resent in this protocol. Connectionless – No session established with the source and destination. No Flow Control – Does not inform the sender about the resource availability.
UDP Header
UDP does not inform the source and destination about the packets it receives. It also provides any state of the communication session to the client and server. The UDP application is responsible for reliability and can accept some loss of data during transmission over the network, but delays in transmission are unacceptable.
The UDP application required less network overhead than the UDP protocol. It is preferable for streaming live audio, live video, and Voice over IP. The UDP header is called a datagram, as shown in the figure below. The transport layer protocol sent these datagrams as best-effort.
We can run multiple applications on a single device and get various services. Data from each application is packaged, transported, and delivered to the proper application on the destination device. The transport layer of the OSI model accepts data from the application Layer and prepares it for network layer addressing.
A sending and receiving device communicates to decide how to split data into segments and how to make data sending possible without losing any Segment. It also determines the confirmation method for all the segments that have arrived at the receiving end.
The transport layer is responsible for end-to-end communication over a physical network. It provides logical communication between application processes running on different hosts within a layered architecture of protocols and other network components.
The Transport layer is responsible for end-to-end connectivity between hosts, Process to process delivery, error control, flow control, etc. It is also known as an end-to-end layer because it provides an end-to-end connection rather than a hop-to-hop connection. The transport layer is also responsible for data encapsulation. The unit of data encapsulation in the Transport Layer is a segment. It uses TCP, UDP, DCCP and SCTP protocols. The important responsibilities of a Transport Layer are the following:
Transport Layer process-to-process delivery
The Data Link Layer provides delivery of data frames between two neighbouring nodes over a link. It requires the 48-bit MAC address of the Network Interface Card of every host machine to deliver a frame between source and destination correctly. The data delivery on the data link layer is known as node-to-node delivery. The Network Layer is responsible for the delivery of data between two hosts. The Network layer requires an IP address to deliver packets between hosts.
Data communication on the internet does not define the exchange of data between two nodes or between two hosts. Real communication takes place between two processes. Therefore, we need process-to-process data delivery. The transport layer is responsible for the process-to-process delivery of a packet, part of a message, and from one process to another.
But, at any moment, several processes may run on the source host and several on the destination host. To complete the delivery, we need a mechanism to deliver data from one of these processes running on the source host to the corresponding process running on the destination host.
So, the port number is the mechanism that makes it possible to deliver the data segments correctly among the multiple processes running on a particular host. A port number is a 16-bit address used to uniquely identify any client-server program. The figure below illustrates the data delivery process over a network.
End-to-end Connection between hosts
End-to-end connection happens between two applications, for example, Facebook Messenger. It just considers that the two ends are talking with one another without any knowledge about the network. It is usually a transport layer responsibility. It uses TCP and UDP protocols for end-to-end connectivity.
TCP is a reliable protocol because it ensures reliable data delivery between hosts. At the same time, UDP is unreliable because it is a stateless protocol that provides best-effort delivery. UDP is suitable for applications that have little concern with flow or error control and require sending bulk data, such as video conferencing. It is often used in multicasting protocols.
Tracking Individual Conversations
Layer 4 is responsible for data flowing between source and destination applications, known as a conversation. A host may have numerous applications running across the network simultaneously. All applications communicate with one or more applications on remote hosts. It is the task of the transport or layer 4 to keep up and track these multiple conversations.
Multiplexing and De-Multiplexing
It collects data from several application processes of the sender, envelops the data with a header, and sends it to the projected receiver. The enveloping process is called multiplexing. Multiplexing allows the real-time use of different applications over a network running on a host. The transport layer provides a multiplexing mechanism to enable sending packet streams from various applications simultaneously over a network.
The transport layer at the receiving end accepts the data packets from different processes differentiated by their port numbers and passes them to the network layer after adding proper headers. In the same way, delivering received segments at the receiver side to the correct app layer processes is called de-multiplexing. De-multiplexing is required on the receiver side to get the data from several methods. The transport layer receives the data segments from the network layer and delivers them to the appropriate process running on the receiver’s machine.
Segmenting Data and Reassembling Segments
Most networks have a limit on the amount of data that can be included in a single packet. The transport layer protocols segment the data into blocks of a suitable size according to the network limitations. This segmenting service also consists of the encapsulation requirement on all pieces of data. It also includes the header necessary for racking and resembling the data stream.
On the destination side, the transport layer reconstructs different data segments into a complete data stream useful to the application layer. The protocols at the transport layer also explain how header information is used to rebuild the data pieces into streams to be passed to the application layer.
Identifying the Applications
The transport layer can recognize the target application to pass data to the correct applications. It assigns unique port numbers to all applications for recognition.
Congestion Control
Congestion often occurs in the network layer when the data traffic is so heavy that it slows down network response time. Due to many sources over a network, attempt to send data and the router buffers start overflowing due to which loss of packets occurs. As a result, the re-transmission of lost packets from the sources further increases congestion. So, the transport layer provides Congestion Control in different ways.
It uses open-loop congestion control to prevent congestion and closed-loop congestion control to remove congestion in a network once it occurs. TCP also provides AIMD—additive increase multiplicative decrease, leaky bucket technique for congestion control.
Data integrity and Error correction
Layer 4 also checks errors in the data coming from the application layer. It uses error detection codes and computing checksums to check whether the received data is error-free or contains some error. It uses the ACK and NACK services to inform the sender if the data arrives and checks for its integrity.
Flow control
Layer 4 also provides a flow control mechanism between the source and destination host. The flow control ensures the data rate at which a sender is transmitting. It ensures the data-sending speed according to the speed of the receiver’s receiving capabilities. It is used to manage the flow of data/packets among two different nodes, especially in cases where the sending device can send data faster than the receiver can take in.
By imposing flow control techniques, TCP prevents data loss due to a fast sender and slow receiver. It uses the sliding window protocol, which allows the receiver to send a window back to the sender, informing the data size it can receive.
Conversation Multiplexing
One complete stream can consume all the existing bandwidth across a network. The stream prevents other communications from occurring at the same time, which will also make error recovery and retransmission of damaged data difficult.
The transport or layer 4 segmenting the data into smaller chunks enables many communications, from many users to multiplex on the same network. Layer 4 adds a header to recognize each segment of data. The header fields enable various transport layer protocols to do different functions in managing data communication.
Reliability
Different applications have different transport reliability requirements. It specifies how to transfer data between other hosts. TCP/IP model provides two transport layer protocols:-
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
The IP address is only concerned with the packets’ structure, address, and routing. It does not specify the delivery and transportation of the packets. IP address uses TCP and UDP to allow hosts to communicate and transfer data with each other. The figure below illustrates both TCP and UDP.
TCP is a reliable, full-featured transport protocol that ensures that all the data arrives at the destination side. In contrast, UDP is a simple transport protocol that does not provide reliability.
We know that IP version 6 addresses will replace IP version 4 addresses because IP version 4 address space is running out. We use CIDR, VLSM, and NAT to save as much IPv4 address space as possible. The CIDR, VLSM, and NAT are not available in IPv6 addresses. IPv6 subnetting requires a different approach than IPv4 subnetting. Because there are too many addresses, the reason for IPv6 subnetting is different.
The IP version 4 addresses are 32-bit, while the IP version 6 addresses are 128-bit, which allows more hosts. The IP version 6 allows about 340,282,366,920,938,463,463,374,607,431,768,211,456, or 340 undecillion addresses, almost equal to each particle of sand on the Earth. The addresses are too large for humans to seize.
The IPv4 subnet limits the broadcast domains, increasing the network’s efficiency and speed. We also required subnetting for better management of IP addresses. The Variable Length Subnet Mask (VLSM) and Fixed Length Subnet Mask help to maintain IPv4 address space. IPv6 subnetting is not concerned with maintaining address space. The /64 is the smallest recommended subnet prefix in IPv6 addresses.
If you have a few devices on your subnet or your network, you must use a /64 prefix address with 264 IP addresses. The critical thing about IPv6 is that it does not use network ID and broadcast addresses. So, an address where the host bits are all 0s or all 1s is still valid. There are two types of assignable IPv6 addresses:
link-local
Global Unicast Addresses
Each IP version 6-enabled device can create a unique link-local address based on the MAC address of that device Using the EUI process.
The IPv6 Global Unicast Addresses
The IP version 6 global unicast address generally consists of a /48 global routing prefix, a 16-bit subnet ID, and a 64-bit interface ID. We already discussed the IPv6 Global Unicast addresses. You can see that the subnet ID is 16 bit, which is more than enough subnets. IPv6 subnetting is about building an addressing hierarchy based on the number of sub-networks needed.
IPv6 Subnetting Using Subnet ID
The 16-bit subnet ID of the IPv6 global unicast address is used to create more 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 supports 18,000,000,000,000,000,000 host IPv6 addresses for each subnet. IPv6 subnetting is easier than IPv4 addresses because there is no binary conversion in IPv6 subnetting. It just required counting in hexadecimals.
Example of Subnetting IPv6 Addresses
Suppose an IP version 6 address 2001:1D11:220A::/48 is assigned to an organization with a 16-bit subnet ID. The network administrators can subnet the IP version 6 address just counting /16-bit subnet ID in hexadecimal. This would allow the administrator to create a 65,536 /64 subnet. The table below illustrates the subnetting procedure of the IPv6 address.
An IP version 6 network needs a subnet for each LAN and for the WAN link. We cannot further subnet the IP version 6 WAN link network like IP version 4 addresses. Even if this may “waste” more addresses, that is not a concern when using IP version 6.
As shown in the figure above, there are 6 subnetworks which allotted six subnets, with the subnet IDs 0000 through 0004 assigned to LANs and a subnet with ID 0005 assigned to WAN links. Every /64 subnet will give more addresses than these Local Area Networks (LANs) require, including Wide Area Networks (WANs). As shown in the Figure, each Local Area Network (LAN) segment and the Wide Area Network (WAN) link are assigned a /64 subnet.
VLSM (Variable Length Subnet Masking) helps improve the use of IP address space. We can assign LAN and WAN segments without waste using a Variable Length Subnet Mask (VLSM). As shown in the scenario in the Figure below, the hosts in each sub-network will be assigned a subnet according to the number of hosts to decrease the waste of IP addresses.
Each subnet’s first host IPv4 address is assigned to the router’s LAN interface. The routers’ WAN interfaces 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 for the above-mentioned network scenario.
In the previous lesson, we have assigned the one subnet to each network. Each network contains 126 usable hosts. You can see that many IPs will waste in-network human resources, quality control and between the WAN ports of the routers. So, we can ignore the waste of IP addresses using VLSM subnetting.
First, we can assign the first three subnets of the previous lesson to the management, finance, and sales departments because the number of hosts in these LANs is between 64 and 128. Therefore, we need a network with /25 prefixes, which can accommodate 126 hosts.
We can subnet the Net-3 into /26, /27, and 8x /30 networks. The network with the/26 prefix can accommodate up to 62 hosts, and the network with the/27 prefix can accommodate up to 30 hosts. In comparison, the network with /30 prefix is generally used for point to point connectivity. The figure below illustrates the assigned IP addresses to the scenario we discussed in the previous lesson. Still, you can see that we have saved many IP addresses for future use.
VLSM Chart
An addressing chart is very important for identifying the blocks of addresses already used and the blocks available for future use, as shown in the table below. The VLSM chart helps the network administrator to avoid assigning addresses that have previously been allocated.
Sometimes, the number of sub-networks is more critical than the number of host addresses per sub-network. For example, an organization wants to separate 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. Accommodating the maximum number of hosts, including the required number of subnets, is the best practice in networking. The addressing scheme must allow for expansion in the number of host addresses per subnet and the total number of subnets. In this lesson, I will discuss subnetting based on network requirements.
We borrow bits from the host portion into the network portion to create subnets. The formula to calculate the subnet in case of borrowing bits is 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 of Subnetting Based on Network Requirement
In this example, an organization has allocated a network address of 115.255.240.0/22. You can see that the network prefix is 22, meaning there are 8 bits available in the host portion. So, the number of hosts is 210-2=1022. Now, the organization must isolate the traffic of all departments from each other. So, we will do the subnetting based on network requirements. The topology for the departments is shown in the figure below, consisting of 5 LAN segments and one router segment. So 6 subnets required for this topology. The largest subnet requires 120 hosts, and the smallest segment requires 30 hosts.
The 115.255.240.0/22 network address has 10 host bits. The largest subnet requires 120 hosts, which requires 7 host bits to provide 126 usable IP addresses for hosts. The formula for determining a host is 27 – 2 = 126 hosts. So if we require 7 bits for the host portion, then we can borrow 3 bits from the 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 the Figure below. When 3 bits are borrowed, the new prefix length is /25 with a subnet mask of 255.255.255.128. For example, Internetwork requires 6 subnets; the available subnet is 8. This will allow for some additional growth in the network.
The above table lists the network ID, first usable IP address, last usable IP Address and broadcast ID for all sub-networks. You can see the borrowed bits are marked with red. Examine whether the borrowed bits in each network are the binary of that network number. For example, if we convert 5 into binary, which is “101,” you can see the borrowed bis in Net-5, which is the same as “101“
We consider either the host requirement or the network requirement for subnetting. The table below in the figure displays the details for subnetting a /16 network. You can examine how there is an opposite relationship between the number of hosts and the number of subnets. The more borrowed bits result in more subnets, but with fewer host bits available, there are fewer hosts in the network. If the host requirement is more addresses, then more host bits are necessary, which results in fewer subnets.
In this lesson, we will discuss the subnetting based on the host requirement. We will jump right into the examples for better understanding. The examples we will be talking about will seem to be the same as the ones we did in the earlier lesson, but there is a most important twist that makes them special.
Let’s suppose we have purchased the address 192.168.100.0 with the subnet mask 255.255.255.0 and are required to break that address into 62 hosts per network. The number of hosts 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 as the one based on network requirements.
Convert the number of hosts to binary
Required Host – 62 (So convert 64 into binary)
62 = 111110
Reserve bits in the subnet mask and find the increment
S, we need 6 bits in the host portion of the address. The difference is that we convert the number of hosts per network back to binary instead of the number of networks. We already learned that “1s” represent the network and 0s represent the hosts in the subnet mask. Also, remember we are still subnetting and focusing on the host rather than the network requirement. So, the binary of 62 takes up to 6 bits, right? Now examine the default subnet mask before subnetting and the subnet mask after adding ones in the place of borrowed bits position places.
So, the new subnet mask is 255.255.255.192 or /26. So, 62 hosts’ needs 6 bits in the host portion. Also, note that instead of going from left to right as we did with the network requirements, I went from right to left because that’s where my 0s exist. We know that we can get 30 hosts per sub-network.
Use the increment to find the network ranges.
Our focus is just on the 0s in subnetting on host requirement-based. So, let’s now find the network ranges. Our increment is 64 because the lowest network bit converted back to a decimal number is 64.
Net
Network ID
Broadcast IP
Total IP Addresses
Net-0
192.168.100.0 + 000.000.000.64
192.168.100.63 + 000.000.000.64
64
Net-1
192.168.100.64 + 000.000.000.64
192.168.100.127 + 000.000.000.64
64
Net-2
192.168.100.128 + 000.000.000.64
192.168.100.191 + 000.000.000.64
64
Net-3
192.168.100.192 +
192.168.100.255 +
64
We know that the first and last addresses of each sub-network aren’t usable, so we have exactly 62 usable hosts per network.
Some organizations need more subnets. For example, a small ISP requires 4000 subnets for its clients. Each client required abundant space in the host portion to create their subnets. The network address 115.0.0.0/8 has a default subnet mask of 255.0.0.0 or /8 prefix. The /8 prefix means that there are 24 host bits available to borrow.
To create subnets we must borrow bits from the host portion of the IP address from left to 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 4000 subnets. We need to borrow 12 bits to create 4096 subnets. So, for borrowing 12 bits, we need 8 bits in the second octet and 4 extra bits from the third octet to borrow.
The resulting subnet mask for all sub-network converts from (255.0.0.0 – 11111111.00000000.00000000. 00000000) to (255.255.240.0 – 11111111.11111111.11110000. 00000000) or a /20 prefix.
The network address of the/8 network is 115.0.0.0/8, and the broadcast address is 255.0.0.0 (11111111.00000000.00000000. 00000000). The resulting subnets of borrowing 12 bits create subnets from 115.00000000.000000000. 000000000/20 to 10.11111111.11110000.000000000/20 (115.0.0.0/20 to 115.255.240.0/20). Each subnetwork contains 2096 hosts. The Sub-networks start at 0 and continue to 4095 (4096 sub-networks). So, how can we find the address range of any subnetwork?
There are numerous ways to find the address range of any sub-network. 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:
Convert the network number into binary.
Place the binary digits into borrowed bits positions.
All bits in the host portion will be 0 in the host portion.
All bits in the host portion will be 0 for the first usable IP address, except the most suitable bit, which should be 1.
All bits will be 1’s except the rightmost bit for the last usable IP address, which should be 0.
All bits should be changed to 1 in the host portion of the broadcast address.
Examples of finding the network range for any subnetwork of the above-mentioned/8 prefix network
Example-1 – fined the address range for network number 1055.
To find network number 1055’s address range, first, we need to find the binary of 1055, which is 10000011111. It is 11 bits, and we have borrowed 12 bits, so we can add 0 at the leftmost side, which is 010000011111.
After converting 1055 into binary, place the 12-bit value in the places of borrowed bits in the 2nd and 3rd octets. Now, follow the rules to find the network address, broadcast address, and first and last usable IP addresses.
Example 2 – Let us find the address range for network number 2040.
Example-3 – fined the address range for network number 2980.
Example-4 – fined the address range for network number 4025
Example-5 – Let Us find the address information for the last subnet, 4095.
You can see that the borrowed bits in the network portion are at maximum now. Because 4095 is the last sub-network.
In many situations, we required a large number of subnets. For this purpose, an IP network requires more host bits to borrow from. For example, the class B network address 130.20.0.0 has a default mask of 255.255.0.0 or /16 Prefix. 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 below highlights all the possible scenarios for subnetting a /16 prefix. The total number of hosts in a network with a/16 prefix is ( 216-2 =65536 ). This is an extensive network. We can subnet this network according to our requirements for better management and performance.
Example –You are a network administrator for a large enterprise that requires 60 sub-networks. You have the Public address 130.20.0.0/16.
Borrowing bits from those mentioned above/16 prefix network should start in the third octet, going from left to right. Borrow a single bit one by one until the calculation reaches 60. You can also consult the table in the above figure, which displays the number of subnets and the number of hosts per subnet. We can also create a custom table for 60 subnets. The table below displays the number of subnets that can be made when borrowing bits from the third octet. Notice that up to 14 host bits can be borrowed in the Class B network.
IP Address – 130.20.0.0
Subnet Mask – 255.255.0.0 of /16
Network Bits (N) – 16
Host Bits (H) – 16
Required Sub-networks – 60
For 60 Sub-network, we are required to borrow 6 bits from the third octet. Each network’s prefix will change
from /16 + 6 =/22. The subnet mask will be 255.255.252.0 for each Subnetwork, and with 6 borrowed bits, we can make 64 subnets. For Network ID, we will follow the following procedure.
There are 6 borrowed bits. These borrowed bits will be arranged according to the network number, as in the following table.
Network Number
Borrowed bits arrangement in the third octet
Remarks
0
00000000
The first six digits are the binary of the 0
1
00000100
The first six digits are the binary of the 1
2
00001000
The first six digits are the binary of the 2
3
00001100
The first six digits are the binary of the 3
.
.
.
.
.
.
50
11001000
The first six digits are the binary of the 50
.
.
.
.
.
.
62
11111000
The first six digits are the binary of the 62
63
11111100
The first six digits are the binary of the 63
So we can derive the address ranges, network ID, Broadcast IP, and First and Last Usable IP addresses with the help of these digits. For example, we have required the above-mentioned parameters for subnet numbers 20, 40, and 55.
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 for each subnet, look at the third and fourth octets. After borrowing 6 bits for the subnet, two host bits remain in the third octet and 8 host bits in the fourth octet, for a total of 10 bits in the host portion. So, apply the host calculation formula. There are only 1026 usable host addresses available for each /22 subnet.
In the previous article, we have discussed the examples of classful subnetting which is too simple. we have borrowed host bits from the standard/8, /16, and /24 network prefixes. However, we can borrow bits from any host bit position using classless subnetting to create other masks. For example here, a /24 network commonly subnetted by longer prefix lengths by borrowing bits from the fourth octet. The administrator can assign network addresses to a smaller number of end devices using classless subnetting with the longest prefix and a smaller network. The figure below illustrates the /24 network further into smaller networks.
The first columns illustrate the prefix length of each subnet after borrowing bits from the fourth octet
The second columns illustrate the subnet mask for each subnetted network.
The third columns illustrate all the network, host, and borrowed bits in the subnet mask. Capital N is showing network bits, Capital H is showing host bits while small n is showing borrowed bits.
The fourth column illustrates the number of usable hosts per subnetted network.
The last column illustrates the number of available sub-networks after borrowing bits.
Classless Subnetting Example
The figure below illustrates the private network with /24 prefix. The network is 192.168.200.0. The first three octets are displayed in decimal, while the last octet is displayed in binary because we will get the borrowed bit from the fourth octet to create more sub-networks.
The subnet mask indicates that the prefix length is 24 bits. 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 provides 254 usable host addresses supporting a single LAN.
If we required an additional LAN from the same IP network (192.168.200.0/24 ), the network would need subnetting. Following are some questions/problems for subnetting the same IP network.
The administrator required two sub-networks from network 192.168.200.0/24 network. So, first of all, we must have the answers to the following questions.
Total IP addresses with /24 prefix?
What are the total usable IP addresses with /24 prefixes?
What is the Network Address?
What is the Broadcast Address?
So, first of all, we will explain the above questions. We know that there are a total 32 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 the host portion, and we know that:
So we have required 2 sub-networks from the above network and all the above answers 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-networks.
The first question is how many bits we should be borrowing for two networks; the formula for the network is “2n = number of networks”
If we put 21 = 2, it means that we should borrow 1 bit from the host portion, as shown in the figure below. 1 bit is borrowed from the most significant bit (leftmost bit) in the host portion, so it extends the network portion to 25 bits or /25. The borrowed bit must be converted from 0 to 1 because the network bits are always 1’s and the host bits are always 0’s.
The figures in borrowed bits should be different for each subnet. The two subnets result from varying the value of the borrowed bit, either 0 or 1. The figure below illustrates both sub-networks.
The octet in Net 0 is 00000000, and in Net one is 10000000. If we convert the fourth octet back to decimal we can see the resultant subnets that are 192.168.200.0/25 and 192.168.200.128/25.
The figure below illustrates both subnets with the resultant 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 display the dotted-decimal representation of both subnet addresses and their ordinary subnet mask. The subnet mask for each subnet is 255.255.255.128 or /25 because it has one borrowed bit.
The figure below displays the necessary addresses for subnets 192.168.200.0/25 and 192.168.200.128/25.
Network addresses are 192.168.200.0/25 and 192.168.200.128/25, and both contain all 0 bits in the host portions.
Both networks’ first usable host addresses are 192.168.200.1 and 192.168.200.129; both contain all 0 bits, plus the right-most bit in the host portion is 1.
The last usable host addresses of both networks are 192.168.200.126 and 192.168.200.254. Both contain all 1 bits in the host portion except the right-most and last bit in the host portion, which is 0.
Broadcast addresses of both networks are 192.168.200.127 and 192.168.200.255, containing all 1s in the host portion of the IP address.
Example 2 – Required 4 sub-networks from the same Network 192.168.200.0/24.
Now we require 3 sub-networks from the same private network address 192.168.200.0/24. The first question raised is as:
How many bits are required to borrow from the host portion to the network portion for 4 sub-networks. ?
Borrowing a single bit provides 2 subnets, so go further by borrowing another host bit. Borrowing 2 bits results in (22 = 4) subnets. So, we should borrow 2 bits from the host portion to the network portion, as shown in the figure below. The subnet mask or network prefix of the subnetted network is changed to /26 or 255.255.255.192.
The value XX illustrates that the bit should be changed for each network. We have borrowed 2 bits from the host portion. So, in the first network, or Subnet-0, the value for XX = 00, Subnet-1 the value for XX=01, Subnet-2 the value of XX=10, and Subnet-3 the value of XX=11.
We can determine the number of hosts per network by looking at the last octet in the figure above. After borrowing 2 bits from the subnet from the fourth octet, 6 host bits are remaining. Apply the host calculation formula (2h-2= Usable host) to reveal that each subnet can support usable 62 host addresses. The figure below displaysthe significant addresses of each subnet.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.