VLSM

Variable Length Subnet Masking - VLSM -  is a technique that allows network administrators to divide an IP address space to subnets of different sizes, unlike simple same-size Subnetting.
 A Variable Length Subnet Mask (VLSM) in a way, means subnetting a subnet. To simplify futher, VLSM is the breaking down of IP addresses into subnets (multiple levels) and allocating it according to the individual need on a network. It can also be called a classless IP addressing. A classful addressing follows the general rule that has been proven to amount to IP address wastage.
Before you can understand VLSM, you have to be very familiar with IP address structure.
The best way you can learn how to subnet a subnet (VLSM) is with examples. Lets work with the diagram below:

VLSM Explained


Looking at the diagram, we have three LANs connected to each other with two WAN links.
The first thing to look out for is the number of subnets and number of hosts. In this case, an ISP allocated 192.168.1.0/24. Class C
HQ = 50 host
RO1 = 30 hosts
RO2 = 10 hosts
2 WAN links
We will try and subnet 192.168.1.0 /24 to sooth this network which allows a total number of 254 hosts I recommend you get familiar with this table below. I never leave home without it!
 
orbit-computer-solutions.com/VLSM
 
 
 
Lets begin with HQ with 50 hosts, using the table above:
We are borrowing 2 bits with value of 64. This is the closest we can get for 50 hosts.
 
HQ - 192.168.1.0 /26 Network address
HQ = 192.168.1.1 Gateway address
192.168.1.2, First usable address
192.168.1.62- Last usable address. Total address space -192.168.1.2 to 192.168.1.62
192.168.1.63 will be the broadcast address (remember to reserve the first and last address for the Network and Broadcast)
HQ Network Mask 255.255.255.192  - we got the 192 by adding the bit value from the left to the value we borrowed = 128+64=192
HQ address will look like this 192.168.1.0 /26
 
 
RO1 = 30 hosts
We are borrowing 3 bits with value of 32; this again is the closest we can get to the number of host needed.
RO1 address will start from 192.168.1.64 -  Network address
Now we add the 32 to the 64 we borrowed earlier = 32+64 = 96
RO1 = 192.168.1.65 Gateway address
192.168.1.66 - First usable IP address
192.168.1.94 - Last usable IP address
192.168.1.95 Broadcast address – total address space – 192.168.1.66 –192.168.1. 94
Network Mask 255.255.255.224 I.e. 128+64+32=224 or  192.168.1.64/27
 
 
RO2 = 192.168.1.96 Network address
We borrow 4 bits with the value of 16. That’s the closest we can go.
96+16= 112
So, 192.168.1.97- Gateway address
192.168.1.98 - First usable address
192.168.1.110 - Last usable address
192.168.1.111 broadcast
Total host address space – 192.168.1.98 to 192.168.1.110
Network Mask 255.255.255.240 or 192.168.1.96 /28
 
WAN links = we are borrowing 6 bit with value of 4
=112 + 4 =116
WAN links from HQ to RO1 Network address will be 192.168.1.112 /30 :
HQ se0/0 = 192.168.1.113
RO1 se0/0= 192.168.1.114
Mask for both links=  255.255.255.252 ( we got 252 by adding the bits value we borrowed i.e
124 +64 +32 +16+ 8 +4=252
 
WAN Link 2= 112+4=116
WAN Link from HQ to RO2 Network address = 192.168.1.116 /30
HQ = 192.168.1.117   subnet mask  255.255.255.252
RO2 = 192.168.1.118  Subnet mask 255.255.255.252
 
Subnet Prefix / CIDR
Subnet mask
Usable IP address/hosts
Usable IP addresses + Network and Broadcast address
/26
255.255.255.192
62
64
/27
255.255.255.224
30
32
/28
255.255.255.240
14
16
/29
255.255.255.248
6
8
/30
255.255.255.252
2
4
 
 
 
 
 
 
 
 
 
 
As I mentioned earlier, having this table will prove very helpful. For example, if you have a subnet with 50 hosts then you can easily see from the table that you will need a block size of 64. For a subnet of 30 hosts you will need a block size of 32.
 

IPconfig

This is a Microsoft Windows NT, 2000 command. It is very useful in determining what could be wrong with a network. This command when used with the /all switch, reveal enormous amounts of troubleshooting information within the system.Windows 2000 IP Configuration.

Host Name . . . . . . . . . . . . : chowder

Primary DNS Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Broadcast

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : NoConnection-specific DNS Suffix . :

Description . . . . . . . . . . . :

WAN (PPP/SLIP) Interface

Physical Address. . . . . . . . . : 00-53-45-00-00-00

DHCP Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 12.90.108.123

Subnet Mask . . . . . . . . . . . : 255.255.255.255

Default Gateway . . . . . . . . . : 12.90.108.125

DNS Servers . . . . . . . . . . . : 12.102.244.2

204.127.129.2

NETSTAT

NETSTAT is used to look up the various active connections within a computer. It is helpful to understand what computers or networks you are connected to. This allows you to further investigate problems. One host may be responding well but another may be less responsive.

NSLOOKUP

NSLOOKUP is an application that facilitates looking up hostnames on the network. It can reveal the IP address of a host or, using the IP address, return the host name.It is very important when troubleshooting problems on a network that you can verify the components of the networking process. Nslookup allows this by revealing details within the infrastructure.

Examining your Network with Commands

Ping


PING is used to check for a response from another computer on the network. It can tell you a great deal of information about the status of the network and the computers you are communicating with.Ping returns different responses depending on the computer in question. The responses are similar depending on the options used.Ping uses IP to request a response from the host. It does not use TCP.It takes its name from a submarine sonar search - you send a short sound burst and listen for an echo - a ping - coming back.In an IP network, `ping' sends a short data burst - a single packet - and listens for a single packet in reply. Since this tests the most basic function of an IP network (delivery of single packet), it's easy to see how you can learn a lot from some `pings'.To stop ping, type control-c. This terminates the program and prints out a nice summary of the number of packets transmitted, the number received, and the percentage of packets lost, plus the minimum, average, and maximum round-trip times of the packets.



Sample ping session

PING localhost (127.0.0.1): 56 data bytes64 bytes

from 127.0.0.1: icmp_seq=0 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=5 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=6 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=7 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=8 ttl=255 time=2 ms

64 bytes from 127.0.0.1: icmp_seq=9 ttl=255 time=2 ms

localhost ping statistics

10 packets transmitted, 10 packets received, 0% packet lossround-trip min/avg/max = 2/2/2 msmeikro$

The Time To Live (TTL) field can be interesting. The main purpose of this is so that a packet doesn't live forever on the network and will eventually die when it is deemed "lost." But for us, it provides additional information. We can use the TTL to determine approximately how many router hops the packet has gone through. In this case it's 255 minus N hops, where N is the TTL of the returning Echo Replies. If the TTL field varies in successive pings, it could indicate that the successive reply packets are going via different routes, which isn't a great thing.The time field is an indication of the round-trip time to get a packet to the remote host. The reply is measured in milliseconds. In general, it's best if round-trip times are under 200 milliseconds. The time it takes a packet to reach its destination is called latency. If you see a large variance in the round-trip times (which is called "jitter"), you are going to see poor performance talking to the host.

Default Subnet masks

Class A - 255.0.0.0 - 11111111.00000000.00000000.00000000


Class B - 255.255.0.0 - 11111111.11111111.00000000.00000000

Class C - 255.255.255.0 - 11111111.11111111.11111111.00000000

CIDR -- Classless InterDomain Routing.CIDR was invented several years ago to keep the internet from running out of IP addresses. The "classful" system of allocating IP addresses can be very wasteful; anyone who could reasonably show a need for more that 254 host addresses was given a Class B address block of 65533 host addresses. Even more wasteful were companies and organizations that were allocated Class A address blocks, which contain over 16 Million host addresses! Only a tiny percentage of the allocated Class A and Class B address space has ever been actually assigned to a host computer on the Internet.People realized that addresses could be conserved if the class system was eliminated. By accurately allocating only the amount of address space that was actually needed, the address space crisis could be avoided for many years. This was first proposed in 1992 as a scheme called Supernetting.The use of a CIDR notated address is the same as for a Classful address. Classful addresses can easily be written in CIDR notation (Class A = /8, Class B = /16, and Class C = /24)It is currently almost impossible for an individual or company to be allocated their own IP address blocks. You will simply be told to get them from your ISP. The reason for this is the ever-growing size of the internet routing table. Just 5 years ago, there were less than 5000 network routes in the entire Internet. Today, there are over 90,000. Using CIDR, the biggest ISPs are allocated large chunks of address space (usually with a subnet mask of /19 or even smaller); the ISP's customers (often other, smaller ISPs) are then allocated networks from the big ISP's pool. That way, all the big ISP's customers (and their customers, and so on) are accessible via 1 network route on the Internet.It is expected that CIDR will keep the Internet happily in IP addresses for the next few years at least. After that, IPv6, with 128 bit addresses, will be needed. Under IPv6, even sloppy address allocation would comfortably allow a billion unique IP addresses for every person on earth.

Subnet Masking

Subnet Masking




Applying a subnet mask to an IP address allows you to identify the network and node parts of the address. The network bits are represented by the 1s in the mask, and the node bits are represented by the 0s. Performing a bitwise logical AND operation between the IP address and the subnet mask results in the Network Address or Number.

For example, using our test IP address and the default Class B subnet mask, we get:

10001100.10110011.11110000.11001000 140.179.240.200 Class B IP Address

11111111.11111111.00000000.00000000 255.255.000.000 Default Class B Subnet Mask

10001100.10110011.00000000.00000000 140.179.000.000 Network Address