Vlsm help

FlexinFlexin Member Posts: 3 ■□□□□□□□□□
Hi guys,

I have been studying for about 6 months now and am have trouble understanding vlsm subnet masks. I understand you can create diffrent subnet host ranges by using diffrent subnet masks, but how does the router know where these subnets start and stop if they are all a diffrent size.

So for instance on on the network 192.168.1.0/24

if i was to split this network using VLSM say the first subnet was a block size of 64, and the second was block size 4, etc, etc how does the network know that the second subnet starts at 192.168.1.64, how does it know that the first subnet is a 64 and not a 4 or 32.

sorry if this is a stupid question or if havn't made too much sense i've been trying to wrap my head round this and it isn't making any sense to me.

Many thanks

John

Comments

  • spaatspaat Member Posts: 39 ■■■□□□□□□□
    If you're having difficulties at this point, then I think you need to start back at the beginning of subnetting, understanding binary conversion, and ANDing.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Flexin wrote:
    So for instance on on the network 192.168.1.0/24

    if i was to split this network using VLSM say the first subnet was a block size of 64, and the second was block size 4, etc, etc how does the network know that the second subnet starts at 192.168.1.64, how does it know that the first subnet is a 64 and not a 4 or 32.
    The combination of the IP address and the subnet mask is what conveys that information.

    So for your example...

    The first set of addresses would be:
    Network address: 192.168.1.0
    Valid host addresses: 192.168.1.1 to 192.168.1.62
    Broadcast address: 192.168.1.63
    Subnet mask: 255.255.255.192 (or /26)

    The next set:
    Network address: 192.168.1.64
    Valid host addresses: 192.168.1.65 to 192.168.1.66
    Broadcast address: 192.168.1.67
    Subnet mask: 255.255.255.252 (or /30)

    When you're using VLSM because it's not obvious by the class as to what the appropriate subnet mask to use is, you should always specify it, hence what they call CIDR notation. So (again back to your example) if I told you my IP address was 192.168.1.32/26 you would know (or be able to calculate) the network and broadcast addresses of my subnet.

    Does that make sense?
  • miller811miller811 Member Posts: 897
    Flexin wrote: »
    Hi guys,

    I have been studying for about 6 months now and am have trouble understanding vlsm subnet masks. I understand you can create diffrent subnet host ranges by using diffrent subnet masks, but how does the router know where these subnets start and stop if they are all a diffrent size.

    So for instance on on the network 192.168.1.0/24

    if i was to split this network using VLSM say the first subnet was a block size of 64, and the second was block size 4, etc, etc how does the network know that the second subnet starts at 192.168.1.64, how does it know that the first subnet is a 64 and not a 4 or 32.

    sorry if this is a stupid question or if havn't made too much sense i've been trying to wrap my head round this and it isn't making any sense to me.

    Many thanks

    John

    The routers routing table will route the data to the specific destination, based on the network and mask when using classless routing.
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • FlexinFlexin Member Posts: 3 ■□□□□□□□□□
    ok i get how to calculate subnets based on masks or cidr notations and how binary conversions work.

    but what i dont understand is if i was to split a network into three parts of diffrent sizes say 64,32 and 4 my broadcast address, host ranges and subnet numbers would change by chaning the order of the subnets.

    so for instance my host ranges would be one thing if the subnets were ordered 64,32,4

    and comletely diffrent if they were ordered 32,64,4.

    and diffrent again if it was 4,32,64

    how does the router know this informationand how does the host know what it's broadcast address would be if it changes based on the order of the subnets.

    is ther something really obvious i missing here????icon_scratch.gif
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Flexin wrote: »
    and comletely diffrent if they were ordered 32,64,4.

    and diffrent again if it was 4,32,64

    how does the router know this informationand how does the host know what it's broadcast address would be if it changes based on the order of the subnets.

    is ther something really obvious i missing here????
    Because the subnet mask for each subnet is different. The ip address and mask tells every device the boundaries of a subnet.

    If I gave you the address 192.168.1.127/28 can you tell me the network address and the broadcast and every available host address? Of course because the combination tells you all that - the same way it would tell a router where the subnet boundaries are.
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    Flexin wrote: »
    how does the router know this information and how does the host know what it's broadcast address would be if it changes based on the order of the subnets.
    Um.... because the order of the subnets usually doesn't randomly change on it's own. You pick an order, apply it to the interfaces/networks, and stick with it.

    Just like you can (or should) be able to figure out IP Addresses and IP Addressing schemes using IP Address ranges and subnets, so can the router. You're the one usually picking interfaces and assigning it an address and giving it the subnet mask -- and based on that information the router knows it's network and broadcast addrsss for the network attached to that interface and can recognize valid host/device ip addresses in that range.

    If you decide to change the order of each subnet and change networks between interfaces each and every day, then you need to change/move the hosts on the attached networks to match (or use DHCP).

    If you change an interface on a router attached to a network with 62 host/device addresses and give it a subnet mask that only allows 30 hosts/devices on the network, that's between you and all the irate users on that network. The router doesn't care and will happily chat with any of the other 29 devices on that network that have valid IP address within its subnet range.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • FlexinFlexin Member Posts: 3 ■□□□□□□□□□
    ok guys,

    sorry if this seems to be going over my head but i neeeeed to understand.

    Ok let's take the 192.168.1.0 network again.

    IP address of a host of 192.168.1.32/26

    ok if the /26 mask was the only subnet assigned i would (hopefully) be right in saying that this would be the subnet info.

    192.168.1.0 : network address
    192.168.1.1-62 : Valid hosts
    192.168.1.63 : Broadcast address

    now if i was to add antother small network to the front of this say a block size 4 network infront of this network

    so the first network would be

    192.168.1.0 : network address
    192.168.1.1-2 : Valid hosts
    192.168.1.3 : Brodcast address

    second network

    192.168.1.4 : Network address
    192.168.1.5-67 : Valid hosts
    192.168.1.68 Broadcast address

    so the ip address that i started with (192.168.1.32/26) is still the same so it's still in the same network but it's broadcast and host range has been shifted by the 4 block network and there is nothing in the mask that i can see that would tell a router or the hosts themselves that that 4 block network exists.

    the math stacks up the way i see it i know it's gonna be something simple and i'm gonna go icon_redface.gif as soon as it hits me.

    I hope you guys can be patient with me.

    Many thanks
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    Flexin wrote: »
    sorry if this seems to be going over my head but i neeeeed to understand.
    Oh, I guess we could stress that certain size subnet can only start on certain IP address -- and the subnets can't overlap.

    If you you have a network 192.168.100.0 and a subnet mask of 255.255.255.0 and you boss tells you split it up and create 3 subnets, 1 with 62 hosts, 1 with 30 hosts, and one with 14 hosts.... you can't just can't pick any starting network address you want.

    If you split up 192.168.100.0 into chunks of 64 with a 255.255.255.192 subnet mask, valid network address are
    192.168.100.0
    192.168.100.64
    192.168.100.128
    192.168.100.192

    If you split up 192.168.100.0 into chunks of 32 with a 255.255.255.224 subnetmask, valid network addresses are
    192.168.100.0
    192.168.100.32
    192.168.100.64
    192.168.100.96
    192.168.100.128
    192.168.100.160
    192.168.100.192
    192.168.100.224

    etc....

    If you assign the first network for 30 hosts the 192.168.100.0 address (with the 255.255.255.192 subnet mask) -- you CANNOT then assign the 62 host network the starting address of 192.168.100.32!!!

    Since the address spaces cannot overlap, your choices for the network with 64 hosts has to be either 192.168.100.64, 192.16.100.128, or 192.168.100.192. You have no other option. You CANNOT grab the 192.168.100.32 and 192.168.100.64 30 host networks and "put them together" to get the 62 host network. 192.168.100.32 is NOT A VALID BOUNDARY for a subnet with 62 hosts.

    The 192.168.100.32 network with the 255.255.255.224 subnet is now a UNUSED GAP in your network address space -- but you can either stuff another 30 host network there someday, or split it in two parts now and use one of them for that 14 host network your boss wanted you to create.

    If you assign the largest network first and work down to the smallest, you can usually "pack the addresses in tighter" and make more efficient use of your network address space.

    EDIT: Anyone can feel free to point out any typo's :D
    :mike: Cisco Certifications -- Collect the Entire Set!
  • miller811miller811 Member Posts: 897
    mikej412 wrote: »
    If you split up 192.168.100.0 into chunks of 64 with a 266.266.266.192 subnet mask, valid network address are
    EDIT: Anyone can feel free to point out any typo's :D

    I really enjoy working with the 266.266.266.192 subnet maskicon_redface.gif
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    miller811 wrote: »
    I really enjoy working with the 266.266.266.192 subnet maskicon_redface.gif
    That was a popular typo -- I corrected 2 out of 3 :D Hopefully there's just that one left. icon_lol.gif

    Ah -- I searched the page for 266, and that looks like the only one I had missed. That typo is fixed now.
    :mike: Cisco Certifications -- Collect the Entire Set!
Sign In or Register to comment.