I thought I had subnetting

DyasisDyasis Member Posts: 97 ■■□□□□□□□□
OK, so I know I can do sub-netting as far as if you ask me to give you a sub-net with 30 host or 60 networks, I understand that part.

But I just did some practice from my other post about website for sub-net's and they ask questions like:

"Enter the last valid host on the network 10.205.149.0 255.255.255.240"

So I came up with the sub-net of 11111111.11111111.11111111.11110000 \28 the last 1 in the 4th octet shows me its a 16 increment range.

however, I guess since I've been studying for a very long time this weekend, I'm not sure how they came up with the answer. (which I won't post in case someone else is doing this or wondering... yet)

I just need some little guidance ...

Comments

  • IvanjamIvanjam Member Posts: 978 ■■■■□□□□□□
    You are correct that the increment is 16, so the first two subnets are 10.205.149.0 and 10.205.149.16. This means that the address range for the first subnet is 10.205.149.0 - 10.205.149.15 with 10.205.149.0 being the subnet itself and 10.205.149.15 - its broadcast address, so the last valid host is?

    To get the increment in dotted decimal notation, I usually just subtract the last non-255 value from 256, i.e., 256-240=16.
    Fall 2014: Start MA in Mathematics [X]
    Fall 2016: Start PhD in Mathematics [X]
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    omg... yeah, that flew right over my head lol thanks.... I have to remember to keep it simple!!!
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    Don't worry. With practice it all starts to make sense.

    You're studying for the Net+, right? Make sure you focus on accuracy rather than speed and shortcuts. Make sure you understand how to arrive at the correct answers all the time, even if it takes you 2 or 3 or even 5 minutes.

    If you have any further difficulties, feel free to address them here.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    Yeah, going for my net+ :D

    Since you asked... lol

    May I bug you for this, this is about the only thing I am really having an issue with...

    from the subnetting.net site, they list this:

    "Let's quickly go through one more: Enter the last valid host on the network that the host 172.30.118.230/23 is a part of:

    Step 1. Convert the shorthand subnet mask to decimal.

    /23 = 255.255. + Seven additional subnet bits.
    Go to your **** sheet, start at the bottom (12icon_cool.gif and count up seven, starting with 128. You should get to 254.
    Thus, our decimal subnet mask is 255.255.254.0.
    Step 2. Determine the block size.

    The block size is listed in the block size column parallel to your decimal mask.
    The block size is 2.
    Step 3. What is my Network ID?

    Since we are working in the third octet and the block size is 2, the first network is 172.30.118.0. (2 * 59 = 11icon_cool.gif. We are simply looking for the largest multiple of the block size without going over the given octet number (11icon_cool.gif.
    Step 4. What is the next Network ID?

    Again, we look at our block size of 2 to determine the next network is 172.30.120.0 (118 + 2).
    Network ID (First IP in the subnet): 172.30.118.0
    Broadcast address (last IP in the subnet): 172.30.119.255
    First Usable IP (the address after the network ID): 172.30.118.1
    Last Usable IP (the address before the broadcast address): 172.30.119.254 (This is the answer to the specific question that was asked.)"


    What im having trouble with getting into my head is, why does the range go from 172.30.118 - 172.30.119 ? why does it not stop in the .118 or even why does it not go to .120, .121, .122 etc...? Is it because the block size is 2?
  • IvanjamIvanjam Member Posts: 978 ■■■■□□□□□□
    @Dyasis - IP addresses are made up of 4 groups of 8-bit numbers (octets) - the first octet has 8 bits, the first plus second - 16, the first plus second plus third - 24, etc. The notation /23 means 23 bits have been used in the host portion, that means there is one bit short (24-23=1) to complete the third octet. That means the increment (block size) is 2^1=2 in the third octet. So the subnets are 172.30.0.0, 172.30.2.0, 172.30.4.0,...,172.30.118.0, 172.30.120.0,...

    the address we are given is 172.30.118.230/23, which falls in the 172.30.118.0 subnet. Addresses in this subnet go from 172.30.118.0 (the subnet itself) to 172.30.119.255 (the broadcast address). So the first and last valid hosts are?

    Using the decimal subnet mask of 255.255.254.0, what is the first non-255 value? It is 254; subtracting 254 from 256 yields 2, which is our increment or block size (in the third octet).
    Fall 2014: Start MA in Mathematics [X]
    Fall 2016: Start PhD in Mathematics [X]
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    Dyasis wrote: »
    May I bug you for this, this is about the only thing I am really having an issue with...
    ...

    Is it because the block size is 2?

    Yes. It is because the block size is 2.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    OK, Thank you both, everything seems to be clicking now!
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    In a day or 2 you'd be surprised how easy it's gotten. Just keep at it; it'll all sink in.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    OK, so I am getting better, however, I think this is the last issue I'm having trouble with understanding (yeah right! lol)
    Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 172.20.0.0/27

    So The mask is: 11111111.11111111.11111111.11100000

    The last network bit tells me it's 32bit

    The host is 5 0's which tells me its 2 power 5 which is 32 so we have 30 usable hosts.

    The total valid subnet's is where I'm struggling, I am not sure how you come up with 2048

    Can anyone show me how to come up with the networks... thanks!
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    It's possible that question type may be above Network+ level. But that's a good thing!

    I don't think I'd do a great job at explaining, so I won't try. Instead, I'll try to point you towards the right direction.

    172.20.0.0 is a class B network. When you use the the /27 subnet mask, you are borrowing host bits and converting them to subnet bits.

    In a similar fashion to how you would find out how many hosts are on each subnet by counting the remaining host bits, you can find out how many subnets there are by counting the borrowed subnet bits.

    Let me know if you understand how to arrive at the correct answer now. (If not, I'll explain further.)
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    Btw, it's GREAT that you are learning the correct way and using binary numbers. Honestly, for the Net+ you should continue to work thru your problems that way. Esp when youre starting out it's easier and a LOT more accurate.

    At the same time, try to explore a bit on how the binary values correlate to the decimal values. There's a definite pattern. Understanding both sides well will simply help you as you progress.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • IvanjamIvanjam Member Posts: 978 ■■■■□□□□□□
    @Dyasis - the network you are given is 172.20.0.0/27. This is a Class B network with a default mask of /16. This means that all the bits after that, and up to the 27th bit, can be used as as the subnet portion of the address. The number of bits to be used for the subnets is 27-16=11 (remember these are bits!). To get the number of subnets, we just find two to the power of 11 (2^11) =2048 subnets.

    To get the number of possible host addresses we find the number of bits remaining after the 27th bit (the host portion of the address). Recall that an IP address is 32 bits long, so for the host portion we get 32-27=5 bits. To find the number of possible host addresses, we raise 2 to the power 5 (2^5) = 32. However, as always, the first address in each range will be used for the network itself, and the last one as the broadcast address. So we must always subtract 2 from the number of possible hosts to get the number of valid hosts (32-2=30).
    Fall 2014: Start MA in Mathematics [X]
    Fall 2016: Start PhD in Mathematics [X]
  • IvanjamIvanjam Member Posts: 978 ■■■■□□□□□□
    In bit notation, the mask as you have correctly determined is: 11111111.11111111.11111111.11100000. The default mask for a Class B address is /16 or 11111111.11111111.00000000.00000000. The number of bits available for subnets is the difference between the given mask and the default mask: 00000000.00000000.11111111.11100000 which is 11 bits....
    Fall 2014: Start MA in Mathematics [X]
    Fall 2016: Start PhD in Mathematics [X]
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    Yeah, after looking around I noticed that I was not paying attention to the IP being class B. So then I saw that if its B, I have to use the 3rd octet which as you said would = 11 bits, then 2^11 = 2048!!

    Again, thanks to both of you, it's really nice to see people "higher" up helping us newbies lol
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    OK, so I just tried a new one and sort of got it! lol
    Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 172.25.0.0/22

    I came up with 62 Subnets and 1022 Hosts

    the Subnets was wrong, which should have been 64... which I had, however, I got confused when it said VALID subnets, so I -2 of them lol

    Is that because it was a 0 subnet and you don't -2 on those?
  • IvanjamIvanjam Member Posts: 978 ■■■■□□□□□□
    @Dyasis - all possible subnets are valid subnets. You subtract 2 from the number of possible hosts to get the number of valid hosts because the first host address is always used as the network address and the last as the broadcast address are are therefore excluded from the list of valid hosts.
    Fall 2014: Start MA in Mathematics [X]
    Fall 2016: Start PhD in Mathematics [X]
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    Ivanjam wrote: »
    @Dyasis - all possible subnets are valid subnets. You subtract 2 from the number of possible hosts to get the number of valid hosts because the first host address is always used as the network address and the last as the broadcast address are are therefore excluded from the list of valid hosts.

    Ok, gotcha, thanks!
  • DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    0 subnets and broadcast subnets not being usable is supposedly an ancient Cisco thing - something that isn't used anymore but is still required knowledge for the Cisco exams.

    To keep from being confused, skip any problems that mention anything about "ip subnet zero." You won't get anything like that on the Network+.. and a large possibility you won't even get it on a Cisco exam. lol
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    Ok, thanks for that info, I won't worry about that then for net+
Sign In or Register to comment.