-
December 6th, 2001, 10:08 AM
#1
Subnetting
i sent this question to hantiz on a private message.. but i kindda though of getting some answers from other people aside from hantiz..
hmm in regarding networking.. here's something i want to ask...
its about subnetting.. if u cant answer it.. its ok..
i really dont expect anyone to answer this except for my former network engineering teacher..
If Computer 1 has an ip address of 192.168.15.1 and a subnet mask of 255.255.0.0
and computer 2 as an ip address of 192.168.2.13 and has a subnet mask of 255.0.0.0
would computer 1 consider computer 2 as part of its subnet even that computer 1 has a Class B subnet mask and computer 2 has a Class A subnet mask?
coz on class B (255.255.0.0) what matters is the 1st 2 octaves which is in this case 192.168.0.0 and since the first 2 octave of computer 2 is exactly thesame to computer 1, then computer 1 would consider computer 2 as part of its subnet...
is my theory correct?
-
December 6th, 2001, 11:00 AM
#2
The two computers in your example will communicate fine.
Something to remember is that the subnet only defines the routing table for the machine, and when a machine communicates with another machine it is only concerned with the IP address, not the remote mask.
Computer 1 in this case will have a route that looks like this:
Destination: 192.168.0.0
netmask: 255.255.0.0
Gateway: 192.168.15.1(probably, it's not important though)
Interface: 192.168.15.1
Metric: 1
Thus it will send any packet destined for 192.168.x.x directly, ie not to a gateway(router). 192.168.2.13 falls into that catagory and so it will recieve the packet.
Computer 2 will have a similar looking route
Destination: 192.0.0.0
netmask: 255.0.0.0
Gateway: 192.168.2.13
Interface: 192.168.2.13
Metric: 1
So it will send any packet destined for 192.x.x.x directly, 192.168.15.1 falls into that category so it will recieve the packets.
It works but is generally not a good idea when deciding on IPs for your network, as computers with variable length subnets can get confusing fast.
-
December 6th, 2001, 11:07 AM
#3
hehe yeah i do agree with your theory.. but im just thinkin if what if it is a really large network that would require them to use a large range of ip addresses and subnets..
but never the less.. thank you..
i had a feeling my theory was right..
another question.. is there another way of calculating the range of ip address in a subnet class w/o using the "10011100" technique?
coz my eyes gets tired in decyphering an ip address of
11110010 10101100 10101010 10000101
bloody hell..
-
December 6th, 2001, 11:40 AM
#4
another question.. is there another way of calculating the range of ip address in a subnet class w/o using the "10011100" technique?
256 - mask - 2= # of addresses per subnet.
For example, mask of 224.
256 - 224 -2 = 30
001|0000 - 1111 Remember to subtract 2 for network and broadcast address
010|0000 - 1111
and so forth for the subnets. Now to figure which addresses are in which subnets, look at the binary for only the mask section.
000 001 010 011 100 101 111, Seven subnets, now convert to decimal. 0, 32, 64, 96, 128, 160, 224, the actual addresses that are grouped together fall between those numbers ( and above 224) the numbers that cannot be used as addresses are these numbers and the number directly prior, 0 31 32 63 64 95 96 127 128 159 160 223 224 255. This last group of unusable addresses is only revelvant if it is subnetted in the fourth octet, ie 255.255.255.224. If it is in another octet, say 255.255.224.0 then just remember the IP cannot be all 0s or all 1s after the division between mask and address.
Or you can just get a subnet calculator off the internet.
-
December 6th, 2001, 12:44 PM
#5
hahah thank you bro... ur da best.. and hmm i want to calculate it manually than using the calculator.. coz i can never have a calculator with me always...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|