Saturday, 30 September 2017

Classless Subnetting

Classful subnetting is based on the default Class A, B or C networks. The classful network uses only the 



default mask for its classes (A, B, C).


Class A: 0 - 127 with a mask of 255.0.0.0 or /8


Class B: 128 - 191 with a mask of 255.255.0.0 or /16


Class C: 192 - 223 with a mask of 255.255.255.0 or /24



Routers running a classful routing protocol do not include subnet mask information with routing updates, the router assumes either its own subnet mask or defaults to the classful subnet mask.


On the other hand, classless subnetting allows the use of variable length subnet masks or VLSM. The classless network uses a CUSTOM subnet mask obtained by adding EXTRA bits to the default class mask. Routers running a classless network included subnet mask information with its routing updates.


100.110.0.0/19


10.5.50.0/26


172.16.16.0/22


172.16.16.0/15


CIDR


Classless Inter-Domain Routing (CIDR) introduce prefix. Because with the classless approach you can go right and left at the 32bits string, so it is easy to use the number of the place value as Subnet Mask. The prefix is easier to set and reference instead of using the full subnet mask address.


Examples /24 Network Subnetting


The examples we have seen so far borrowed host bits from the common /8, /16, and /24 network prefixes. but, subnets can borrow bits from any host bit position to create other masks.


For example here, a /24 network address is commonly subnetted by longer prefix lengths by borrowing bits from the fourth octet. This provides the administrator with further flexibility when assigning network addresses to a smaller number of end devices. The figure below illustrates the /24 network in into smaller networks.




  • /25, 1-bit borrowing from the fourth octet creating 2 subnets containing  126 hosts each subnet.

  • /26, 2-bit borrowing from the fourth octet creating 4 subnets containing  62 hosts each subnet.

  • /27, 3-bit borrowing from the fourth octet creating 8 subnets containing  30 hosts each subnet.

  • /28, 4-bit borrowing from the fourth octet creating 16 subnets containing 14 hosts each subnet.

  • /29, 5-bit borrowing from the fourth octet creating 32 subnets containing 6 hosts each subnet.

  • /30, 6-bit borrowing from the fourth octet creating 64 subnets containing 2 hosts each subnet


Subnetting Formulas



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

To calculate the exact number of subnets that can be produced the bits borrowed from the host portion, use the formula (1) and for the number of host per network use formula number (2).


The "n" is the number of bits borrowed from host portion. This formula will produce the number of the possible network. The bits in network portion and borrowed bits must be one in the subnet mask.


The "h" is the number of bits remaining in the host portion. This formula will produce the number of usable host addresses for each sub-network. There are two subnet addresses that cannot be assigned to any host, the network address and the broadcast address, so we must subtract 2 for usable host addresses.

Saturday, 16 September 2017

IPv4 Address Octet Boundaries

Each interface on a router which is connected to a network is required IP address and subnet mask. The IP address and subnet mask are used to identify the specific broadcast domain. Remember that we have



 already learned the following topics in the previous chapter:


 



  • Introduction to IP address

  • IPv4 Addresses

  • IPv4 Host and Network Portions

  • Expression of subnet mask

  • IPv4 address classes

  • Private and Public IP addresses

  • Classful and Classless IP addresses

  • IPv6 addresses


Here in this chapter, we are going to learn IP address subnetting. As we know that the prefix length and the subnet mask are different ways of identifying the network portion of IP address.


IPv4 Subnetting is done by borrowing host bits and using them as network



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

bits. This is done by extending the subnet mask to borrow some of the host portion bits of the address to create supplementary network bits. The more host bits that are borrowed, the more sub-network that can be defined.


 


As we know that IPv4 has 4 octets and the octet boundaries are /8, /16, and /24. Networks are most easily subnetted at these octet boundaries. The table in the figure identifies prefix lengths, subnet masks equivalent to prefix, the network and host bits, and the number of hosts each subnet can connect. observe that longer prefix lengths mean less number of host per network.


octet boundaries


Subnetting on the Octet Boundaries


As we already say that subnetting on the octet boundary is so easy. Consider the following example for understanding subnetting on the octet boundary. Assume an organization has selected the private network 10.0.0.0/8 as its internal network address. In a single broadcast domain, there are 16,777,214 hosts can connect. This is a large network and will cause a large broadcast causing slow network performance. So, this is not perfect.


The organization can further subnet the network 10.0.0.0/8 address at the octet boundary of /16 as shown in Figure 2. This can provide 256 sub-networks to an organization (i.e., 10.0.0.0/16 – 10.255.0.0/16) with each subnet containing of 65,534 hosts. Recall that the first two octets identify the network portion of the address while the last two octets are for host portion of IP addresses while using /16 prefix



The organization can also choose to subnet at the /24 octet boundary as shown in Figure 3. This can provide 65536 sub-networks to an organization (i.e., 10.0.0.0/24 – 10.255.255.0/16) with each subnet containing 256 hosts. Recall that the first three octets identify the network portion of the address while the last octets are for host portion of IP addresses while using /24 prefix


Broadcast Domains

Broadcast domains are a logical parts or divisions of a computer network in which a broadcast is forwarded. In a broadcast domain, all the devices can be reached via broadcast at the datalink layer (OSI  Layer 2). A Broadcast Domain consists of all the devices that will receive any broadcast packet; originating from any device within the network segment. All ports of the hub and switch are by default in the same broadcast domain. Hub and Switches transmit broadcasts out all interfaces except the interface on which it was received.   Routers do not transmit broadcasts. When a router receives a broadcast, it does not forward it out other interfaces. Therefore, each router interface connects a broadcast domain and broadcasts are only propagated within its specific domain. Routers are used to separate the boundaries of the broadcast domains. The figure below shows the broadcast domain with different network sizes.


broadcast domains


In the figure above there are three broadcast domains since all ports on a hub and a switch are in the same broadcast domain and all ports on a router are in a different broadcast domain.


In an Ethernet LAN; A devices use Address Resolution Protocol (ARP) which sends Layer 2 broadcasts to a known IPv4 address on the local network to discover the associated MAC address. The host also gets its IP address configuration using the Dynamic Host Configuration Protocol (DHCP) which sends broadcasts on the local network to locate a DHCP server.


A large broadcast domain is a network that connects many hosts. A problem with a large broadcast domain is that these hosts can generate excessive broadcasts and negatively affect the network. In Figure 1, LAN 1 connects 400 users that could generate broadcast traffic resulting in:


The decrease in available Bandwidth: A large number of Broadcasts will decrease the total bandwidth of the network for normal traffic because the broadcast traffic is forwarded to all the devices in the domain.


The decrease in processing power of computers and network devices: Since the computers and network devices need to process all the broadcast packets received; a part of the CPU power is spent on processing the broadcast packets. This will reduce the processing power of computers and network devices in a Broadcast domain.


Why We Need Subnets


Subnetting is the process which decreases network traffic and improves the network performance. It also makes management very easy. When you want to isolate some segments from some other administrator can easily do this. It also enables an administrator to apply security policies such as which subnets are allowed or not allowed to communicate together. There are different ways of using subnets. Network administrators can set devices and services into subnets such as:



  • Different floors in a building

  • Different Organizations or the sections of any organizations

  • Types of Different Devices such as servers, printers, and hosts

  • Any other division that makes sense for the network.


 


Love my blog? Keep me in shoes and show your support by donating here  [donate payment=co type=default]


 

Friday, 15 September 2017

Introduction to Subnetting

Subnetting is used to design, implement and manage an effective IP addressing plan. It is used to partition a single physical network into more than one smaller logical sub-networks (subnets). An IPv4 address contains a network portion and a host portion. These two portions of addressing allow for basic network groupings that facilitate in routing packets between different networks. A router forwards packets based on the network portion of an  IP address. When the network is located, the host portion of the address allows for identification of the destination device. But, as networks grow up, with a lot of organizations adding thousands of hosts to their network, the two-level hierarchy is not enough. Subdividing a network adds an another level to the network hierarchy, creating spirit, three levels: a network, a subnetwork, and a host.



Subnetting allows an organization to add sub-networks without the need to get a new network. Subnets are designed by accepting bits from the IP address's host portion and using these bits to assign a number of smaller sub-networks inside the original network. Subnetting helps to decrease the network traffic and conceals network complexity. Subnetting is essential when a single network number has to be allocated over numerous sub-networks of a local area network (LAN).


As we learn in the previous lessons that each IP address consists of a subnet mask. All the class types, such as Class A, B, and C include the subnet mask known as the default subnet mask. The subnet mask is used for determining the type and number of IP addresses required for a given local network. The router is called default gateway. The default subnet mask is as follows:



  • Class A: 255.0.0.0      or  /8

  • Class B: 255.255.0.0   or  /16

  • Class C: 255.255.255.0  or /24


The subnetting allows the network administrator to partition a single Class A, B, or C network into smaller portions. The subnets can be subnetted again into more sub-subnets. Subnetting network into a number of subnets provides the following benefits:



  • Improve network performance and speed. Subnetting allows sub-network to maximize their speed and effectiveness. Subnetting also divides network’s broadcast domains, which enabling network administrator to better control traffic flow, thus increasing network performance.

  • Better Match to Physical Network Structure. It is allowed any organization to subnet its network that reflect the way they are actually structured in the organization's physical network. 

  • Flexibility. The number of sub-networks and number of hosts per sub-network can be modified for each organization and they can decide on its own subnet structure and change it as required. It is also allowing to use two or more LAN technologies together in the same network.

  • Routing Table size. Subnets also helpful to minimize the size of the routing tables on the internet since additional network numbers will not be added to the table.

  • Simplified Management. Subnetting makes management very easy. When you want to isolate some segments from some other administrator can easily do this.

  • Reduce network congestion. Subnetting ensures that traffic destined for a device within a subnet stays in that subnet, which reduces congestion. 

  • Boost network security. The network administrator can control the flow of traffic using ACLs, QoS, or route-maps, enabling you to identify threats, close points of entry, and target your responses more easily by using subnetting.

Tuesday, 12 September 2017

Traceroute (tracert) – Testing the Path

The Ping utility is only used to test connectivity between two hosts but traceroute provide information about the details of devices between the two hosts. Traceroute (tracert) is an also a utility that generates a list of hops that were successfully reached beside the path. The list provided by traceroute provide important information for verification and troubleshooting of the network.


If the data reaches the destination successfully, then the trace provides a complete list of the interfaces of every router in the path between the two hosts. If the data fails at some hop along the path, the address of the last router that responded to the trace can provide an indication of where the problem or security restrictions are found.


 


Round Trip Time (RTT)


The traceroute provide round trip time (RTT) for each hop alongside the path and indicate the hops which do not respond. The round trip time (RTT) is the time a packet takes to reach the remote host and for the acknowledge from the host to return. An asterisk (*) is used to indicate a loss or un-replied packet.


This information is important to locate a problematic router in the path to the remote host. If there are high response times or data losses from a particular hop; this is an indication that there is something wrong with the resources of the router or its connectivity.


IPv4 TTL and IPv6 Hop Limit


Traceroute used TTL field in IPv4 and the Hop Limit in the IPv6 in the layer 3 header. It also uses ICMP time exceeded message.


The figure shows the traceroute to http://fschub.com. The first series of messages sent from traceroute will have a TTL field value of 1. This causes the TTL to time out the IPv4 packet at the first router. This router then replies with an ICMPv4 messages. Traceroute now listed the address of the first hop.


traceroute


Traceroute then increasingly increments the TTL field to 2, 3, 4... for each series of messages. This provides the trace with the address of each hop as the packets time out further down the path. The TTL field continues to be increased until the destination is reached; or it is incremented to a predefined maximum.


When trace reached to the final destination; the host responds with either an ICMP port unreachable message or an ICMP echo reply message instead of the ICMP time exceeded message.

Ping

Short for Packet InterNet Groper, Ping is a utility that uses ICMP echo request and echoes reply messages to verify connectivity between hosts. Ping can be used with both IPv4 and IPv6 hosts.To test connectivity to another host on a local network or remote network, an echo request is sent to the address of destination host using this command. If the host at the particular address receives the echo request, it responds with an echo reply. As each echo reply is received, ping gives feedback on the time between when the echo request was sent and when the echo reply was received. This time can be determining the performance of the network.


Ping has a timeout value for the reply. If a reply is not received within this period, its provides a message which indicates that a response was not received from the destination host. This typically indicates that there is a problem with the remote host or with the network. In some cases, it may be caused due to security features which block ping messages on the network.


Once all the ping requests are sent, the utility provides a detailed summary that shows the success rate, losses and average round-trip time to the destination.


Pinging the Loopback Addresses


If a host is unable to connect the resources, then it can troubleshoot by using the ping command to test connectivity. The very first test for which we can use ping utility is the internal configuration of IPv4 or IPv6 on the local host. To perform this test, we ping the local loopback address of 127.0.0.1 for IPv4 and (::1 )for IPv6.


A response from 127.0.0.1 for IPv4, or (::1) for IPv6, indicates that TCP/IP is properly installed on the host. But this response is not an indication that the addresses, masks, or gateways are properly configured. It is also not indicate anything about the status of the lower layer of the network stack. This simply tests IP down through the network layer of IP. An error message indicates that TCP/IP is not operational on the host. The Figure below shows the pining of loopback addresses both for IPv4 and IPv6.


Ping Loopback


Testing Connectivity to the Local LAN


Ping can also be used to test the capability of a host to communicate on the local network. This is generally done by pinging the IP address of the gateway of the host. A successful ping to the gateway shows that the host and the router interface serving as the gateway are both operating on the local network.


For this test, the gateway address is mostly used because the router is normally for all time operational. If the gateway address does not respond, a ping can be sent to the IP address of another host on the local network that is known to be operational.


If one of the both gateway or another host responds; then the local host can effectively communicate over the local network. If the gateway does not respond but another host responds; this could point to a problem with the router interface serving as the gateway.


It is also possible that the wrong gateway address has been configured on the host. Another option is that the router interface may be fully operational but have security applied to it that prevents it from processing or responding to ping requests. The figure below you can see when i am pinging my local network.


Ping Local Network


Testing Connectivity to Remote Network


Ping can also test the capability of a local host to communicate across an internetwork. The local host can ping an operational IPv4 host of a remote network.


If this ping is successful, the operation of a large portion of the internetwork can be verified. A successful ping across the internetwork verify communication on the local network; the function of the router serving as the gateway; and the function of all other routers that might be in the path between the local network and the network of the remote host.


furthermore, the functionality of the remote host can also be verified. If the remote host could not communicate outside of its local network, it would not have responded. The figure below I am pinging my remote network. 


Ping Remote Network


[donate]

Saturday, 9 September 2017

ICMPv6 Router and Neighbor Solicitation and Advertisement Messages

The informational and error messages found in ICMPv6 are very similar to the messages implemented by ICMPv4. But, ICMPv6 has new and improved features and functionality which not found in ICMPv4. ICMPv6 messages are encapsulated in IPv6. ICMPv6 has four new protocols as part of the Neighbor Discovery Protocol. Messaging between an IPv6 enabled router and an IPv6 enabled devices are following:



  • Router Solicitation (RS) message

  • Router Advertisement (RA) message

  • Neighbor Solicitation(NS) message

  • Neighbor Advertisement (NA) message


Router Solicitation (RS) message


When a host is configured to get its addressing information automatically using SLAAC, the host will send an RS message to the router at a system start-up time. The RS message is sent as an IPv6 all-routers multicast message to address FF02::2.


Router Advertisement (RA) message


RA messages are sent periodically by a router to provide the following information to hosts:



  • Addressing information using SLAAC such as the prefix, prefix length, DNS address and domain name.

  • IPv6 prefixes for automatic address configuration

  • Information such as MTU, hop limit reachable time, retransmission time for neighbor solicitations


Neighbor Solicitation(NS) message and Neighbor Advertisement (NA) message are used for Address resolution and Duplicate Address Detection (DAD).


Address Resolution


Address Resolution is used when a device knows the IPv6 unicast address of the destination device on the same link but does not know its MAC address. This is equivalent to an ARP Request for IPv4. To determine the MAC address of the destination, the device will send an NS message to the solicited-node address. The message will contain the known destination IPv6 address. The destination device that will respond with an NA message containing its Ethernet MAC address.


Duplicate Address Detection


IPv4 nodes use ARP Request messages and a method called gratuitous ARP to detect a duplicate unicast IPv4 address on the local link. in the same way, IPv6 nodes use Neighbor Solicitation (NS) messages to detect the uniqueness of an address on the local link in a process known as duplicate address detection (DAD). The device will send an NS message with its own IPv6 address as the targeted IPv6 address. If another device on the network has this address, it will respond with an NA message. This NA message will notify the sending device that the address is in use. If a corresponding NA message is not returned within a certain period of time, the unicast address is unique and acceptable for use.


Donate to our early education programs because learning can’t wait


[donate payment=co type=default]