Tackling the Dreaded sub-netting
pandimus
Member Posts: 651
Question regarding subnetting
If i am given this ip/sub mask
192.168.16.0/21
the /21 is obviously the subnet mask.
But the 21 does that mean 21 continuous 1's in the binary?
so a subnet mask of
255.255.248.0 ?
If i am given this ip/sub mask
192.168.16.0/21
the /21 is obviously the subnet mask.
But the 21 does that mean 21 continuous 1's in the binary?
so a subnet mask of
255.255.248.0 ?
Xinxing is the hairy one.
Comments
-
Webmaster Admin Posts: 10,292 AdminYes the short notation /21 is in bits. Thus:
11111111.11111111.11111000.00000000 =
255.255.(128+64+32+16+8+0+0+0).0=
255.255.248.0 -
Webmaster Admin Posts: 10,292 AdminYou're welcome. Keep'm coming, maybe I'll be able to wipe some dust of my subnetting skills
-
pandimus Member Posts: 651Do you happen to remember if you can turn the calculator on your testing computer into a scientific calculator? Kinda like you can in windows?Xinxing is the hairy one.
-
2lazybutsmart Member Posts: 1,119OK, let's scare the 'macro'-dust particles from WM's subnetting skills.
The subnet mask is primarily used to determine the 'host' and 'network' part right? If I get that basic part right, there are 5 classes right (A,B,C,D,E) and each class has a default subnet mask. the first four are very obvious
255.0.0.0 (class a)
255.255.0.0 (class b)
255.255.255.0 (class c)
255.255.255.255 (d)
what happened to the default subnet mask of class e?
OK, now the mask tells which portion is 'host' and which is 'network'. On a class A network with the default subnet mask, the host part would be the first octet? What if the mask is not the default 255.0.0.0 (and instead, 254.0.0.0 for instance)? And (as in pandimus's previous example) why would a subnet mask have an octet less than 255 since all the mask does is split 'host' part from network part? And if the subnet mask does indeed contain an octet (usually the non-zero one, i guess) less than 255, does that mean it will signify a portion of an octet as network and another portion of the same octet as host?
For example an IP address 180.123.12.10 with a subnet mask of 255.0.0.0, the network part would be 180 and the host part would be the rest 123.12.10.
OK. here is where the whole thing gets really murky. why would a host have one octet number to represent it and another 2 otcets and yet another, 3 octects? If I undestand this right, the 180 network part mentioned in the previous example will direct packets to the network with 180 as the first octet. For instance:
Network1 - starts with 180. and subnet mask is Class A default
Computer1 - 180.123.12.10
Computer2 - 180.123.12.11
Network2 - starts with 181. and subnet mask is Class A default
Computer1 - 181.123.12.10
Computer2 - 181.123.12.11
So pinging 181.123.12.11 would first look for the network that starts with 181, is that it? then once found, it would find the subsequent host matching the host portion of the IP adress? is that how it happens?
and what if the subnet mask was 250.0.0.0, what would that mean?
whew.. i hope i didn't confuse the he11 outa you guys cuz I sure am confusedExquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
Webmaster Admin Posts: 10,292 Adminpandimus wrote:Do you happen to remember if you can turn the calculator on your testing computer into a scientific calculator? Kinda like you can in windows?
It is kind of like learning to calculate when we were kids. At some point some outcomes just 'are' (1+1=2, 10x10=100, 12x12=144 etc.) Same goes for subnetting, there are a couple of numbers you need to remember and work with. 128, 64, 32, 16, 4, 2, 1 as well as 192, 224, 240, 248, 252, 254, 255. At some point you'll see a subnet mask 255.255.255.240, you should recognize it as being a 28 bit mask immediately, as well as (in case it is a class C address) that 4 bits are used to subnet the network (28-(3x= 4, which in turn leaves 4 bits for hosts. -
Webmaster Admin Posts: 10,292 AdminThe subnet mask is primarily used to determine the 'host' and 'network' part right?what happened to the default subnet mask of class e?On a class A network with the default subnet mask, the host part would be the first octet?What if the mask is not the default 255.0.0.0 (and instead, 254.0.0.0 for instance)?
11111111.11111111.1111111|0.00000000 (pipe shows network|host portion boundary)
As you can see you now got 9 bits available for hosts addresses (512).
More soon, time to get some food inside of me -
pandimus Member Posts: 651I searched a few other forums after i posted the calculator question yesterday.
I Know for a fact microsoft has a normal calculator. I saw a mention that cisco didnt.. But i was curious if that normal calculator can be changed like the on in my windows to a scientific calc. The only reason i would like it is for my powers 2^6 2^9 bla bla bla for my number of hosts on a networkXinxing is the hairy one. -
2lazybutsmart Member Posts: 1,119OK. I've been chewing on this for a while. Let's see if I get the drift.
You mentioned a point I wasn't aware of and that's that every network requires 2 addresses for the network and broadcast. So does that mean I can't create a network with less than 4 IP addresses. and that would mean 1 address for the network, one for the broadcast, 1 for the host computer and one for the server? Or in other words, the address with all '0's in the host portion of the binary is the network adress and the address with all '1's in the host portion of the binary would be the broadcast. so the broadcase address would simply change the host portion to all 255 and the network address to all 0.
The other point about the subnetting itself whereas borrowing bits from the network portion to create a subnet. If I had a network with a Class C network address of 192.168.25.0 with a subnet mask of 255.255.255.0 hence written 192.168.25.0/24 and by '24' that should mean the first 3 sets of 8 bits are used for the network portion and the remaining 8 for the host portion. I hope I got that part right?
OK, now suppose I want a to create a subnet within my above mentioned network that will host 55 computers. The closet power of 2 that will equal 55 (or about 55) would be 2 power 6 = 64. So that would mean 6 out of the 32 bits available for the entire IP address. So the binary format of the subnet mask would probably look like.
11111111.11111111.11111111.11(upto this point, that would be the network portion right, and the remaining six digits the host portion)000000
(I did a little digging here on your (|) pipe methodology. and hence the slash stuff )
and changing that into decimal would be 255.255.255.192
So the hosts in the subnet mask would carry IP's 192.168.25.1/26 - 192.168.25.64/26 ((mask 255.255.255.192)
With a network assigned all it's subnets and (as u mentioned) subs on subnets, how would a ping from an external network that goes through a router deterime where to go. would the network portion of the IP address always carry the subnet's address as well? what i'm trying to say here is, all hosts in a subnet carry the subnet's network address right? and the subnet itself carries the network address of it's parent network and so and so forth? i'm kinda confused on that part. [/quote]Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
Pavlov Member Posts: 264You won't have to worry about the complicated calculations of subnetting for the 216. Yes, you need to know subnetting and how it works and even how to do it. But they are not going to give you deeply involved calculations. If you haven't already, you should spend some time poking around at Learn to Subnet.
That site was tremendously helpful for me when I started thinking about subnettingPavlov
A+, Net+, i-Net+, CIW-A
MCP NT4, MCSA 2K, MCSE 2K -
Webmaster Admin Posts: 10,292 AdminWhen the subject is subnetting, I automatically put my Cisco cap on.
I don't think the calculator on MS exam can be switched to Scientific mode. I vaguely remember trying it ones, but it has been a while since my last MS exam so I could be wrong.
The reason you say you need it is also the reason why I mentioned these:
128, 64, 32, 16, 4, 2, 1 as these are the powers of two 2^8 2^7 2^6, you typically won't need 2^9 or higher but if you do just double the previous one, in this case 2^8, which, again, you should know by heart... and I'm sure you remember the days when video cards or PC had 512 KB, than 1024, 2048, 4096, 8192, and so on
Many give the advice, which is useful if you don't know them by heart, or easily black out on suchs things, to write them down on the sheets as soon as you sit down in exam room. I think however that the need of writing them down proofs that you haven't practiced enough with subnettings and binary calculation. Most experienced net/lan/wan admins/engineers/designers don't even calculate subnets, they just know. To get to that point is easier than it may seem when you start out with subnetting. Just keep repeating and repeating (like the tables back in school) until you know all the numbers and combinations of 'm. And it's kinda like riding a bike, once you really learned it you will never forget how to do it. It will make several exams that cover this topic a lot easier once you fully grapsed it. -
pandimus Member Posts: 651Cool, i was so caught up in the subnetting i didnt even notice how those calculations came out..Xinxing is the hairy one.
-
2lazybutsmart Member Posts: 1,119Pavlov wrote:You won't have to worry about the complicated calculations of subnetting for the 216. Yes, you need to know subnetting and how it works and even how to do it. But they are not going to give you deeply involved calculations. If you haven't already, you should spend some time poking around at Learn to Subnet.
That site was tremendously helpful for me when I started thinking about subnetting
great link, Pavlov. As a beginner, I'm finding it extremely helpful. Thanks.Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
pandimus Member Posts: 651Between that link and this link
http://www.mcsefreak.com/subnetting.htm
I was able to get it..
The thing about learntosubnet.com is the fact you cant pause it, and you cant fast forward it, and that dude reiterates toooo much for me. It is interesting how much he empashizes.. "a subnet mask, a CUSTOM subnet mask". Plus he briefly repeats every previous lecture..Xinxing is the hairy one. -
2lazybutsmart Member Posts: 1,119There's one thing that I can't make head or tail of yet. I think I'm going to need to understand the OSI model or something. anyways, here we go.
Suppose you have 4 routers connected together by ethernet cables. Each router connects to a LAN composed of 5 devices. Naturally, in each router, there would be a cable connecting it to his local LAN and another acting as a Gateway for its LAN devices to connect remotely with the other networks. This second cable would be connected to -say- router B which in turn has a cable to it's LAN and another going out to router 3 and so on.
Now if I ping a device in the LAN of router5 from the network of router1, how will this reach that router. Like what 'route' would it go through? Would all devices in the network be aware of other devices participating in other subnets or are network devices within a subnet oblivious to others in another subnet?Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
Webmaster Admin Posts: 10,292 AdminWhen a hosts needs to send a packet to another host it checks if the destination IP is in the same subject as its own. When it isn't it forwards the packets to the nearest interface on the nearest router which will (should have a route in its routing table with the router that has an interface in the same network as the destination IP (which in your simply example would be in turn the default gateway from the destination's perspective.). The routes in the routin tables of the routers are build staticly (by an admin) or dynamically (by routing protocols such as RIP and OSPF). I think you should be able to find more details about this in our Network+ TechNotes.
-
2lazybutsmart Member Posts: 1,119yeah thanks. I've skimmed through the pdf's although I'm rereading them again now. I don't know if it's the same with you, but I find it hard to continue studying something if I have a question in mind. It's gotta be solved although it serves as a dangerous means of distraction for me most of the times.
Now the reason I'm asking this question is becuase I've seen this netowrk in real life where there were 4 routers connected together in four different cities. I was reading through the net+ technotes and the e1/t1 thing popped up and consequently the question. They were using e1 links with ethernet converts VIA microwave radios. Each with it's own LAN, I couldn't understand how the devices would be interconnected so as to serve as part of one network.
But since you mentioned the routing table thing.... I guess that's the answer. Haven't reached that part yet though.............Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
pandimus Member Posts: 651Does this seem reasonable?
if i get an /24 I can just subtract that from 32 and then root the difference and I will have available hosts?Xinxing is the hairy one. -
Webmaster Admin Posts: 10,292 Admin/24 means 255.255.255.0 which is the default mask for a class C address, as you probably know there are 256 address in a class C network x.x.x.0 - x.x.x.255 (actual minus 2, because of the network and broadcast address, so 254 are available to hosts.)
So anything that results in something else than 256, or better, 254, doesn't seem reasonable. -
pandimus Member Posts: 651so my calculation is correct
32-24=8
2^8=256
256-2=254Xinxing is the hairy one.