Unconfigured Ad Widget

Collapse

Need help with subnetting....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Booshanky
    In Memoriam
    • Dec 2007
    • 7822

    Need help with subnetting....

    Hey fellas,

    I've been taking these cisco CCNA courses and I ended up skipping a few. Now I'm being asked to subnet an IP range and I'm kinda lost.

    I've been given the IP 192.168.9.0/24 and I've been asked to subnet that so that I can get blocks of 10 IP's for 4 different branch locations and 20 for the HQ.

    And of course, IP's to link the routers of each branch.

    Any idea how to do that? I thought that when you have different branches there you had to have different IP's too. Like, the HQ would be on the 192.168.1.x range, another branch would be on the 192.168.2.x range, etc. But it seems like they want me to stick with 192.168.9.x

    I've got a PDF with the lab here if anyone wants to look at it. Any help would be super awesome.
    "Please use the comments to demonstrate your own ignorance, unfamiliarity with empirical data, ability to repeat discredited memes, and lack of respect for scientific knowledge. Also, be sure to create straw men and argue against things I have neither said nor even implied. Any irrelevancies you can mention will also be appreciated. Lastly, kindly forgo all civility in your discourse . . you are, after all, anonymous."
    -Barry Ritholtz


    Help be a better advocate for the 2nd Amendment here.
  • #2
    nick
    CGN/CGSSA Contributor
    CGN Contributor
    • Aug 2008
    • 19151

    You might want to take a look at subnetting. What you're describing is using straight Class C IPs. Now, what makes the ranges you mentioned different is their subnet masks, which, I presume, is 255.255.255.0, or /24. If you look at the binary representation of the /24 subnet mask, it's 11111111.11111111.11111111.00000000. The 1s show you the network portion of the IP, the 0s in the subnet mask show you the host portion. If you borrow a few of those 0s, you can carve out subnets out of a given network, with fewer IPs in each. Alternatively, you can supernet, in which case you borrow some 1s in the subnet mask and create a larger network. For example, 192.168.0.0/23 would actually utilize the 192.168.0.0-192.168.1.255 IP range.

    IN your specific example, if it's ok to waste hosts, you'd use /27 subnet mask (255.255.255.224), which would give you 6 usable subnets with up to 30 host IPs in each. You can also use IP subnet zero on a Cisco router, in which case you can use the first subnet, as well (normally you can't use the first and last subnet when you subnet an IP range).

    If you use a variable length subnet mask for your exercise, then you can use /27 for the HQ and /28 for the branches (just make sure they don't overlap), thus giving you 30 IPs for HQ and 14 IPs for the branches).

    Here's a tutorial on subnetting: http://www.ralphb.net/IPSubnet/

    You better catch up on subnetting, for it'll be used heavily in your exam.

    Let me know if you have any questions after going through the tutorial.
    DiaHero Foundation - helping people manage diabetes. Sending diabetes supplies to Ukraine now, any help is appreciated.

    DDR AK furniture and Norinco M14 parts kit: https://www.calguns.net/calgunforum/....php?t=1756292
    sigpic

    Comment

    • #3
      Booshanky
      In Memoriam
      • Dec 2007
      • 7822

      I've been reading a lot about subnetting, but I'm just lost. Mostly because I learn by seeing the answers and learning backward most of the time.

      In this specific example, what would the IP's be if you subnetting that 192.168.9.0/24 network? Like, would I have 192.168.9.1-11 for one group, 12-21 for the next, etc?
      "Please use the comments to demonstrate your own ignorance, unfamiliarity with empirical data, ability to repeat discredited memes, and lack of respect for scientific knowledge. Also, be sure to create straw men and argue against things I have neither said nor even implied. Any irrelevancies you can mention will also be appreciated. Lastly, kindly forgo all civility in your discourse . . you are, after all, anonymous."
      -Barry Ritholtz


      Help be a better advocate for the 2nd Amendment here.

      Comment

      • #4
        lazyworm
        Senior Member
        • Jan 2006
        • 1642

        Nick is correct.

        Another way to look at this is to realize this is all base-2 math
        based on a 32-bit IP. So...

        /30 = 32-30 = 2 bits for host = 2^2 = 4 Ips
        /29 = 3 bits = 8 IPs = 2 * /30
        /28 = 16 IPs = 2 * /29 = 4 * /30
        /27 = 32 IPs etc
        /26 = 64 IPs etc
        /25 = 128 IPs etc
        /24 = 256 IPs

        minus the first and the last, that's your usable IPs.

        If you have this table handy, you can easily see you'd need minimum
        a /27 for HQ and /28 for branch. You can also easily count
        that you DO have enough blocks do complete this exercise.

        Comment

        • #5
          lazyworm
          Senior Member
          • Jan 2006
          • 1642

          Originally posted by Booshanky
          I've been reading a lot about subnetting, but I'm just lost. Mostly because I learn by seeing the answers and learning backward most of the time.

          In this specific example, what would the IP's be if you subnetting that 192.168.9.0/24 network? Like, would I have 192.168.9.1-11 for one group, 12-21 for the next, etc?
          As I just posted, this is all base-2 math. So all the "group" cut-offs have
          to be on a bit boundary.

          Comment

          • #6
            KI6RYC
            Junior Member
            • Oct 2009
            • 54

            Not that it matters in this example, but don't forget about the gateway IP in each subnet.... it consumes another IP and is needed for the different networks to route to each other.

            Comment

            • #7
              Booshanky
              In Memoriam
              • Dec 2007
              • 7822

              Ok, this page really helped a lot.

              Here's what I'm wondering though.

              Code:
              [I]Subnet bits 	Network Number 	Node Addresses 	Broadcast Address
              0000 	           200.133.175.0 	Reserved 	        None
              0001 	           200.133.175.16 	.17 thru .30 	200.133.175.31
              0010 	           200.133.175.32 	.33 thru .46 	200.133.175.47 [/I]

              Ok, so what I'm wondering is how this looks in practice. Here's what I'm guessing, and let me know if I'm goofing this up.

              With the subnet bit of 0001, that would make the subnet mask for that range of ip's 255.255.255.16. The range of IP's would be 200.133.175.17-30 and those are the IP's that I could assign to hosts on the network.

              I'm confused about the "network number" and "broadcast address". Is the network number the same as the "gateway" IP? Like, the one that I'd assign to the router attached to that network? And what's the broadcast address then?

              I'm just trying to piece this together into what it would look like in the real world.

              Thanks guys. This is a huge help.
              "Please use the comments to demonstrate your own ignorance, unfamiliarity with empirical data, ability to repeat discredited memes, and lack of respect for scientific knowledge. Also, be sure to create straw men and argue against things I have neither said nor even implied. Any irrelevancies you can mention will also be appreciated. Lastly, kindly forgo all civility in your discourse . . you are, after all, anonymous."
              -Barry Ritholtz


              Help be a better advocate for the 2nd Amendment here.

              Comment

              • #8
                choprzrul
                Calguns Addict
                • Oct 2009
                • 6549

                Download, install, and play with SolarWinds Subnet Calculator. It helped me to understand subnetting, along with several good instructors. Here is the link: http://www.solarwinds.com/register/r...0150000000CcHV

                Comment

                • #9
                  Bug Splat
                  Calguns Addict
                  • Dec 2007
                  • 6561

                  I never understood why people wanted to split up a Class-C (254 ip's) on a private network. It makes no sense at all. You have millions of private IP's to work with so why restrict yourself? At my company we have 6 locations throughout Cali and at most we have 25 network devices at each location. I just set them up as 192.168.1.X, 192.168.2.x, 192.168.3.x and so one so each location has its own Class-C. We use Cisco ASA's to hardware VPN all the location to our main office and we have had zero problem with it.

                  Now, Subneting using Public IPs is a different story and is a must to keep users separated. I used to know how to break them down and calculate everything but 12 years in I just google it if I don't know it off hand. Here is a chart I use.



                  AND...

                  Last edited by Bug Splat; 11-09-2009, 11:34 AM.

                  Comment

                  • #10
                    lazyworm
                    Senior Member
                    • Jan 2006
                    • 1642

                    Originally posted by Booshanky
                    I'm confused about the "network number" and "broadcast address". Is the network number the same as the "gateway" IP? Like, the one that I'd assign to the router attached to that network? And what's the broadcast address then?
                    First IP of the block, regardless of size, is the network number.
                    Last IP of the block, is the broadcast address.
                    Gateway IP is the IP of the router of the block, it can be any one
                    of the assignable IPs. Which one to use is usually based on local/site
                    convention and is not fixed.

                    Comment

                    • #11
                      Booshanky
                      In Memoriam
                      • Dec 2007
                      • 7822

                      I guess that's what's confusing to me about this. All this stuff seems to be so arbitrary, and because of that you can get it working a thousand different ways. But I'm using this cisco packet tracer program to train on and I've spent all morning working on this network with only 57% completion rate on my task.

                      I'm guessing it's because I assigned the "wrong" ip's to the hosts or something. Meanwhile I've actually got it set up and it's working great. I can ping all the other hosts in the network and everything seems to be working well.

                      If anyone has packet tracer, would you mind taking a look at my work? I can e-mail you a .pka file with my work in it.
                      "Please use the comments to demonstrate your own ignorance, unfamiliarity with empirical data, ability to repeat discredited memes, and lack of respect for scientific knowledge. Also, be sure to create straw men and argue against things I have neither said nor even implied. Any irrelevancies you can mention will also be appreciated. Lastly, kindly forgo all civility in your discourse . . you are, after all, anonymous."
                      -Barry Ritholtz


                      Help be a better advocate for the 2nd Amendment here.

                      Comment

                      • #12
                        nick
                        CGN/CGSSA Contributor
                        CGN Contributor
                        • Aug 2008
                        • 19151

                        Originally posted by Booshanky
                        Ok, this page really helped a lot.

                        Here's what I'm wondering though.

                        Code:
                        [I]Subnet bits 	Network Number 	Node Addresses 	Broadcast Address
                        0000 	           200.133.175.0 	Reserved 	        None
                        0001 	           200.133.175.16 	.17 thru .30 	200.133.175.31
                        0010 	           200.133.175.32 	.33 thru .46 	200.133.175.47 [/I]

                        Ok, so what I'm wondering is how this looks in practice. Here's what I'm guessing, and let me know if I'm goofing this up.

                        With the subnet bit of 0001, that would make the subnet mask for that range of ip's 255.255.255.16. The range of IP's would be 200.133.175.17-30 and those are the IP's that I could assign to hosts on the network.

                        I'm confused about the "network number" and "broadcast address". Is the network number the same as the "gateway" IP? Like, the one that I'd assign to the router attached to that network? And what's the broadcast address then?

                        I'm just trying to piece this together into what it would look like in the real world.

                        Thanks guys. This is a huge help.
                        The subnet bits they give you are for identifying the specific subnet (IPs with this bit belong to this subnet). They don't change the subnet mask. The subnet mask will remain the same for all subnets of the same size. In your example, it'll be 255.255.255.240.

                        Network number/network address refers to the first IP in your subnet, which describes the subnet (this is the IP you use as network ID for routing, together with the appropriate subnet mask, of course). For example, if you want your routers to reach 200.133.175.16/28 network through some gateway (the next hop router with the IP of, say, 192.168.24.254), you'll do it like this (provided you create a static route for it):

                        ip route 200.133.175.16 255.255.255.240 192.168.24.254 0

                        So you specify the network you want to reach (200.133.175.16 255.255.255.240) and the gateway to reach it through (192.168.24.254). The last portion is the metric, which you don't have to specify. It shows the precedence of the route you've created (if you have two routes to the same network, the one with lower metric will be used, if it's accessible).

                        Broadcast address is the last IP of the subnet. It's used to broadcast to the entire subnet.

                        A gateway can be any IP in the subnet that you assign to the router(s) in that subnet. Basically, you specify which local (to the subnet) IP to route packets to when you want to send those packets to a specific network outside of your subnet. You can have more than one gateway.
                        DiaHero Foundation - helping people manage diabetes. Sending diabetes supplies to Ukraine now, any help is appreciated.

                        DDR AK furniture and Norinco M14 parts kit: https://www.calguns.net/calgunforum/....php?t=1756292
                        sigpic

                        Comment

                        • #13
                          command_liner
                          Senior Member
                          • May 2009
                          • 1186

                          Originally posted by Booshanky
                          I guess that's what's confusing to me about this. All this stuff seems to be so arbitrary, and because of that you can get it working a thousand different ways. But I'm using this cisco packet tracer program to train on and I've spent all morning working on this network with only 57% completion rate on my task.

                          I'm guessing it's because I assigned the "wrong" ip's to the hosts or something. Meanwhile I've actually got it set up and it's working great. I can ping all the other hosts in the network and everything seems to be working well.

                          If anyone has packet tracer, would you mind taking a look at my work? I can e-mail you a .pka file with my work in it.
                          It is really easy if you just work in integral logarithms in base2.
                          Is log2(10) an integer? No. So you need to round the log up to
                          the nearest integer. The invert the log to find the number of
                          unique IP addresses that can be assigned in that block.

                          If you try and think in base 10 it is really hard. In base 2 it is
                          really obvious. Just remember integer logs in base 2. All else
                          becomes easy.
                          What about the 19th? Can the Commerce Clause be used to make it illegal for voting women to buy shoes from another state?

                          Comment

                          • #14
                            fd15k
                            Senior Member
                            • Mar 2008
                            • 1049

                            Make it simple. Given /24, split it into 4 even blocks of /26. So if you started with 192.168.1.0-192.168.1.255, your 4 blocks will look like this :
                            192.168.1.0-192.168.1.63
                            192.168.1.64-192.168.1.127
                            192.168.1.128-192.168.191.
                            192.168.1.192-192.168.1.255.

                            Like people mentioned, first and last IP addresses aren't usable - network
                            and broadcast respectfully. Also, like somebody said, come up with a convention for yourself, for example "1st IP is gateway". So your gateways could be 192.168.1.1, 192.168.1.65, 192.168.1.129 and 192.168.1.193.

                            As for packet tracer, make a screenshot and post it here. If physical segments
                            and network assignments are visible, it should be easy to tell why your
                            stuff isn't routeable.

                            Comment

                            • #15
                              6172crew
                              Moderator Emeritus
                              CGN Contributor - Lifetime
                              • Oct 2005
                              • 6240

                              Originally posted by Booshanky

                              I'm confused about the "network number" and "broadcast address". Is the network number the same as the "gateway" IP? Like, the one that I'd assign to the router attached to that network? And what's the broadcast address then?

                              I'm just trying to piece this together into what it would look like in the real world.

                              Thanks guys. This is a huge help.
                              Ok, since no one answered your question I will give it a shot (Im going through the CCNA course myself).

                              The Broadcast is what certain protocols use to update new routes (routing tables), but not all protocols use the broadcast..read about uni-cast to find out more. Depending what equipment your talking about they use the broadcast IP to send messages to update tables. (the switch will forward the broadcast but the rtr wont.)

                              The Network ID or the first IP in the network doesnt have to be the gateway, at least I havent seen it this way in the CCNA testing. The NID can be the interface of the equipment or gateway but first you must know what your running for software...RIP? Ripv2, IGRP, BGP, OSPF.


                              Please let me know where Im wrong..Im still trying to wrap my head around it myself.

                              sigpic
                              HMM-161 Westpac 1994

                              Comment

                              Working...
                              UA-8071174-1