iam finding subnet mask for class A,class B, class C addresses but am not finding any subnet mask for an IP 239.192.140.22 ;how to find subnet mask for class D IP addresses?
First and foremost: classful routing is dead, and has been for over 20 years (since 1995)!
The former Class D addresses are multicast addresses, and they don't really use masks since each multicast group, represented by a single address, is subscribed to individually. When configuring multicast routing (different than regular IP routing), there are instances where you may use a mask to indicate a range (dependent on the multicast routing device), but the mask used depends solely on the size of the range and not on any arbitrary concept like class.
The former Class E addresses are reserved, so there is not really a mask concept for them, either.
Related
I know that each IP class has a default network mask (class A: 255.0.0.0, class B: 255.255.0.0 and class C: 255.255.255.0).
I have been reading the subnetting.net tutorial and they use the default (classful) network mask for subnetting (Question Type 2 Written Example), but on the other hand I read all the time that IP classes are obsolete.
What is exactly a default network mask?
Is it needed for subnetting?
Am I confusing concepts? (I suspect I am)
Please help, this is burning my head.
The IP address can never become obsolete a similar anology can be your home address becoming obsolete. The fact that IPv4 addresses are drying up Because there are that many devices in the globe now which is greater than the number of ip's available. That's why we are moving to IPv6...
A subnet mask is a number that defines a range of IP addresses available within a network. A single subnet mask limits the number of valid IPs for a specific network. Multiple subnet masks can organize a single network into smaller networks (called subnetworks or subnets).
For exp a subnet mask of 255.255.255.0 allows for close to 256 unique hosts within the network (since not all 256 IP addresses can be used).see Why do we need subnet mask?
An ISP has provided your company with the Class C network 192.111.2.0. Divide this into four (4) subnets.
Complete the following table; both Network addresses and Broadcast addresses should be in dotted-decimal notation.
Assume the all zero's and all one's subnets are usable.
There are a lot of material on subnetting - just google it and you'll get the result pretty easily. You can start with this subnet calculator.
As for your question:
In order to get 4 subnets from 192.111.2.0/24 you should go for the following configuration:
The subnet mask for all subnets are 255.255.255.192 (or /26) and the networks are divided as follows:
192.111.2.0-192.111.2.63
192.111.2.64-192.111.2.127
192.111.2.128-192.111.2.191
192.111.2.192-192.111.2.255
Notice that the first address is the network address and the last is the broadcast address
So I understand that there used to be classful addresses allocated depending on the first octet of an IP a long time ago. Of those classes, private IP address ranges were given in each.
Class A 10.*.*.*
Class B 172.16-31.*.*
Class C 192.168.0-255.*
I understand that according the RFC 1918, because 192.168 technically starts in the class C range, it should be considered 256 class C networks. However, because there are 256 available class C networks in 192.168.xxx.xxx, would it be incorrect to refer to this as 1 class B network?
A 'network' or 'subnet' is a set of ip-numbers that can connect to each other without the use of a router. A class C network has a maximum of 256 such ip-addresses. To get from one subnet to another subnet, a router is required. You can not call the 192.168.xxx.yyy block a single class B subnet, because the hosts at 192.168.1.xxx cannot directly connect to hosts in 192.168.2.xxx. The hosts are in different subnets.
192.168.xxx.yyy is an ip-block of 256 private class C networks. Classed networks assume fixed network masks for particular ip-ranges. So, for the networks in block 192.168.xxx.yyy, classed-only network software will set the network mask to be equivalent to 255.255.255.0 (or /24).
Today most network software ignores the class of the network and will require a network mask for all ip number blocks. For instance, you can use 192.168.0.0 to 192.168.3.255 as a single classless subnet containing 1024 ip-addresses if you use network mask 255.255.252.0
If you get the gateway as the following:
192.168.0.1
255.255.0.0
And a client at
192.168.10.1
255.255.0.0
They will communicate fine.
I ask this same question myself.
Its considered a C class network but can be configured as a B Class while staying in the private range. We need some educated answers to elaborate on this.
Number of IP-addresses in practice when paired with subnet masks: Should IP-addresses paired with different subnet masks be seen as distinct?
I know an IP-address is represented as 4 octets, i.e. using 32-bits. The total is 2^32 different IP-addresses.
But these IP-addresses are paired with a subnet mask. Does this mean that 192.168.0.1/24 and 192.168.0.1/16 are two different IP-addresses in practice? If so, why not introduce some more "layers" (more masks) that extend the 32-bit addressing scheme even further?
How many IP-addresses are there?
Should IP-addresses paired with different subnet masks be seen as distinct?
No. A subnet mask is not a qualifier or namespace for IP addresses. Netmasks have no part in associating IP addresses with machines. Rather, they are associated with the physical and logical topology of the (IPv4) network, and they are needed for hosts to participate in the network appropriately. Using a different netmask does not change the meaning of IP addresses, so netmasks do not provide a mechanism for expanding the address space.
Does this mean that 192.168.0.1/24 and 192.168.0.1/16 are two different IP-addresses in practice?
No. In fact, those are not IP addresses at all -- they are (address, netmask) pairs, both with the same address part. On any given network, they refer to the same machine (if they refer to any machine at all). The IP address involved is in one of the non-routable ranges, however. These are usually used for internal networks, typically behind a router that performs network address translation (NAT) so that multiple machines can access the network without having globally-unique addresses. That has nothing to do with netmasks, however.
How many IP-addresses are there?
There are exactly 232 (a bit less than 5 billion) distinct IPv4 addresses. Not all of them are usable as host addresses. Use of private networks with NAT-ed access to the Internet expands the total number of machines that can be connected, but that does not change the number of distinct addresses, and it anyway is not related to netmasks.
I figured out the subnet mask for both subnets 1 and 2. My problem is I can't grasp how the subnet turns to 172.20.11.254 and 172.20.13.254 respectively? I assume this is VSLM, but not certain. I'm just learning this. I got 172.20.8.0 and 172.20.6.0 as my subnet and I know that is wrong now. Thanks for any help you can provide.
To determine which subnet mask will work for the 172.20.0.0 network, first look at the number of hosts required for each subnet:
Subnet1 (connected to FastEthernet0/0) has 672 hosts. To support 672 hosts, a subnet mask of /22 is required (10 host bits in the 2n-2 formula will afford 1022 host addresses in the subnet).
Subnet2 (connected to FastEthernet0/1) has 258 hosts. To support 258 hosts, a subnet mask of /23 is required (9 host bits in the 2n-2 formula will afford 510 host addresses in the subnet).
With a network address of 172.20.0.0 and the masks needed to fit the requirements, you need to configure the following IP address and subnet masks:
For the FastEthernet0/0 connection:
172.20.8.0/22 is the third possible subnet. (172.20.0.0/22 is the first possible subnet and 172.20.4.0/22 is the second possible subnet.)
172.20.11.254 is the last possible IP address in the subnet.
255.255.252.0 is the decimal version of a 22-bit mask.
For the FastEthernet0/1 connection:
172.20.12.0/23 is the next available subnet that does not overlap.
172.20.13.254 is the last possible IP address in the subnet.
255.255.254.0 is the decimal version of a 23-bit mask.
Use the following commands to configure the SFO interfaces:
SFO>enable
SFO#configure terminal
SFO(config)#interface FastEthernet0/0
SFO(config-if)#ip address 172.20.11.254 255.255.252.0
SFO(config-if)#no shutdown
SFO(config-if)#interface FastEthernet0/1
SFO(config-if)#ip address 172.20.13.254 255.255.254.0
SFO(config-if)#no shutdown
SFO(config-if)#exit
SFO(config)#exit
SFO#copy run start
I detect some desperation, so let's see if I can convey and understandable explanation. :-)
172.20.0.0 seems to be the address space destined for you to use in this exercise. That is a class B network (255.255.0.0, or /16 netmask), but since we're going to subnet it variably, you can safely forget that. For example, you could subnet all of it it in small, class C subnets (all with a mask of 255.255.255.0, or /24), and if you did you would use 172.20.0.0/24 for one network, 172.20.1.0/24 for another, 172.20.2.0/24 for another, and so on. But if you did that, each subnet would be able to hold no more than 254 hosts (that is because you leave the last octet - 8 bits - for the host portion, and you have to reserve two - the first and last - for the subnet address and the broadcast address: 2^8-2=254).
But 254 hosts is not enough for your needs, since you have requirements for 672 and 258.
If you use a smaller sized mask (meaning larger sized network -> more hosts) like a /23 (255.255.254.0) you now have 9 bits for the host portion, therefore you can acommodate 2^9-2=510 hosts, big enough for 258, but not for 672. So for the latter you will need a /22 network (255.255.252.0), which will leave 10 bits for the host portion thus allowing 2^10-2=1022.
With each bit you reduce in the netmask, you double your network size. So if a /24 goes from 172.20.0.0 to 172.20.0.255 (the single '0' class C network), a /23 goes from 172.20.0.0 to 172.20.1.255 (two class C networks, '0' and '1'). And a /22 goes from 172.20.0.0 to 172.20.3.255 (four class C networks). In each case the first address is considered the network address and is not assigned to any device, and the last one is the broadcast address, and is not assigned either.
So, back to your example, they choose to assign the 3rd /22 network (1st being from 172.20.0.0 to 172.20.3.255, 2nd being from 172.20.4.0 to 172.20.7.255, and 3rd being from 172.20.8.0 to 172.20.11.255) to that particular subnet. So 172.20.8.0/22 it is. And they choose to assign the 7th /23 subnet possible (1st is '0' and '1' class C's, 2nd is '2' and '3' class C's, and so on) to the other subnet. So 172.20.12.0/23 it is for it. Remember that they cannot overlap!
Now, as to why they chose the .254 addresses for the router interfaces, that is just a convention. Router interfaces are usually configured to use either the first usable (.1) IP address or the last usable (.254) IP address in their subnets, at least on the LAN side. Note that your subnets' broadcast addresses are 172.20.11.255 for the /22 and 172.20.13.255 for the /23. In both cases they picked for the router interfaces the address which is one below them, i.e. the last usable address. But it could have been any one in the corresponding range.
Did that help?